Skip to content

Commit

Permalink
Merge pull request #403 from oasisprotocol/pro-wh/bugfix/createcut
Browse files Browse the repository at this point in the history
analyzer: fix evm.Create result type cutting
  • Loading branch information
pro-wh authored May 4, 2023
2 parents f1a916f + d5bc419 commit 614a824
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions analyzer/runtime/extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,9 @@ func ExtractRound(blockHeader nodeapi.RuntimeBlockHeader, txrs []nodeapi.Runtime
EVMCreate: func(body *evm.Create, ok *[]byte) error {
blockTransactionData.Body = body
amount = uncategorized.QuantityFromBytes(body.Value)
if !txr.Result.IsUnknown() && txr.Result.IsSuccess() && len(*ok) == 32 {
if !txr.Result.IsUnknown() && txr.Result.IsSuccess() && len(*ok) == 20 {
// todo: is this rigorous enough?
if to, err = registerRelatedEthAddress(blockData.AddressPreimages, blockTransactionData.RelatedAccountAddresses, uncategorized.SliceEthAddress(*ok)); err != nil {
if to, err = registerRelatedEthAddress(blockData.AddressPreimages, blockTransactionData.RelatedAccountAddresses, *ok); err != nil {
return fmt.Errorf("created contract: %w", err)
}
}
Expand Down

0 comments on commit 614a824

Please sign in to comment.