Skip to content

Commit

Permalink
Rpc skip falsy contract (#984)
Browse files Browse the repository at this point in the history
* Exclude falsy contract
  • Loading branch information
cabrador authored Feb 9, 2024
1 parent e75035f commit e9ef0b1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rpc/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package rpc

import (
"math/big"
"strings"
"time"

"github.com/Fantom-foundation/Aida/state"
Expand All @@ -10,6 +11,9 @@ import (
"github.com/ethereum/go-ethereum/common"
)

// TODO FIX!
const falsyContract = "0xe0c38b2a8d09aad53f1c67734b9a95e43d5981c0"

// StateDBData represents data that StateDB returned for requests recorded on API server
// This is sent to Comparator and compared with RecordedData
type StateDBData struct {
Expand Down Expand Up @@ -47,6 +51,13 @@ func Execute(block uint64, rec *RequestAndResults, archive state.NonCommittableS
}

evm := newEvmExecutor(block, archive, cfg, rec.Query.Params[0].(map[string]interface{}), timestamp)

// calls to this contract are excluded for now,
// this contract causes issues in validation
if strings.Compare(falsyContract, strings.ToLower(evm.args.To.String())) == 0 {
rec.SkipValidation = true
}

return executeCall(evm)

case "estimateGas":
Expand Down

0 comments on commit e9ef0b1

Please sign in to comment.