From a81ec23e1832afbcfa7f063dabacd45d9c173fcb Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Thu, 15 Jun 2023 22:42:53 +0300 Subject: [PATCH 01/27] debug: add timestamp progression and nil withdrawals for pre-shanghai --- simulators/ethereum/engine/clmock/clmock.go | 8 +- simulators/ethereum/engine/main.go | 8 +- .../engine/suites/withdrawals/tests.go | 382 +++++++++--------- simulators/ethereum/engine/test/spec.go | 5 + 4 files changed, 210 insertions(+), 193 deletions(-) diff --git a/simulators/ethereum/engine/clmock/clmock.go b/simulators/ethereum/engine/clmock/clmock.go index 5e50112c74..0dfa0ed31b 100644 --- a/simulators/ethereum/engine/clmock/clmock.go +++ b/simulators/ethereum/engine/clmock/clmock.go @@ -314,9 +314,8 @@ func (cl *CLMocker) pickNextPayloadProducer() { // Selected client latest block hash does not match canonical chain, try again cl.NextBlockProducer = nil continue - } else { - break } + break } @@ -543,8 +542,9 @@ func (cl *CLMocker) ProduceSingleBlock(callbacks BlockProcessCallbacks) { previousForkchoice := cl.LatestForkchoice cl.HeadHashHistory = append(cl.HeadHashHistory, cl.LatestPayloadBuilt.BlockHash) - cl.LatestForkchoice = api.ForkchoiceStateV1{} - cl.LatestForkchoice.HeadBlockHash = cl.LatestPayloadBuilt.BlockHash + cl.LatestForkchoice = api.ForkchoiceStateV1{ + HeadBlockHash: cl.LatestPayloadBuilt.BlockHash, + } if len(cl.HeadHashHistory) > int(cl.SlotsToSafe.Int64()) { cl.LatestForkchoice.SafeBlockHash = cl.HeadHashHistory[len(cl.HeadHashHistory)-int(cl.SlotsToSafe.Int64())-1] } diff --git a/simulators/ethereum/engine/main.go b/simulators/ethereum/engine/main.go index 9f689d73f6..de1bbad589 100644 --- a/simulators/ethereum/engine/main.go +++ b/simulators/ethereum/engine/main.go @@ -87,11 +87,11 @@ type ClientGenesis interface { // Load the genesis based on each client // getTimestamp of the next 2 minutes -func getTimestamp() int64 { +func getTimestamp(spec test.SpecInterface) int64 { now := time.Now() // Calculate the start of the next 2 minutes - nextMinute := now.Truncate(time.Minute).Add(1 * time.Minute) + nextMinute := now.Truncate(time.Minute).Add(1 * time.Minute).Add(time.Duration(spec.GetPreShapellaBlockCount()*30) * time.Second) // Get the Unix timestamp of the next 2 minutes return nextMinute.Unix() @@ -114,7 +114,7 @@ func addTestsToSuite(sim *hivesim.Simulation, suite *hivesim.Suite, tests []test genesis := currentTest.GetGenesis(clientName) // Set the timestamp of the genesis to the next 2 minutes - timestamp := getTimestamp() + timestamp := getTimestamp(currentTest) genesis.SetTimestamp(timestamp) genesis.SetDifficulty(big.NewInt(100)) //genesis.UpdateTimestamp(getTimestamp()) @@ -124,7 +124,7 @@ func addTestsToSuite(sim *hivesim.Simulation, suite *hivesim.Suite, tests []test } // Calculate and set the TTD for this test - //ttd := helper.CalculateRealTTD(genesis, currentTest.GetTTD()) + // ttd := helper.CalculateRealTTD(genesis, currentTest.GetTTD()) // Configure Forks newParams := globals.DefaultClientEnv.Set("HIVE_TERMINAL_TOTAL_DIFFICULTY", fmt.Sprintf("%d", genesis.Difficulty())) diff --git a/simulators/ethereum/engine/suites/withdrawals/tests.go b/simulators/ethereum/engine/suites/withdrawals/tests.go index dd9362f2e5..7dbf9aeffe 100644 --- a/simulators/ethereum/engine/suites/withdrawals/tests.go +++ b/simulators/ethereum/engine/suites/withdrawals/tests.go @@ -5,13 +5,14 @@ import ( "context" "encoding/json" "fmt" + "math/big" + "time" + "github.com/ethereum/go-ethereum/accounts/abi/bind" beacon "github.com/ethereum/go-ethereum/beacon/engine" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/hive/simulators/ethereum/engine/client/hive_rpc" "github.com/ethereum/hive/simulators/ethereum/engine/libgno" - "math/big" - "time" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" @@ -40,153 +41,171 @@ var ( balances = make(map[int64]map[common.Address]big.Int, 0) ) +// Withdrawals base spec: +// Specifies a simple withdrawals test where the withdrawals fork can happen +// on genesis or afterwards. +type WithdrawalsBaseSpec struct { + test.Spec + TimeIncrements uint64 // Timestamp increments per block throughout the test + WithdrawalsForkHeight uint64 // Withdrawals activation fork height + WithdrawalsBlockCount uint64 // Number of blocks on and after withdrawals fork activation + WithdrawalsPerBlock uint64 // Number of withdrawals per block + WithdrawableAccountCount uint64 // Number of accounts to withdraw to (round-robin) + WithdrawalsHistory WithdrawalsHistory // Internal withdrawals history that keeps track of all withdrawals + WithdrawAmounts []uint64 // Amounts of withdrawn wei on each withdrawal (round-robin) + TransactionsPerBlock *big.Int // Amount of test transactions to include in withdrawal blocks + TestCorrupedHashPayloads bool // Send a valid payload with corrupted hash + SkipBaseVerifications bool // For code reuse of the base spec procedure +} + // Execution specification reference: // https://github.com/ethereum/execution-apis/blob/main/src/engine/specification.md - +// // List of all withdrawals tests var Tests = []test.SpecInterface{ - //&WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "Withdrawals Fork On Genesis", - // About: ` - // Tests the withdrawals fork happening on block 5 (e.g. on a - // testnet). - // `, - // }, - // WithdrawalsForkHeight: 1, - // WithdrawalsBlockCount: 2, // Genesis is not a withdrawals block - // WithdrawalsPerBlock: 16, - // TimeIncrements: 5, - //}, - - //&WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "Withdrawals Fork on Block 1", - // About: ` - // Tests the withdrawals fork happening directly after genesis. - // `, - // }, - // WithdrawalsForkHeight: 1, // Only Genesis is Pre-Withdrawals - // WithdrawalsBlockCount: 1, - // WithdrawalsPerBlock: 16, - //}, + // &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdrawals Fork On Genesis", + // About: ` + // Tests the withdrawals fork happening on block 5 (e.g. on a + // testnet). + // `, + // }, + // WithdrawalsForkHeight: 1, //TODO + // WithdrawalsBlockCount: 2, // Genesis is not a withdrawals block + // WithdrawalsPerBlock: 16, + // TimeIncrements: 5, + // }, + + // &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdrawals Fork on Block 1", + // About: ` + // Tests the withdrawals fork happening directly after genesis. + // `, + // }, + // WithdrawalsForkHeight: 1, // Only Genesis is Pre-Withdrawals + // WithdrawalsBlockCount: 1, + // WithdrawalsPerBlock: 16, + // }, + // // TODO + // &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdrawals Fork on Block 5", + // About: ` + // Tests the transition to the withdrawals fork after a single block + // has happened. + // Block 1 is sent with invalid non-null withdrawals payload and + // client is expected to respond with the appropriate error. + // `, + // }, + // WithdrawalsForkHeight: 5, // Genesis and Block 1 are Pre-Withdrawals + // WithdrawalsBlockCount: 1, + // WithdrawalsPerBlock: 16, + // TimeIncrements: 5, + // }, + // TODO + &WithdrawalsBaseSpec{ + Spec: test.Spec{ + Name: "Withdrawals Fork on Block 3", + About: ` + Tests the transition to the withdrawals fork after two blocks + have happened. + Block 2 is sent with invalid non-null withdrawals payload and + client is expected to respond with the appropriate error. + `, + }, + WithdrawalsForkHeight: 3, // Genesis, Block 1 and 2 are Pre-Withdrawals + WithdrawalsBlockCount: 1, + WithdrawalsPerBlock: 16, + TimeIncrements: 5, + }, - //&WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "Withdrawals Fork on Block 5", - // About: ` - // Tests the transition to the withdrawals fork after a single block - // has happened. - // Block 1 is sent with invalid non-null withdrawals payload and - // client is expected to respond with the appropriate error. - // `, - // }, - // WithdrawalsForkHeight: 5, // Genesis and Block 1 are Pre-Withdrawals - // WithdrawalsBlockCount: 1, - // WithdrawalsPerBlock: 16, - // TimeIncrements: 5, - //}, - // - //&WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "Withdrawals Fork on Block 3", - // About: ` - // Tests the transition to the withdrawals fork after two blocks - // have happened. - // Block 2 is sent with invalid non-null withdrawals payload and - // client is expected to respond with the appropriate error. - // `, - // }, - // WithdrawalsForkHeight: 3, // Genesis, Block 1 and 2 are Pre-Withdrawals - // WithdrawalsBlockCount: 1, - // WithdrawalsPerBlock: 16, - //}, - // - //&WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "Withdraw to a single account", - // About: ` - // Make multiple withdrawals to a single account. - // `, - // }, - // WithdrawalsForkHeight: 1, - // WithdrawalsBlockCount: 1, - // WithdrawalsPerBlock: 64, - // WithdrawableAccountCount: 1, - //}, - // - //&WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "Withdraw to two accounts", - // About: ` - // Make multiple withdrawals to two different accounts, repeated in - // round-robin. - // Reasoning: There might be a difference in implementation when an - // account appears multiple times in the withdrawals list but the list - // is not in ordered sequence. - // `, - // }, - // WithdrawalsForkHeight: 1, - // WithdrawalsBlockCount: 1, - // WithdrawalsPerBlock: 64, - // WithdrawableAccountCount: 2, - //}, - // - //&WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "Withdraw many accounts", - // About: ` - // Make multiple withdrawals to 1024 different accounts. - // Execute many blocks this way. - // `, - // TimeoutSeconds: 240, - // }, - // WithdrawalsForkHeight: 1, - // WithdrawalsBlockCount: 4, - // WithdrawalsPerBlock: 1024, - // WithdrawableAccountCount: 1024, - //}, - // - //&WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "Withdraw zero amount", - // About: ` - // Make multiple withdrawals where the amount withdrawn is 0. - // `, - // }, - // WithdrawalsForkHeight: 1, - // WithdrawalsBlockCount: 1, - // WithdrawalsPerBlock: 64, - // WithdrawableAccountCount: 2, - // WithdrawAmounts: []uint64{ - // 0, - // 1, - // }, - //}, - // - //&WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "Empty Withdrawals", - // About: ` - // Produce withdrawals block with zero withdrawals. - // `, - // }, - // WithdrawalsForkHeight: 1, - // WithdrawalsBlockCount: 1, - // WithdrawalsPerBlock: 0, - //}, - // - //&WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "Corrupted Block Hash Payload (INVALID)", - // About: ` - // Send a valid payload with a corrupted hash using engine_newPayloadV2. - // `, - // }, - // WithdrawalsForkHeight: 1, - // WithdrawalsBlockCount: 1, - // TestCorrupedHashPayloads: true, - //}, + // &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdraw to a single account", + // About: ` + // Make multiple withdrawals to a single account. + // `, + // }, + // WithdrawalsForkHeight: 1, + // WithdrawalsBlockCount: 1, + // WithdrawalsPerBlock: 64, + // WithdrawableAccountCount: 1, + // }, + + // &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdraw to two accounts", + // About: ` + // Make multiple withdrawals to two different accounts, repeated in + // round-robin. + // Reasoning: There might be a difference in implementation when an + // account appears multiple times in the withdrawals list but the list + // is not in ordered sequence. + // `, + // }, + // WithdrawalsForkHeight: 1, + // WithdrawalsBlockCount: 1, + // WithdrawalsPerBlock: 64, + // WithdrawableAccountCount: 2, + // }, + // // TODO + // &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdraw many accounts", + // About: ` + // Make multiple withdrawals to 1024 different accounts. + // Execute many blocks this way. + // `, + // TimeoutSeconds: 240, + // }, + // WithdrawalsForkHeight: 1, + // WithdrawalsBlockCount: 4, + // WithdrawalsPerBlock: 1024, + // WithdrawableAccountCount: 1024, + // }, + + // &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdraw zero amount", + // About: ` + // Make multiple withdrawals where the amount withdrawn is 0. + // `, + // }, + // WithdrawalsForkHeight: 1, + // WithdrawalsBlockCount: 1, + // WithdrawalsPerBlock: 64, + // WithdrawableAccountCount: 2, + // WithdrawAmounts: []uint64{ + // 0, + // 1, + // }, + // }, + + // &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Empty Withdrawals", + // About: ` + // Produce withdrawals block with zero withdrawals. + // `, + // }, + // WithdrawalsForkHeight: 1, + // WithdrawalsBlockCount: 1, + // WithdrawalsPerBlock: 0, + // }, + + // &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Corrupted Block Hash Payload (INVALID)", + // About: ` + // Send a valid payload with a corrupted hash using engine_newPayloadV2. + // `, + // }, + // WithdrawalsForkHeight: 1, + // WithdrawalsBlockCount: 1, + // TestCorrupedHashPayloads: true, + // }, // //// Block value tests //&BlockValueSpec{ @@ -203,27 +222,27 @@ var Tests = []test.SpecInterface{ //}, // // Sync Tests - &WithdrawalsSyncSpec{ - WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ - Spec: test.Spec{ - Name: "Sync after 2 blocks - Withdrawals on Block 1 - Single Withdrawal Account - No Transactions", - About: ` - - Spawn a first client - - Go through withdrawals fork on Block 1 - - Withdraw to a single account 16 times each block for 2 blocks - - Spawn a secondary client and send FCUV2(head) - - Wait for sync and verify withdrawn account's balance - `, - //TimeoutSeconds: 6000, - }, - WithdrawalsForkHeight: 1, - WithdrawalsBlockCount: 2, - WithdrawalsPerBlock: 16, - WithdrawableAccountCount: 1, - //TransactionsPerBlock: common.Big0, - }, - SyncSteps: 1, - }, + // &WithdrawalsSyncSpec{ + // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Sync after 2 blocks - Withdrawals on Block 1 - Single Withdrawal Account - No Transactions", + // About: ` + // - Spawn a first client + // - Go through withdrawals fork on Block 1 + // - Withdraw to a single account 16 times each block for 2 blocks + // - Spawn a secondary client and send FCUV2(head) + // - Wait for sync and verify withdrawn account's balance + // `, + // //TimeoutSeconds: 6000, + // }, + // WithdrawalsForkHeight: 1, + // WithdrawalsBlockCount: 2, + // WithdrawalsPerBlock: 16, + // WithdrawableAccountCount: 1, + // //TransactionsPerBlock: common.Big0, + // }, + // SyncSteps: 1, + // }, //&WithdrawalsSyncSpec{ // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ // Spec: test.Spec{ @@ -872,21 +891,8 @@ func (wh WithdrawalsHistory) Copy() WithdrawalsHistory { return result } -// Withdrawals base spec: -// Specifies a simple withdrawals test where the withdrawals fork can happen -// on genesis or afterwards. -type WithdrawalsBaseSpec struct { - test.Spec - TimeIncrements uint64 // Timestamp increments per block throughout the test - WithdrawalsForkHeight uint64 // Withdrawals activation fork height - WithdrawalsBlockCount uint64 // Number of blocks on and after withdrawals fork activation - WithdrawalsPerBlock uint64 // Number of withdrawals per block - WithdrawableAccountCount uint64 // Number of accounts to withdraw to (round-robin) - WithdrawalsHistory WithdrawalsHistory // Internal withdrawals history that keeps track of all withdrawals - WithdrawAmounts []uint64 // Amounts of withdrawn wei on each withdrawal (round-robin) - TransactionsPerBlock *big.Int // Amount of test transactions to include in withdrawal blocks - TestCorrupedHashPayloads bool // Send a valid payload with corrupted hash - SkipBaseVerifications bool // For code reuse of the base spec procedure +func (ws *WithdrawalsBaseSpec) GetPreShapellaBlockCount() int { + return int(ws.WithdrawalsForkHeight) } // Get the per-block timestamp increments configured for this test @@ -972,9 +978,9 @@ func (ws *WithdrawalsBaseSpec) VerifyContractsStorage(t *test.Env) { r.ExpectBigIntStorageEqual(big.NewInt(100)) // WARM_STORAGE_READ_COST p.ExpectBigIntStorageEqual(latestPayloadNumberBig) // tx succeeded } else { - // Pre-Shanghai - r.ExpectBigIntStorageEqual(big.NewInt(2600)) // COLD_ACCOUNT_ACCESS_COST - p.ExpectBigIntStorageEqual(big.NewInt(0)) // tx must've failed + // // Pre-Shanghai + // r.ExpectBigIntStorageEqual(big.NewInt(2600)) // COLD_ACCOUNT_ACCESS_COST + // p.ExpectBigIntStorageEqual(big.NewInt(0)) // tx must've failed } } @@ -1131,7 +1137,7 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { Timestamp: t.CLMock.LatestHeader.Time + ws.GetBlockTimeIncrements(), Random: common.Hash{}, SuggestedFeeRecipient: common.Address{}, - Withdrawals: make(types.Withdrawals, 0), + Withdrawals: nil, }, ) r.ExpectationDescription = "Sent pre-shanghai Forkchoice ForkchoiceUpdatedV2 + null withdrawals, no error is expected" @@ -1173,6 +1179,10 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { }, }) + if time.Now().Unix() < int64(*t.Genesis.Config().ShanghaiTime) { + time.Sleep(time.Duration((int64(*t.Genesis.Config().ShanghaiTime) - time.Now().Unix()))) + } + // Produce requested post-shanghai blocks // (At least 1 block will be produced after this procedure ends). var ( @@ -1308,6 +1318,9 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { func getBalanceOfToken(t *test.Env, account common.Address, block *big.Int) (*big.Int, error) { url, _ := t.CLMock.EngineClients[0].Url() client, err := ethclient.Dial(url) + if err != nil { + return nil, err + } defer client.Close() // get GnoTokenABI @@ -1371,7 +1384,6 @@ func (ws *WithdrawalsSyncSpec) Execute(t *test.Env) { block, err := t.CLMock.EngineClients[0].BlockByNumber(ctx, t.CLMock.LatestHeadNumber) if err != nil { panic("failed to get block by number") - return } t.CLMock.LatestForkchoice.HeadBlockHash = block.Hash() diff --git a/simulators/ethereum/engine/test/spec.go b/simulators/ethereum/engine/test/spec.go index 4603f25487..1edecc5b72 100644 --- a/simulators/ethereum/engine/test/spec.go +++ b/simulators/ethereum/engine/test/spec.go @@ -32,6 +32,7 @@ type SpecInterface interface { GetTestTransactionType() helper.TestTransactionType GetTimeout() int GetTTD() int64 + GetPreShapellaBlockCount() int IsMiningDisabled() bool } @@ -149,3 +150,7 @@ func (s Spec) GetTTD() int64 { func (s Spec) IsMiningDisabled() bool { return s.DisableMining } + +func (s Spec) GetPreShapellaBlockCount() int { + return 0 +} From 2a7355f03ea8d54f836607468db1ec9399b22d82 Mon Sep 17 00:00:00 2001 From: Marcos Antonio Maceo Reyes Date: Mon, 19 Jun 2023 17:42:49 -0400 Subject: [PATCH 02/27] [debug] error on timestamp --- simulators/ethereum/engine/clmock/clmock.go | 8 ++ simulators/ethereum/engine/helper/core.go | 10 +- simulators/ethereum/engine/main.go | 13 +- .../engine/suites/withdrawals/tests.go | 112 ++++++++++-------- 4 files changed, 90 insertions(+), 53 deletions(-) diff --git a/simulators/ethereum/engine/clmock/clmock.go b/simulators/ethereum/engine/clmock/clmock.go index 0dfa0ed31b..1054586cbb 100644 --- a/simulators/ethereum/engine/clmock/clmock.go +++ b/simulators/ethereum/engine/clmock/clmock.go @@ -108,6 +108,14 @@ type CLMocker struct { } func isShanghai(blockTimestamp uint64, shanghaiTimestamp *big.Int) bool { + tUnix := time.Unix(int64(blockTimestamp), 0) + formattedTime := tUnix.Format("2006-01-02 15:04:05") + fmt.Sprintf("Block timestamp: %v", formattedTime) + + tUnix = time.Unix(shanghaiTimestamp.Int64(), 0) + shangai := tUnix.Format("2006-01-02 15:04:05") + fmt.Sprintf("Shangai Timestamp: %v", shangai) + return shanghaiTimestamp != nil && big.NewInt(int64(blockTimestamp)).Cmp(shanghaiTimestamp) >= 0 } diff --git a/simulators/ethereum/engine/helper/core.go b/simulators/ethereum/engine/helper/core.go index fef8c74dde..1f2daca0f1 100644 --- a/simulators/ethereum/engine/helper/core.go +++ b/simulators/ethereum/engine/helper/core.go @@ -175,11 +175,17 @@ func (n *NethermindChainSpec) Config() *params.ChainConfig { if err != nil { panic(err) } - shangai := big.NewInt(0).SetBytes(common.Hex2Bytes(n.Params.Eip4895TransitionTimestamp)).Uint64() + unixTimestampUint64, err := strconv.ParseUint(n.Params.Eip4895TransitionTimestamp[2:], 16, 64) + if err != nil { + fmt.Println("Error parsing hexadecimal timestamp:", err) + return nil + } + + //shangai := big.NewInt(0).SetBytes(common.Hex2Bytes(n.Params.Eip4895TransitionTimestamp)).Uint64() return ¶ms.ChainConfig{ ChainID: chainID, TerminalTotalDifficulty: big.NewInt(ttd), - ShanghaiTime: &shangai, + ShanghaiTime: &unixTimestampUint64, } } diff --git a/simulators/ethereum/engine/main.go b/simulators/ethereum/engine/main.go index de1bbad589..41a5387b0d 100644 --- a/simulators/ethereum/engine/main.go +++ b/simulators/ethereum/engine/main.go @@ -90,8 +90,19 @@ type ClientGenesis interface { func getTimestamp(spec test.SpecInterface) int64 { now := time.Now() + preShapellaBlock := spec.GetPreShapellaBlockCount() + if preShapellaBlock == 0 { + preShapellaBlock = 1 + } + // Calculate the start of the next 2 minutes - nextMinute := now.Truncate(time.Minute).Add(1 * time.Minute).Add(time.Duration(spec.GetPreShapellaBlockCount()*30) * time.Second) + nextMinute := now.Truncate(time.Minute).Add(time.Duration(preShapellaBlock) * 3 * time.Minute).Add(time.Minute) + // Create a time.Time value from the int64 timestamp + //tUnix := time.Unix(nex, 0) + + // Format the time in a human-readable way + formattedTime := nextMinute.Format("2006-01-02 15:04:05") + fmt.Sprintf("Formatted timestamp: %v\n", formattedTime) // Get the Unix timestamp of the next 2 minutes return nextMinute.Unix() diff --git a/simulators/ethereum/engine/suites/withdrawals/tests.go b/simulators/ethereum/engine/suites/withdrawals/tests.go index 232bc6797e..b98f764588 100644 --- a/simulators/ethereum/engine/suites/withdrawals/tests.go +++ b/simulators/ethereum/engine/suites/withdrawals/tests.go @@ -63,63 +63,63 @@ type WithdrawalsBaseSpec struct { // // List of all withdrawals tests var Tests = []test.SpecInterface{ - // &WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "Withdrawals Fork On Genesis", - // About: ` - // Tests the withdrawals fork happening on block 5 (e.g. on a - // testnet). - // `, - // }, - // WithdrawalsForkHeight: 1, //TODO - // WithdrawalsBlockCount: 2, // Genesis is not a withdrawals block - // WithdrawalsPerBlock: 16, - // TimeIncrements: 5, - // }, - - // &WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "Withdrawals Fork on Block 1", - // About: ` - // Tests the withdrawals fork happening directly after genesis. - // `, - // }, - // WithdrawalsForkHeight: 1, // Only Genesis is Pre-Withdrawals - // WithdrawalsBlockCount: 1, - // WithdrawalsPerBlock: 16, - // }, - // // TODO - // &WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "Withdrawals Fork on Block 5", - // About: ` - // Tests the transition to the withdrawals fork after a single block - // has happened. - // Block 1 is sent with invalid non-null withdrawals payload and - // client is expected to respond with the appropriate error. - // `, - // }, - // WithdrawalsForkHeight: 5, // Genesis and Block 1 are Pre-Withdrawals - // WithdrawalsBlockCount: 1, - // WithdrawalsPerBlock: 16, - // TimeIncrements: 5, - // }, - // TODO + //&WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdrawals Fork On Genesis", + // About: ` + // Tests the withdrawals fork happening on block 5 (e.g. on a + // testnet). + // `, + // }, + // WithdrawalsForkHeight: 1, //TODO + // WithdrawalsBlockCount: 2, // Genesis is not a withdrawals block + // WithdrawalsPerBlock: 16, + // TimeIncrements: 5, + //}, + // + //&WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdrawals Fork on Block 1", + // About: ` + // Tests the withdrawals fork happening directly after genesis. + // `, + // }, + // WithdrawalsForkHeight: 1, // Only Genesis is Pre-Withdrawals + // WithdrawalsBlockCount: 1, + // WithdrawalsPerBlock: 16, + //}, + //// TODO &WithdrawalsBaseSpec{ Spec: test.Spec{ - Name: "Withdrawals Fork on Block 3", + Name: "Withdrawals Fork on Block 5", About: ` - Tests the transition to the withdrawals fork after two blocks - have happened. - Block 2 is sent with invalid non-null withdrawals payload and + Tests the transition to the withdrawals fork after a single block + has happened. + Block 1 is sent with invalid non-null withdrawals payload and client is expected to respond with the appropriate error. `, }, - WithdrawalsForkHeight: 3, // Genesis, Block 1 and 2 are Pre-Withdrawals + WithdrawalsForkHeight: 5, // Genesis and Block 1 are Pre-Withdrawals WithdrawalsBlockCount: 1, WithdrawalsPerBlock: 16, TimeIncrements: 5, }, + // TODO + //&WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdrawals Fork on Block 3", + // About: ` + // Tests the transition to the withdrawals fork after two blocks + // have happened. + // Block 2 is sent with invalid non-null withdrawals payload and + // client is expected to respond with the appropriate error. + // `, + // }, + // WithdrawalsForkHeight: 3, // Genesis, Block 1 and 2 are Pre-Withdrawals + // WithdrawalsBlockCount: 1, + // WithdrawalsPerBlock: 16, + // TimeIncrements: 5, + //}, // &WithdrawalsBaseSpec{ // Spec: test.Spec{ @@ -1090,7 +1090,15 @@ func getTimestamp() int64 { func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { // Create the withdrawals history object ws.WithdrawalsHistory = make(WithdrawalsHistory) - + shangaiTime := *t.Genesis.Config().ShanghaiTime + t.CLMock.ShanghaiTimestamp = big.NewInt(0).SetUint64(shangaiTime) + // Create a time.Time value from the int64 timestamp + tUnix := time.Unix(t.CLMock.ShanghaiTimestamp.Int64(), 0) + + // Format the time in a human-readable way + formattedTime := tUnix.Format("2006-01-02 15:04:05") + // Print shangai timestamp + t.Logf("Shanghai timestamp: %v", formattedTime) t.CLMock.WaitForTTD() r := t.TestEngine.TestBlockByNumber(nil) @@ -1180,7 +1188,11 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { }) if time.Now().Unix() < int64(*t.Genesis.Config().ShanghaiTime) { - time.Sleep(time.Duration((int64(*t.Genesis.Config().ShanghaiTime) - time.Now().Unix()))) + tUnix = time.Unix(t.CLMock.ShanghaiTimestamp.Int64(), 0) + durationUntilFuture := time.Until(tUnix) + if durationUntilFuture > 0 { + time.Sleep(durationUntilFuture) + } } // Produce requested post-shanghai blocks @@ -1432,7 +1444,7 @@ func (ws *WithdrawalsSyncSpec) Execute(t *test.Env) { } // Latest block in both EngineClients should be the same if block1.Number().Uint64() != block2.Number().Uint64() { - t.Fatalf("FAIL (%s): Secondary client is not synced to the same block as the primary client", t.TestName + t.Fatalf("FAIL (%s): Secondary client is not synced to the same block as the primary client", t.TestName) } } From ea7a31c05e7a2628f97e25e594e31060a8c16f22 Mon Sep 17 00:00:00 2001 From: Marcos Antonio Maceo Reyes Date: Tue, 20 Jun 2023 10:40:15 -0400 Subject: [PATCH 03/27] [debug] adding new contract definition for withdrawals --- .../engine/init/nethermind_genesis.json | 6 +- simulators/ethereum/engine/libgno/gno.go | 26 +- .../ethereum/engine/libgno/withdrawals.json | 340 ++++++++-- .../engine/suites/withdrawals/tests.go | 635 +++++++++--------- 4 files changed, 658 insertions(+), 349 deletions(-) diff --git a/simulators/ethereum/engine/init/nethermind_genesis.json b/simulators/ethereum/engine/init/nethermind_genesis.json index 02085cac93..90adc68907 100644 --- a/simulators/ethereum/engine/init/nethermind_genesis.json +++ b/simulators/ethereum/engine/init/nethermind_genesis.json @@ -296,11 +296,11 @@ }, "0xbabe2bed00000000000000000000000000000002": { "balance": "0", - "constructor": "0x60806040523480156200001157600080fd5b50604051620024103803806200241083398101604081905262000034916200037b565b6200003f83620000aa565b620000756040516200005190620001fa565b604051809103906000f0801580156200006e573d6000803e3d6000fd5b5062000146565b81516200008a90600390602085019062000208565b508051620000a090600490602084019062000208565b5050505062000442565b6000620000b6620001db565b90506001600160a01b038216620000cc57600080fd5b816001600160a01b0316816001600160a01b03161415620000ec57600080fd5b600080516020620023d0833981519152829055604080516001600160a01b038084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b6001600160a01b0381166200015a57600080fd5b6001600160a01b0381166200017c600080516020620023f08339815191525490565b6001600160a01b031614156200019157600080fd5b600080516020620023f08339815191528190556040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000620001f5600080516020620023d08339815191525490565b905090565b611af180620008df83390190565b828054620002169062000405565b90600052602060002090601f0160209004810192826200023a576000855562000285565b82601f106200025557805160ff191683800117855562000285565b8280016001018555821562000285579182015b828111156200028557825182559160200191906001019062000268565b506200029392915062000297565b5090565b5b8082111562000293576000815560010162000298565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620002d657600080fd5b81516001600160401b0380821115620002f357620002f3620002ae565b604051601f8301601f19908116603f011681019082821181831017156200031e576200031e620002ae565b816040528381526020925086838588010111156200033b57600080fd5b600091505b838210156200035f578582018301518183018401529082019062000340565b83821115620003715760008385830101525b9695505050505050565b6000806000606084860312156200039157600080fd5b83516001600160a01b0381168114620003a957600080fd5b60208501519093506001600160401b0380821115620003c757600080fd5b620003d587838801620002c4565b93506040860151915080821115620003ec57600080fd5b50620003fb86828701620002c4565b9150509250925092565b600181811c908216806200041a57607f821691505b602082108114156200043c57634e487b7160e01b600052602260045260246000fd5b50919050565b61048d80620004526000396000f3fe60806040526004361061003f5760003560e01c80633659cfe6146100af5780635c60da1b146100d1578063704b6c021461012a578063f851a4401461014a575b60006100697f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff811661008b57600080fd5b3660008037600080366000845af43d6000803e8080156100aa573d6000f35b3d6000fd5b3480156100bb57600080fd5b506100cf6100ca36600461041a565b61015f565b005b3480156100dd57600080fd5b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b34801561013657600080fd5b506100cf61014536600461041a565b6101c4565b34801561015657600080fd5b50610101610226565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101b857600080fd5b6101c181610255565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461021d57600080fd5b6101c18161033d565b60006102507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b73ffffffffffffffffffffffffffffffffffffffff811661027557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166102b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b73ffffffffffffffffffffffffffffffffffffffff1614156102d557600080fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000610347610226565b905073ffffffffffffffffffffffffffffffffffffffff821661036957600080fd5b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103a257600080fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038290556040805173ffffffffffffffffffffffffffffffffffffffff8084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b60006020828403121561042c57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461045057600080fd5b939250505056fea2646970667358221220d30683a8194480eba778aea87b3fdfe3e4c8e6ec3da161d7a16b56667b1372a964736f6c6343000809003360806040523480156200001157600080fd5b506040805160208082018084526000808452845192830190945292815281519192909162000042916003916200006b565b508051620000589060049060208401906200006b565b50506005805460ff19169055506200014e565b828054620000799062000111565b90600052602060002090601f0160209004810192826200009d5760008555620000e8565b82601f10620000b857805160ff1916838001178555620000e8565b82800160010185558215620000e8579182015b82811115620000e8578251825591602001919060010190620000cb565b50620000f6929150620000fa565b5090565b5b80821115620000f65760008155600101620000fb565b600181811c908216806200012657607f821691505b602082108114156200014857634e487b7160e01b600052602260045260246000fd5b50919050565b611993806200015e6000396000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c80635c975abb116100cd5780639dc29fac11610081578063a9059cbb11610066578063a9059cbb14610298578063dd62ed3e146102ab578063fca3b5aa146102f157600080fd5b80639dc29fac14610272578063a457c2d71461028557600080fd5b806370a08231116100b257806370a082311461022c5780638456cb591461026257806395d89b411461026a57600080fd5b80635c975abb1461020e57806369ffa08a1461021957600080fd5b8063313ce567116101245780633f4ba83a116101095780633f4ba83a146101de5780634000aea0146101e857806340c10f19146101fb57600080fd5b8063313ce567146101bc57806339509351146101cb57600080fd5b806306fdde0314610156578063095ea7b31461017457806318160ddd1461019757806323b872dd146101a9575b600080fd5b61015e610304565b60405161016b9190611621565b60405180910390f35b6101876101823660046116bd565b610396565b604051901515815260200161016b565b6002545b60405190815260200161016b565b6101876101b73660046116e7565b6103ac565b6040516012815260200161016b565b6101876101d93660046116bd565b610497565b6101e66104e0565b005b6101e66101f6366004611723565b610543565b6101e66102093660046116bd565b610666565b60055460ff16610187565b6101e66102273660046117aa565b610710565b61019b61023a3660046117dd565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6101e6610773565b61015e6107d4565b6101e66102803660046116bd565b6107e3565b6101876102933660046116bd565b610889565b6101876102a63660046116bd565b610961565b61019b6102b93660046117aa565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6101e66102ff3660046117dd565b61096e565b606060038054610313906117ff565b80601f016020809104026020016040519081016040528092919081815260200182805461033f906117ff565b801561038c5780601f106103615761010080835404028352916020019161038c565b820191906000526020600020905b81548152906001019060200180831161036f57829003601f168201915b5050505050905090565b60006103a3338484610a98565b50600192915050565b60006103b9848484610c4c565b73ffffffffffffffffffffffffffffffffffffffff841660009081526001602090815260408083203384529091529020548281101561047f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61048c8533858403610a98565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490916103a39185906104db908690611882565b610a98565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461053957600080fd5b610541610f0c565b565b3361054f818686610c4c565b6040517fa4c0ed3600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86169063a4c0ed36906105a790849088908890889060040161189a565b602060405180830381600087803b1580156105c157600080fd5b505af11580156105d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f9919061190b565b61065f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f534243546f6b656e3a204552433637372063616c6c6261636b206661696c65646044820152606401610476565b5050505050565b600554610100900473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610702576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f534243546f6b656e3a206e6f742061206d696e746572000000000000000000006044820152606401610476565b61070c8282610fed565b5050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461076957600080fd5b61070c8282611119565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107cc57600080fd5b610541611147565b606060048054610313906117ff565b600554610100900473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461087f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f534243546f6b656e3a206e6f742061206d696e746572000000000000000000006044820152606401610476565b61070c8282611207565b33600090815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff861684529091528120548281101561094a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610476565b6109573385858403610a98565b5060019392505050565b60006103a3338484610c4c565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c757600080fd5b600554610100900473ffffffffffffffffffffffffffffffffffffffff1615610a4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f534243546f6b656e3a206d696e74657220616c726561647920736574000000006044820152606401610476565b6005805473ffffffffffffffffffffffffffffffffffffffff909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b73ffffffffffffffffffffffffffffffffffffffff8316610b3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610476565b73ffffffffffffffffffffffffffffffffffffffff8216610bdd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610476565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316610cef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610476565b73ffffffffffffffffffffffffffffffffffffffff8216610d92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610476565b610d9d8383836113fd565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610e53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610476565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220858503905591851681529081208054849290610e97908490611882565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efd91815260200190565b60405180910390a35b50505050565b60055460ff16610f78576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610476565b600580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b73ffffffffffffffffffffffffffffffffffffffff821661106a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610476565b611076600083836113fd565b80600260008282546110889190611882565b909155505073ffffffffffffffffffffffffffffffffffffffff8216600090815260208190526040812080548392906110c2908490611882565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b73ffffffffffffffffffffffffffffffffffffffff821661113d5761070c81611490565b61070c82826114d5565b60055460ff16156111b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610476565b600580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fc33390565b73ffffffffffffffffffffffffffffffffffffffff82166112aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610476565b6112b6826000836113fd565b73ffffffffffffffffffffffffffffffffffffffff82166000908152602081905260409020548181101561136c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610476565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604081208383039055600280548492906113a890849061192d565b909155505060405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610c3f565b505050565b60055460ff16156113f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e7366657220776860448201527f696c6520706175736564000000000000000000000000000000000000000000006064820152608401610476565b604051479073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156113f8573d6000803e3d6000fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8416906370a082319060240160206040518083038186803b15801561153d57600080fd5b505afa158015611551573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115759190611944565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390529192509084169063a9059cbb90604401602060405180830381600087803b1580156115e957600080fd5b505af11580156115fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f06919061190b565b600060208083528351808285015260005b8181101561164e57858101830151858201604001528201611632565b81811115611660576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146116b857600080fd5b919050565b600080604083850312156116d057600080fd5b6116d983611694565b946020939093013593505050565b6000806000606084860312156116fc57600080fd5b61170584611694565b925061171360208501611694565b9150604084013590509250925092565b6000806000806060858703121561173957600080fd5b61174285611694565b935060208501359250604085013567ffffffffffffffff8082111561176657600080fd5b818701915087601f83011261177a57600080fd5b81358181111561178957600080fd5b88602082850101111561179b57600080fd5b95989497505060200194505050565b600080604083850312156117bd57600080fd5b6117c683611694565b91506117d460208401611694565b90509250929050565b6000602082840312156117ef57600080fd5b6117f882611694565b9392505050565b600181811c9082168061181357607f821691505b6020821081141561184d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561189557611895611853565b500190565b73ffffffffffffffffffffffffffffffffffffffff8516815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01601019392505050565b60006020828403121561191d57600080fd5b815180151581146117f857600080fd5b60008282101561193f5761193f611853565b500390565b60006020828403121561195657600080fd5b505191905056fea2646970667358221220563bbbc3c806a59db76f46ea4a0528959d097d2db2b4e819dc578496610174d964736f6c63430008090033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc000000000000000000000000face2face0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000095374616b6520474e4f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003474e4f0000000000000000000000000000000000000000000000000000000000" + "constructor": "0x60806040523480156200001157600080fd5b5060405162001b8538038062001b8583398101604081905262000034916200037b565b6200003f83620000aa565b620000756040516200005190620001fa565b604051809103906000f0801580156200006e573d6000803e3d6000fd5b5062000146565b81516200008a90600390602085019062000208565b508051620000a090600490602084019062000208565b5050505062000442565b6000620000b6620001db565b90506001600160a01b038216620000cc57600080fd5b816001600160a01b0316816001600160a01b03161415620000ec57600080fd5b60008051602062001b45833981519152829055604080516001600160a01b038084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b6001600160a01b0381166200015a57600080fd5b6001600160a01b0381166200017c60008051602062001b658339815191525490565b6001600160a01b031614156200019157600080fd5b60008051602062001b658339815191528190556040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000620001f560008051602062001b458339815191525490565b905090565b61126680620008df83390190565b828054620002169062000405565b90600052602060002090601f0160209004810192826200023a576000855562000285565b82601f106200025557805160ff191683800117855562000285565b8280016001018555821562000285579182015b828111156200028557825182559160200191906001019062000268565b506200029392915062000297565b5090565b5b8082111562000293576000815560010162000298565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620002d657600080fd5b81516001600160401b0380821115620002f357620002f3620002ae565b604051601f8301601f19908116603f011681019082821181831017156200031e576200031e620002ae565b816040528381526020925086838588010111156200033b57600080fd5b600091505b838210156200035f578582018301518183018401529082019062000340565b83821115620003715760008385830101525b9695505050505050565b6000806000606084860312156200039157600080fd5b83516001600160a01b0381168114620003a957600080fd5b60208501519093506001600160401b0380821115620003c757600080fd5b620003d587838801620002c4565b93506040860151915080821115620003ec57600080fd5b50620003fb86828701620002c4565b9150509250925092565b600181811c908216806200041a57607f821691505b602082108114156200043c57634e487b7160e01b600052602260045260246000fd5b50919050565b61048d80620004526000396000f3fe60806040526004361061003f5760003560e01c80633659cfe6146100af5780635c60da1b146100d1578063704b6c021461012a578063f851a4401461014a575b60006100697f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff811661008b57600080fd5b3660008037600080366000845af43d6000803e8080156100aa573d6000f35b3d6000fd5b3480156100bb57600080fd5b506100cf6100ca36600461041a565b61015f565b005b3480156100dd57600080fd5b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b34801561013657600080fd5b506100cf61014536600461041a565b6101c4565b34801561015657600080fd5b50610101610226565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101b857600080fd5b6101c181610255565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461021d57600080fd5b6101c18161033d565b60006102507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b73ffffffffffffffffffffffffffffffffffffffff811661027557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166102b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b73ffffffffffffffffffffffffffffffffffffffff1614156102d557600080fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000610347610226565b905073ffffffffffffffffffffffffffffffffffffffff821661036957600080fd5b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103a257600080fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038290556040805173ffffffffffffffffffffffffffffffffffffffff8084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b60006020828403121561042c57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461045057600080fd5b939250505056fea264697066735822122097d86ab3fc05dd7aa2fa954f94bcb5b52cb229c19b25b78b4c717732b858440e64736f6c6343000809003360806040523480156200001157600080fd5b506040805160208082018084526000808452845192830190945292815281519192909162000042916003916200006b565b508051620000589060049060208401906200006b565b50506005805460ff19169055506200014e565b828054620000799062000111565b90600052602060002090601f0160209004810192826200009d5760008555620000e8565b82601f10620000b857805160ff1916838001178555620000e8565b82800160010185558215620000e8579182015b82811115620000e8578251825591602001919060010190620000cb565b50620000f6929150620000fa565b5090565b5b80821115620000f65760008155600101620000fb565b600181811c908216806200012657607f821691505b602082108114156200014857634e487b7160e01b600052602260045260246000fd5b50919050565b611108806200015e6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80635c975abb11610097578063a457c2d711610066578063a457c2d7146101fb578063a9059cbb1461020e578063dd62ed3e14610221578063f0df89e41461026757600080fd5b80635c975abb146101aa57806370a08231146101b55780638456cb59146101eb57806395d89b41146101f357600080fd5b8063313ce567116100d3578063313ce5671461016b578063395093511461017a5780633f4ba83a1461018d57806340c10f191461019757600080fd5b806306fdde0314610105578063095ea7b31461012357806318160ddd1461014657806323b872dd14610158575b600080fd5b61010d61027a565b60405161011a9190610ee8565b60405180910390f35b610136610131366004610f84565b61030c565b604051901515815260200161011a565b6002545b60405190815260200161011a565b610136610166366004610fae565b610322565b6040516012815260200161011a565b610136610188366004610f84565b61040d565b610195610456565b005b6101956101a5366004610f84565b6104b9565b60055460ff16610136565b61014a6101c3366004610fea565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b610195610520565b61010d610581565b610136610209366004610f84565b610590565b61013661021c366004610f84565b610668565b61014a61022f36600461100c565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b610195610275366004610f84565b610675565b6060600380546102899061103f565b80601f01602080910402602001604051908101604052809291908181526020018280546102b59061103f565b80156103025780601f106102d757610100808354040283529160200191610302565b820191906000526020600020905b8154815290600101906020018083116102e557829003601f168201915b5050505050905090565b6000610319338484610716565b50600192915050565b600061032f8484846108c9565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600160209081526040808320338452909152902054828110156103f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104028533858403610716565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091610319918590610451908690611093565b610716565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104af57600080fd5b6104b7610b88565b565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461051257600080fd5b61051c8282610c69565b5050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461057957600080fd5b6104b7610d95565b6060600480546102899061103f565b33600090815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281205482811015610651576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016103ec565b61065e3385858403610716565b5060019392505050565b60006103193384846108c9565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106ce57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260208190526040902054808211156107025780610704565b815b91506107118333846108c9565b505050565b73ffffffffffffffffffffffffffffffffffffffff83166107b8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016103ec565b73ffffffffffffffffffffffffffffffffffffffff821661085b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016103ec565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff831661096c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016103ec565b73ffffffffffffffffffffffffffffffffffffffff8216610a0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016103ec565b610a1a838383610e55565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610ad0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016103ec565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220858503905591851681529081208054849290610b14908490611093565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b7a91815260200190565b60405180910390a350505050565b60055460ff16610bf4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016103ec565b600580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b73ffffffffffffffffffffffffffffffffffffffff8216610ce6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016103ec565b610cf260008383610e55565b8060026000828254610d049190611093565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604081208054839290610d3e908490611093565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60055460ff1615610e02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016103ec565b600580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610c3f3390565b60055460ff1615610711576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e7366657220776860448201527f696c65207061757365640000000000000000000000000000000000000000000060648201526084016103ec565b600060208083528351808285015260005b81811015610f1557858101830151858201604001528201610ef9565b81811115610f27576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610f7f57600080fd5b919050565b60008060408385031215610f9757600080fd5b610fa083610f5b565b946020939093013593505050565b600080600060608486031215610fc357600080fd5b610fcc84610f5b565b9250610fda60208501610f5b565b9150604084013590509250925092565b600060208284031215610ffc57600080fd5b61100582610f5b565b9392505050565b6000806040838503121561101f57600080fd5b61102883610f5b565b915061103660208401610f5b565b90509250929050565b600181811c9082168061105357607f821691505b6020821081141561108d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082198211156110cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea2646970667358221220954a8093073e898b5a05c67a8a02accb8510a2022bd5292bd33dd875db9f954664736f6c63430008090033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc000000000000000000000000face2face0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000095374616b6520474e4f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003474e4f0000000000000000000000000000000000000000000000000000000000" }, "0xbabe2bed00000000000000000000000000000003": { "balance": "0", - "constructor": "0x60806040523480156200001157600080fd5b5060405162004c7c38038062004c7c8339810160408190526200003491620002fe565b6200003f8262000183565b62000086816040516200005290620002d3565b6001600160a01b039091168152602001604051809103906000f0801580156200007f573d6000803e3d6000fd5b506200021f565b60005b62000097600160206200034c565b8110156200017a57600260018260208110620000b757620000b762000366565b015460018360208110620000cf57620000cf62000366565b015460408051602081019390935282015260600160408051601f1981840301815290829052620000ff916200037c565b602060405180830381855afa1580156200011d573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190620001429190620003ba565b6001620001508382620003d4565b6020811062000163576200016362000366565b0155806200017181620003ef565b91505062000089565b5050506200040d565b60006200018f620002b4565b90506001600160a01b038216620001a557600080fd5b816001600160a01b0316816001600160a01b03161415620001c557600080fd5b60008051602062004c3c833981519152829055604080516001600160a01b038084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b6001600160a01b0381166200023357600080fd5b6001600160a01b0381166200025560008051602062004c5c8339815191525490565b6001600160a01b031614156200026a57600080fd5b60008051602062004c5c8339815191528190556040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000620002ce60008051602062004c3c8339815191525490565b905090565b61439280620008aa83390190565b80516001600160a01b0381168114620002f957600080fd5b919050565b600080604083850312156200031257600080fd5b6200031d83620002e1565b91506200032d60208401620002e1565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b60008282101562000361576200036162000336565b500390565b634e487b7160e01b600052603260045260246000fd5b6000825160005b818110156200039f576020818601810151858301520162000383565b81811115620003af576000828501525b509190910192915050565b600060208284031215620003cd57600080fd5b5051919050565b60008219821115620003ea57620003ea62000336565b500190565b600060001982141562000406576200040662000336565b5060010190565b61048d806200041d6000396000f3fe60806040526004361061003f5760003560e01c80633659cfe6146100af5780635c60da1b146100d1578063704b6c021461012a578063f851a4401461014a575b60006100697f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff811661008b57600080fd5b3660008037600080366000845af43d6000803e8080156100aa573d6000f35b3d6000fd5b3480156100bb57600080fd5b506100cf6100ca36600461041a565b61015f565b005b3480156100dd57600080fd5b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b34801561013657600080fd5b506100cf61014536600461041a565b6101c4565b34801561015657600080fd5b50610101610226565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101b857600080fd5b6101c181610255565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461021d57600080fd5b6101c18161033d565b60006102507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b73ffffffffffffffffffffffffffffffffffffffff811661027557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166102b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b73ffffffffffffffffffffffffffffffffffffffff1614156102d557600080fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000610347610226565b905073ffffffffffffffffffffffffffffffffffffffff821661036957600080fd5b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103a257600080fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038290556040805173ffffffffffffffffffffffffffffffffffffffff8084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b60006020828403121561042c57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461045057600080fd5b939250505056fea2646970667358221220cd8557b89672de378c0a3716455ea9f51d6646f77ee588078091acf1ec23b9f264736f6c6343000809003360a06040523480156200001157600080fd5b506040516200439238038062004392833981016040819052620000349162000050565b6000805460ff191690556001600160a01b031660805262000082565b6000602082840312156200006357600080fd5b81516001600160a01b03811681146200007b57600080fd5b9392505050565b6080516142ca620000c8600039600081816102560152818161053301528181610682015281816107b601528181610de2015281816113540152611fb801526142ca6000f3fe608060405234801561001057600080fd5b506004361061016c5760003560e01c8063640415bf116100cd578063a4c0ed3611610081578063b6921e5711610066578063b6921e5714610373578063c5f2892f14610386578063c82655b71461038e57600080fd5b8063a4c0ed3614610357578063b2e2e2e41461036a57600080fd5b8063785e9d82116100b2578063785e9d82146102b057806379d0c0bc1461033c5780638456cb591461034f57600080fd5b8063640415bf1461025157806369ffa08a1461029d57600080fd5b80634128c37f116101245780635bf207d2116101095780635bf207d21461021e5780635c975abb14610231578063621fd1301461023c57600080fd5b80634128c37f146102025780634694bd1e1461020b57600080fd5b80631b9672a2116101555780631b9672a2146101ae57806324db4c46146101c15780633f4ba83a146101fa57600080fd5b806301ffc9a7146101715780630cac9f3114610199575b600080fd5b61018461017f366004613786565b6103a1565b60405190151581526020015b60405180910390f35b6101ac6101a73660046138a2565b610486565b005b6101ac6101bc366004613961565b6105d9565b6101ec6101cf366004613991565b805160208183018101805160428252928201919093012091525481565b604051908152602001610190565b6101ac6106ad565b6101ec60465481565b6101ac6102193660046139c6565b610710565b6101ac61022c3660046139f4565b6108db565b60005460ff16610184565b610244610d5e565b6040516101909190613a8c565b6102787f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610190565b6101ac6102ab3660046139c6565b610d70565b61030a6102be366004613a9f565b6043602052600090815260409020805460019091015473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000900460ff1683565b6040805193845273ffffffffffffffffffffffffffffffffffffffff9092166020840152151590820152606001610190565b6101ac61034a366004613b04565b610eaf565b6101ac61126d565b610184610365366004613bc0565b6112ce565b6101ec60445481565b6101ac610381366004613a9f565b6117ea565b6101ec611a1b565b6101ac61039c366004613c1c565b611c4a565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000148061043457507fffffffff0000000000000000000000000000000000000000000000000000000082167fab41c72e00000000000000000000000000000000000000000000000000000000145b8061048057507fffffffff0000000000000000000000000000000000000000000000000000000082167fa4c0ed3600000000000000000000000000000000000000000000000000000000145b92915050565b60005460ff16156104f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064015b60405180910390fd5b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906323b872dd90606401602060405180830381600087803b15801561058c57600080fd5b505af11580156105a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c49190613ce0565b506105d28585858585612200565b5050505050565b333014610668576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53686f756c642062652075736564206f6e6c7920617320616e20696e7465726e60448201527f616c2063616c6c0000000000000000000000000000000000000000000000000060648201526084016104ef565b6106a973ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168284612d6b565b5050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461070657600080fd5b61070e612df8565b565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461076957600080fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff808416916339f47693917f000000000000000000000000000000000000000000000000000000000000000091908516906370a082319060240160206040518083038186803b1580156107fb57600080fd5b505afa15801561080f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108339190613d02565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401602060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d69190613d02565b505050565b60455460ff161561096e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4661696c6564207769746864726177616c2070726f63657373696e672072656560448201527f6e7472616e63790000000000000000000000000000000000000000000000000060648201526084016104ef565b604580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556109a560005460ff1690565b15610a0c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016104ef565b6044548210610a77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4661696c6564207769746864726177616c20646f206e6f74206578697374000060448201526064016104ef565b6000828152604360205260409020600181015474010000000000000000000000000000000000000000900460ff1615610b32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4661696c6564207769746864726177616c20616c72656164792070726f63657360448201527f736564000000000000000000000000000000000000000000000000000000000060648201526084016104ef565b8054600182015473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610be0578215610be0578154831115610bdd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f496e76616c696420616d6f756e74206f6620746f6b656e73000000000000000060448201526064016104ef565b50815b6001820154600090610c0a90839073ffffffffffffffffffffffffffffffffffffffff165a612ed9565b905080610c73576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f5769746864726177616c2070726f63657373696e67206661696c65640000000060448201526064016104ef565b8254821415610cc2576001830180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055610cdc565b81836000016000828254610cd69190613d4a565b90915550505b600183015460405183815273ffffffffffffffffffffffffffffffffffffffff9091169086907fda9bca779c8daa1afe6276c06a257cd29407c63071f34752a3e60ae2eb0b9a749060200160405180910390a35050604580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055505050565b6060610d6b604154612f97565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610dc957600080fd5b8173ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff161415610ea5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f4465706f736974436f6e74726163743a206e6f7420616c6c6f77656420746f2060448201527f636c61696d206465706f73697420746f6b656e0000000000000000000000000060648201526084016104ef565b6106a9828261320b565b3373fffffffffffffffffffffffffffffffffffffffe1480610f1d57507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610fcf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604d60248201527f546869732066756e6374696f6e2073686f756c642062652063616c6c6564206f60448201527f6e6c792062792053595354454d5f5749544844524157414c5f4558454355544f60648201527f52206f72205f61646d696e282900000000000000000000000000000000000000608482015260a4016104ef565b828114610fde57610fde613d61565b610fe7856117ea565b60005b83811015611265576000602086868481811061100857611008613d90565b905060200201602081019061101d9190613dbf565b6110359067ffffffffffffffff16633b9aca00613de9565b61103f9190613e55565b905060006110778286868681811061105957611059613d90565b905060200201602081019061106e9190613e69565b620493e0612ed9565b905080156110fa5784848481811061109157611091613d90565b90506020020160208101906110a69190613e69565b73ffffffffffffffffffffffffffffffffffffffff167f9452d804f13d53051e31272fcec2ebf4fff15c50b9eb1955729f71160bd8348e836040516110ed91815260200190565b60405180910390a2611252565b604051806060016040528083815260200186868681811061111d5761111d613d90565b90506020020160208101906111329190613e69565b73ffffffffffffffffffffffffffffffffffffffff908116825260006020928301819052604454815260438352604090819020845181559284015160019390930180549490910151151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00000000000000000000000000000000000000000090941692909116919091179190911790558484848181106111d7576111d7613d90565b90506020020160208101906111ec9190613e69565b73ffffffffffffffffffffffffffffffffffffffff166044547fd2a7dbbcc8a1cbd56c19ce98f8d93887ea9a92593a78fa1ad96971c15294d0ae8460405161123691815260200190565b60405180910390a360446000815461124d90613e86565b909155505b50508061125e90613e86565b9050610fea565b505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146112c657600080fd5b61070e613239565b6000805460ff161561133c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016104ef565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611400576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4465706f736974436f6e74726163743a206e6f742061206465706f736974207460448201527f6f6b656e0000000000000000000000000000000000000000000000000000000060648201526084016104ef565b61140b60b083613ebf565b60201461149a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f4465706f736974436f6e74726163743a20696e636f7272656374206465706f7360448201527f69742064617461206c656e67746800000000000000000000000000000000000060648201526084016104ef565b60006114a760b084613e55565b905060008111611539576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f42617463684465706f7369743a20596f752073686f756c64206465706f73697460448201527f206174206c65617374206f6e652076616c696461746f7200000000000000000060648201526084016104ef565b84600182111561167f5760808211156115d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f42617463684465706f7369743a20596f752063616e206465706f736974206d6160448201527f78203132382076616c696461746f727320617420612074696d6500000000000060648201526084016104ef565b6115e682670de0b6b3a7640000613de9565b8614611674576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f42617463684465706f7369743a206261746368206465706f736974732072657160448201527f75697265203120474e4f206465706f73697420616d6f756e740000000000000060648201526084016104ef565b50670de0b6b3a76400005b600061168e6020828789613ed3565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293506020925050505b858110156117db5760008782886116e1826030613efd565b926116ee93929190613ed3565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509394508b92508a91506117349050856030613efd565b90611740866090613efd565b9261174d93929190613ed3565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509394508c92508b91506117939050866090613efd565b9061179f8760b0613efd565b926117ac93929190613ed3565b6117b591613f15565b90506117c4838684848a612200565b50505060b0816117d49190613efd565b90506116c9565b50600198975050505050505050565b60455460ff161561187d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4661696c6564207769746864726177616c2070726f63657373696e672072656560448201527f6e7472616e63790000000000000000000000000000000000000000000000000060648201526084016104ef565b604580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905560005b818110156119ef5760445460465414156118c4576119ef565b6046546000908152604360205260409020600181015474010000000000000000000000000000000000000000900460ff166119ca57805460018201546000916119269173ffffffffffffffffffffffffffffffffffffffff16620493e0612ed9565b9050806119345750506119ef565b600182018054740100000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff821617909155604654835460405190815273ffffffffffffffffffffffffffffffffffffffff909216917fda9bca779c8daa1afe6276c06a257cd29407c63071f34752a3e60ae2eb0b9a749060200160405180910390a3505b6046600081546119d990613e86565b909155506119e8905081613e86565b90506118ab565b5050604580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6041546000908190815b6020811015611ba8578160011660011415611ae457600260218260208110611a4f57611a4f613d90565b01546040805160208101929092528101859052606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052611a9d91613f51565b602060405180830381855afa158015611aba573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611add9190613d02565b9250611b89565b60028360018360208110611afa57611afa613d90565b0154604080516020810193909352820152606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052611b4691613f51565b602060405180830381855afa158015611b63573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611b869190613d02565b92505b611b94600283613e55565b915080611ba081613e86565b915050611a25565b50600282611bb7604154612f97565b604051611bcb929190600090602001613f6d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052611c0391613f51565b602060405180830381855afa158015611c20573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611c439190613d02565b9250505090565b60005460ff1615611cb7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016104ef565b8080611d45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f42617463684465706f7369743a20596f752073686f756c64206465706f73697460448201527f206174206c65617374206f6e652076616c696461746f7200000000000000000060648201526084016104ef565b6080811115611dd6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f42617463684465706f7369743a20596f752063616e206465706f736974206d6160448201527f78203132382076616c696461746f727320617420612074696d6500000000000060648201526084016104ef565b611de1816030613de9565b8814611e6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f42617463684465706f7369743a205075626b657920636f756e7420646f6e277460448201527f206d61746368000000000000000000000000000000000000000000000000000060648201526084016104ef565b611e7a816060613de9565b8414611f08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f42617463684465706f7369743a205369676e61747572657320636f756e74206460448201527f6f6e2774206d617463680000000000000000000000000000000000000000000060648201526084016104ef565b60208614611f98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f42617463684465706f7369743a205769746864726177616c2043726564656e7460448201527f69616c7320636f756e7420646f6e2774206d617463680000000000000000000060648201526084016104ef565b670de0b6b3a764000073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166323b872dd3330611fe98686613de9565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff93841660048201529290911660248301526044820152606401602060405180830381600087803b15801561205d57600080fd5b505af1158015612071573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120959190613ce0565b5060005b828110156121f35760008b8b6120b0846030613de9565b906120bc856001613efd565b6120c7906030613de9565b926120d493929190613ed3565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509394508b92508a915061211a9050856060613de9565b90612126866001613efd565b612131906060613de9565b9261213e93929190613ed3565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090506121e0828c8c8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508692508c91508b9050888181106121d3576121d3613d90565b9050602002013588612200565b5050806121ec90613e86565b9050612099565b5050505050505050505050565b61220b816020613de9565b9050845160301461229e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4465706f736974436f6e74726163743a20696e76616c6964207075626b65792060448201527f6c656e677468000000000000000000000000000000000000000000000000000060648201526084016104ef565b835160201461232f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f4465706f736974436f6e74726163743a20696e76616c6964207769746864726160448201527f77616c5f63726564656e7469616c73206c656e6774680000000000000000000060648201526084016104ef565b82516060146123c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4465706f736974436f6e74726163743a20696e76616c6964207369676e61747560448201527f7265206c656e677468000000000000000000000000000000000000000000000060648201526084016104ef565b670de0b6b3a7640000811015612458576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4465706f736974436f6e74726163743a206465706f7369742076616c7565207460448201527f6f6f206c6f77000000000000000000000000000000000000000000000000000060648201526084016104ef565b612466633b9aca0082613ebf565b156124f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f4465706f736974436f6e74726163743a206465706f7369742076616c7565206e60448201527f6f74206d756c7469706c65206f6620677765690000000000000000000000000060648201526084016104ef565b6000612503633b9aca0083613e55565b905067ffffffffffffffff81111561259d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4465706f736974436f6e74726163743a206465706f7369742076616c7565207460448201527f6f6f20686967680000000000000000000000000000000000000000000000000060648201526084016104ef565b60006042876040516125af9190613f51565b908152604051602091819003820190205490870151909150816125f257806042896040516125dd9190613f51565b90815260405190819003602001902055612681565b808214612681576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4465706f736974436f6e74726163743a20696e76616c6964207769746864726160448201527f77616c5f63726564656e7469616c73000000000000000000000000000000000060648201526084016104ef565b600061268c84612f97565b90507f649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c58989838a6126be604154612f97565b6040516126cf959493929190613fc1565b60405180910390a1600060028a600060801b6040516020016126f292919061402e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261272a91613f51565b602060405180830381855afa158015612747573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061276a9190613d02565b90506000888060200190518101906127829190614075565b905060006002808383602002015184600160200201516040516020016127b2929190918252602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526127ea91613f51565b602060405180830381855afa158015612807573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061282a9190613d02565b6040848101518151602081019190915260008183015281518082038301815260609091019182905260029161285f9190613f51565b602060405180830381855afa15801561287c573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061289f9190613d02565b604080516020810193909352820152606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526128e991613f51565b602060405180830381855afa158015612906573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906129299190613d02565b90506000600280858e6040516020016129439291906140f3565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261297b91613f51565b602060405180830381855afa158015612998573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906129bb9190613d02565b6040516002906129d49089906000908890602001614119565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052612a0c91613f51565b602060405180830381855afa158015612a29573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190612a4c9190613d02565b604080516020810193909352820152606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052612a9691613f51565b602060405180830381855afa158015612ab3573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190612ad69190613d02565b9050898114612b8d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605460248201527f4465706f736974436f6e74726163743a207265636f6e7374727563746564204460448201527f65706f7369744461746120646f6573206e6f74206d6174636820737570706c6960648201527f6564206465706f7369745f646174615f726f6f74000000000000000000000000608482015260a4016104ef565b6001612b9b60206002614288565b612ba59190613d4a565b60415410612c35576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4465706f736974436f6e74726163743a206d65726b6c6520747265652066756c60448201527f6c0000000000000000000000000000000000000000000000000000000000000060648201526084016104ef565b600160416000828254612c489190613efd565b909155505060415460005b6020811015612d52578160011660011415612c8e578260218260208110612c7c57612c7c613d90565b0155506105d298505050505050505050565b600260218260208110612ca357612ca3613d90565b01546040805160208101929092528101859052606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052612cf191613f51565b602060405180830381855afa158015612d0e573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190612d319190613d02565b9250612d3e600283613e55565b915080612d4a81613e86565b915050612c53565b50612d5b613d61565b5050505050505050505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526108d69084906132f9565b60005460ff16612e64576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016104ef565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b600073ffffffffffffffffffffffffffffffffffffffff8316612efe57506001612f90565b6040517f1b9672a20000000000000000000000000000000000000000000000000000000081526004810185905273ffffffffffffffffffffffffffffffffffffffff841660248201523090631b9672a2908490604401600060405180830381600088803b158015612f6e57600080fd5b5087f193505050508015612f80575060015b612f8c57506000612f90565b5060015b9392505050565b60408051600880825281830190925260609160208201818036833701905050905060c082901b8060071a60f81b82600081518110612fd757612fd7613d90565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060061a60f81b8260018151811061302057613020613d90565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060051a60f81b8260028151811061306957613069613d90565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060041a60f81b826003815181106130b2576130b2613d90565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060031a60f81b826004815181106130fb576130fb613d90565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060021a60f81b8260058151811061314457613144613d90565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060011a60f81b8260068151811061318d5761318d613d90565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060001a60f81b826007815181106131d6576131d6613d90565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050919050565b73ffffffffffffffffffffffffffffffffffffffff821661322f576106a981613405565b6106a9828261344a565b60005460ff16156132a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016104ef565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612eaf3390565b600061335b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661359c9092919063ffffffff16565b8051909150156108d657808060200190518101906133799190613ce0565b6108d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104ef565b604051479073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156108d6573d6000803e3d6000fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8416906370a082319060240160206040518083038186803b1580156134b257600080fd5b505afa1580156134c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134ea9190613d02565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390529192509084169063a9059cbb90604401602060405180830381600087803b15801561355e57600080fd5b505af1158015613572573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135969190613ce0565b50505050565b60606135ab84846000856135b3565b949350505050565b606082471015613645576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104ef565b843b6136ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104ef565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516136d69190613f51565b60006040518083038185875af1925050503d8060008114613713576040519150601f19603f3d011682016040523d82523d6000602084013e613718565b606091505b5091509150613728828286613733565b979650505050505050565b60608315613742575081612f90565b8251156137525782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ef9190613a8c565b60006020828403121561379857600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612f9057600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261380857600080fd5b813567ffffffffffffffff80821115613823576138236137c8565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715613869576138696137c8565b8160405283815286602085880101111561388257600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a086880312156138ba57600080fd5b853567ffffffffffffffff808211156138d257600080fd5b6138de89838a016137f7565b965060208801359150808211156138f457600080fd5b61390089838a016137f7565b9550604088013591508082111561391657600080fd5b50613923888289016137f7565b9598949750949560608101359550608001359392505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461395e57600080fd5b50565b6000806040838503121561397457600080fd5b8235915060208301356139868161393c565b809150509250929050565b6000602082840312156139a357600080fd5b813567ffffffffffffffff8111156139ba57600080fd5b6135ab848285016137f7565b600080604083850312156139d957600080fd5b82356139e48161393c565b915060208301356139868161393c565b60008060408385031215613a0757600080fd5b50508035926020909101359150565b60005b83811015613a31578181015183820152602001613a19565b838111156135965750506000910152565b60008151808452613a5a816020860160208601613a16565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612f906020830184613a42565b600060208284031215613ab157600080fd5b5035919050565b60008083601f840112613aca57600080fd5b50813567ffffffffffffffff811115613ae257600080fd5b6020830191508360208260051b8501011115613afd57600080fd5b9250929050565b600080600080600060608688031215613b1c57600080fd5b85359450602086013567ffffffffffffffff80821115613b3b57600080fd5b613b4789838a01613ab8565b90965094506040880135915080821115613b6057600080fd5b50613b6d88828901613ab8565b969995985093965092949392505050565b60008083601f840112613b9057600080fd5b50813567ffffffffffffffff811115613ba857600080fd5b602083019150836020828501011115613afd57600080fd5b60008060008060608587031215613bd657600080fd5b8435613be18161393c565b935060208501359250604085013567ffffffffffffffff811115613c0457600080fd5b613c1087828801613b7e565b95989497509550505050565b6000806000806000806000806080898b031215613c3857600080fd5b883567ffffffffffffffff80821115613c5057600080fd5b613c5c8c838d01613b7e565b909a50985060208b0135915080821115613c7557600080fd5b613c818c838d01613b7e565b909850965060408b0135915080821115613c9a57600080fd5b613ca68c838d01613b7e565b909650945060608b0135915080821115613cbf57600080fd5b50613ccc8b828c01613ab8565b999c989b5096995094979396929594505050565b600060208284031215613cf257600080fd5b81518015158114612f9057600080fd5b600060208284031215613d1457600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015613d5c57613d5c613d1b565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215613dd157600080fd5b813567ffffffffffffffff81168114612f9057600080fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613e2157613e21613d1b565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082613e6457613e64613e26565b500490565b600060208284031215613e7b57600080fd5b8135612f908161393c565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613eb857613eb8613d1b565b5060010190565b600082613ece57613ece613e26565b500690565b60008085851115613ee357600080fd5b83861115613ef057600080fd5b5050820193919092039150565b60008219821115613f1057613f10613d1b565b500190565b80356020831015610480577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b60008251613f63818460208701613a16565b9190910192915050565b83815260008351613f85816020850160208801613a16565b80830190507fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008416602082015260388101915050949350505050565b60a081526000613fd460a0830188613a42565b8281036020840152613fe68188613a42565b90508281036040840152613ffa8187613a42565b9050828103606084015261400e8186613a42565b905082810360808401526140228185613a42565b98975050505050505050565b60008351614040818460208801613a16565b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000939093169190920190815260100192915050565b60006060828403121561408757600080fd5b82601f83011261409657600080fd5b6040516060810181811067ffffffffffffffff821117156140b9576140b96137c8565b6040528060608401858111156140ce57600080fd5b845b818110156140e85780518352602092830192016140d0565b509195945050505050565b8281526000825161410b816020850160208701613a16565b919091016020019392505050565b6000845161412b818460208901613a16565b7fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009490941691909301908152601881019190915260380192915050565b600181815b808511156141c157817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156141a7576141a7613d1b565b808516156141b457918102915b93841c939080029061416d565b509250929050565b6000826141d857506001610480565b816141e557506000610480565b81600181146141fb576002811461420557614221565b6001915050610480565b60ff84111561421657614216613d1b565b50506001821b610480565b5060208310610133831016604e8410600b8410161715614244575081810a610480565b61424e8383614168565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561428057614280613d1b565b029392505050565b6000612f9083836141c956fea264697066735822122013e8d9d88c4c632033c1fa09819f4d9f47412aba42402eec3637cdcc860ac63464736f6c63430008090033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc000000000000000000000000face2face0000000000000000000000000000000000000000000000000000000babe2bed00000000000000000000000000000001" + "constructor": "0x60806040523480156200001157600080fd5b50604051620042be380380620042be8339810160408190526200003491620002fe565b6200003f8262000183565b62000086816040516200005290620002d3565b6001600160a01b039091168152602001604051809103906000f0801580156200007f573d6000803e3d6000fd5b506200021f565b60005b62000097600160206200034c565b8110156200017a57600260018260208110620000b757620000b762000366565b015460018360208110620000cf57620000cf62000366565b015460408051602081019390935282015260600160408051601f1981840301815290829052620000ff916200037c565b602060405180830381855afa1580156200011d573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190620001429190620003ba565b6001620001508382620003d4565b6020811062000163576200016362000366565b0155806200017181620003ef565b91505062000089565b5050506200040d565b60006200018f620002b4565b90506001600160a01b038216620001a557600080fd5b816001600160a01b0316816001600160a01b03161415620001c557600080fd5b6000805160206200427e833981519152829055604080516001600160a01b038084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b6001600160a01b0381166200023357600080fd5b6001600160a01b038116620002556000805160206200429e8339815191525490565b6001600160a01b031614156200026a57600080fd5b6000805160206200429e8339815191528190556040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000620002ce6000805160206200427e8339815191525490565b905090565b6139d480620008aa83390190565b80516001600160a01b0381168114620002f957600080fd5b919050565b600080604083850312156200031257600080fd5b6200031d83620002e1565b91506200032d60208401620002e1565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b60008282101562000361576200036162000336565b500390565b634e487b7160e01b600052603260045260246000fd5b6000825160005b818110156200039f576020818601810151858301520162000383565b81811115620003af576000828501525b509190910192915050565b600060208284031215620003cd57600080fd5b5051919050565b60008219821115620003ea57620003ea62000336565b500190565b600060001982141562000406576200040662000336565b5060010190565b61048d806200041d6000396000f3fe60806040526004361061003f5760003560e01c80633659cfe6146100af5780635c60da1b146100d1578063704b6c021461012a578063f851a4401461014a575b60006100697f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff811661008b57600080fd5b3660008037600080366000845af43d6000803e8080156100aa573d6000f35b3d6000fd5b3480156100bb57600080fd5b506100cf6100ca36600461041a565b61015f565b005b3480156100dd57600080fd5b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b34801561013657600080fd5b506100cf61014536600461041a565b6101c4565b34801561015657600080fd5b50610101610226565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101b857600080fd5b6101c181610255565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461021d57600080fd5b6101c18161033d565b60006102507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b73ffffffffffffffffffffffffffffffffffffffff811661027557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166102b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b73ffffffffffffffffffffffffffffffffffffffff1614156102d557600080fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000610347610226565b905073ffffffffffffffffffffffffffffffffffffffff821661036957600080fd5b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103a257600080fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038290556040805173ffffffffffffffffffffffffffffffffffffffff8084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b60006020828403121561042c57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461045057600080fd5b939250505056fea26469706673582212207747c650996bfd5b0a51931c0b302249e424b5fc2d92f1d2288b11d9e3956c8364736f6c6343000809003360a06040523480156200001157600080fd5b50604051620039d4380380620039d4833981016040819052620000349162000050565b6000805460ff191690556001600160a01b031660805262000082565b6000602082840312156200006357600080fd5b81516001600160a01b03811681146200007b57600080fd5b9392505050565b6080516138fe620000d6600039600081816101f10152818161047f0152818161062e015281816107d701528181610b8001528181610c2d015281816116a50152818161193601526119c701526138fe6000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c806379d0c0bc116100b2578063bb30b8fd11610081578063c5f2892f11610066578063c5f2892f146102bf578063c82655b7146102c7578063d74d11e9146102da57600080fd5b8063bb30b8fd1461028c578063be7ab51b1461029f57600080fd5b806379d0c0bc1461024b5780638456cb591461025e578063a3066aab14610266578063a4c0ed361461027957600080fd5b80634694bd1e11610109578063621fd130116100ee578063621fd130146101d7578063640415bf146101ec57806369ffa08a1461023857600080fd5b80634694bd1e146101b95780635c975abb146101cc57600080fd5b806301ffc9a71461013b5780630cac9f311461016357806324db4c46146101785780633f4ba83a146101b1575b600080fd5b61014e610149366004612dd3565b6102ed565b60405190151581526020015b60405180910390f35b610176610171366004612eef565b6103d2565b005b6101a3610186366004612f89565b805160208183018101805160428252928201919093012091525481565b60405190815260200161015a565b610176610525565b6101766101c7366004612fe8565b610588565b60005460ff1661014e565b6101df610753565b60405161015a9190613097565b6102137f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161015a565b610176610246366004612fe8565b610765565b6101766102593660046130f6565b6108a8565b610176610ac6565b610176610274366004613170565b610b27565b61014e6102873660046131cf565b610ba7565b61017661029a36600461322b565b6110c3565b6101a36102ad366004613170565b60436020526000908152604090205481565b6101a3611108565b6101766102d536600461326d565b611337565b6101766102e8366004613170565b6118ed565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000148061038057507fffffffff0000000000000000000000000000000000000000000000000000000082167fab41c72e00000000000000000000000000000000000000000000000000000000145b806103cc57507fffffffff0000000000000000000000000000000000000000000000000000000082167fa4c0ed3600000000000000000000000000000000000000000000000000000000145b92915050565b60005460ff1615610444576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064015b60405180910390fd5b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906323b872dd90606401602060405180830381600087803b1580156104d857600080fd5b505af11580156104ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105109190613331565b5061051e85858585856119f1565b5050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461057e57600080fd5b610586612474565b565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105e157600080fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff808416916339f47693917f000000000000000000000000000000000000000000000000000000000000000091908516906370a082319060240160206040518083038186803b15801561067357600080fd5b505afa158015610687573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ab9190613353565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401602060405180830381600087803b15801561071657600080fd5b505af115801561072a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074e9190613353565b505050565b6060610760604154612555565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107be57600080fd5b8173ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16141561089a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f4465706f736974436f6e74726163743a206e6f7420616c6c6f77656420746f2060448201527f636c61696d206465706f73697420746f6b656e00000000000000000000000000606482015260840161043b565b6108a482826127c9565b5050565b3373fffffffffffffffffffffffffffffffffffffffe148061091657507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6109c8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604d60248201527f546869732066756e6374696f6e2073686f756c642062652063616c6c6564206f60448201527f6e6c792062792053595354454d5f5749544844524157414c5f4558454355544f60648201527f52206f72205f61646d696e282900000000000000000000000000000000000000608482015260a40161043b565b8281146109d7576109d761336c565b60005b83811015610abe57600060208686848181106109f8576109f861339b565b9050602002016020810190610a0d91906133ca565b610a259067ffffffffffffffff16633b9aca00613423565b610a2f919061348f565b90508060436000868686818110610a4857610a4861339b565b9050602002016020810190610a5d9190613170565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610aa691906134a3565b90915550610ab791508290506134bb565b90506109da565b505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b1f57600080fd5b6105866127f7565b73ffffffffffffffffffffffffffffffffffffffff811660009081526043602052604090205480156108a45773ffffffffffffffffffffffffffffffffffffffff8083166000908152604360205260408120556108a4907f00000000000000000000000000000000000000000000000000000000000000001683836128b7565b6000805460ff1615610c15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161043b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610cd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4465706f736974436f6e74726163743a206e6f742061206465706f736974207460448201527f6f6b656e00000000000000000000000000000000000000000000000000000000606482015260840161043b565b610ce460b0836134f4565b602014610d73576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f4465706f736974436f6e74726163743a20696e636f7272656374206465706f7360448201527f69742064617461206c656e677468000000000000000000000000000000000000606482015260840161043b565b6000610d8060b08461348f565b905060008111610e12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f42617463684465706f7369743a20596f752073686f756c64206465706f73697460448201527f206174206c65617374206f6e652076616c696461746f72000000000000000000606482015260840161043b565b846001821115610f58576080821115610ead576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f42617463684465706f7369743a20596f752063616e206465706f736974206d6160448201527f78203132382076616c696461746f727320617420612074696d65000000000000606482015260840161043b565b610ebf82670de0b6b3a7640000613423565b8614610f4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f42617463684465706f7369743a206261746368206465706f736974732072657160448201527f75697265203120474e4f206465706f73697420616d6f756e7400000000000000606482015260840161043b565b50670de0b6b3a76400005b6000610f676020828789613508565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293506020925050505b858110156110b4576000878288610fba8260306134a3565b92610fc793929190613508565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509394508b92508a915061100d90508560306134a3565b906110198660906134a3565b9261102693929190613508565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509394508c92508b915061106c90508660906134a3565b906110788760b06134a3565b9261108593929190613508565b61108e91613532565b905061109d838684848a6119f1565b50505060b0816110ad91906134a3565b9050610fa2565b50600198975050505050505050565b60005b8181101561074e576110f88383838181106110e3576110e361339b565b90506020020160208101906102749190613170565b611101816134bb565b90506110c6565b6041546000908190815b60208110156112955781600116600114156111d15760026021826020811061113c5761113c61339b565b01546040805160208101929092528101859052606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261118a9161356e565b602060405180830381855afa1580156111a7573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906111ca9190613353565b9250611276565b600283600183602081106111e7576111e761339b565b0154604080516020810193909352820152606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526112339161356e565b602060405180830381855afa158015611250573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906112739190613353565b92505b61128160028361348f565b91508061128d816134bb565b915050611112565b506002826112a4604154612555565b6040516112b892919060009060200161358a565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526112f09161356e565b602060405180830381855afa15801561130d573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906113309190613353565b9250505090565b60005460ff16156113a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161043b565b8080611432576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f42617463684465706f7369743a20596f752073686f756c64206465706f73697460448201527f206174206c65617374206f6e652076616c696461746f72000000000000000000606482015260840161043b565b60808111156114c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f42617463684465706f7369743a20596f752063616e206465706f736974206d6160448201527f78203132382076616c696461746f727320617420612074696d65000000000000606482015260840161043b565b6114ce816030613423565b881461155c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f42617463684465706f7369743a205075626b657920636f756e7420646f6e277460448201527f206d617463680000000000000000000000000000000000000000000000000000606482015260840161043b565b611567816060613423565b84146115f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f42617463684465706f7369743a205369676e61747572657320636f756e74206460448201527f6f6e2774206d6174636800000000000000000000000000000000000000000000606482015260840161043b565b60208614611685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f42617463684465706f7369743a205769746864726177616c2043726564656e7460448201527f69616c7320636f756e7420646f6e2774206d6174636800000000000000000000606482015260840161043b565b670de0b6b3a764000073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166323b872dd33306116d68686613423565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff93841660048201529290911660248301526044820152606401602060405180830381600087803b15801561174a57600080fd5b505af115801561175e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117829190613331565b5060005b828110156118e05760008b8b61179d846030613423565b906117a98560016134a3565b6117b4906030613423565b926117c193929190613508565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509394508b92508a91506118079050856060613423565b906118138660016134a3565b61181e906060613423565b9261182b93929190613508565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090506118cd828c8c8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508692508c91508b9050888181106118c0576118c061339b565b90506020020135886119f1565b5050806118d9906134bb565b9050611786565b5050505050505050505050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526119ee90829073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b15801561197857600080fd5b505afa15801561198c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b09190613353565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691906128b7565b50565b6119fc816020613423565b90508451603014611a8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4465706f736974436f6e74726163743a20696e76616c6964207075626b65792060448201527f6c656e6774680000000000000000000000000000000000000000000000000000606482015260840161043b565b8351602014611b20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f4465706f736974436f6e74726163743a20696e76616c6964207769746864726160448201527f77616c5f63726564656e7469616c73206c656e67746800000000000000000000606482015260840161043b565b8251606014611bb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4465706f736974436f6e74726163743a20696e76616c6964207369676e61747560448201527f7265206c656e6774680000000000000000000000000000000000000000000000606482015260840161043b565b670de0b6b3a7640000811015611c49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4465706f736974436f6e74726163743a206465706f7369742076616c7565207460448201527f6f6f206c6f770000000000000000000000000000000000000000000000000000606482015260840161043b565b611c57633b9aca00826134f4565b15611ce4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f4465706f736974436f6e74726163743a206465706f7369742076616c7565206e60448201527f6f74206d756c7469706c65206f66206777656900000000000000000000000000606482015260840161043b565b6000611cf4633b9aca008361348f565b905067ffffffffffffffff811115611d8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4465706f736974436f6e74726163743a206465706f7369742076616c7565207460448201527f6f6f206869676800000000000000000000000000000000000000000000000000606482015260840161043b565b6000611d9982612555565b90507f649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c587878388611dcb604154612555565b604051611ddc9594939291906135de565b60405180910390a16000600288600060801b604051602001611dff92919061364b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052611e379161356e565b602060405180830381855afa158015611e54573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611e779190613353565b9050600086806020019051810190611e8f9190613692565b90506000600280838360200201518460016020020151604051602001611ebf929190918252602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052611ef79161356e565b602060405180830381855afa158015611f14573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611f379190613353565b60408481015181516020810191909152600081830152815180820383018152606090910191829052600291611f6c919061356e565b602060405180830381855afa158015611f89573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611fac9190613353565b604080516020810193909352820152606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052611ff69161356e565b602060405180830381855afa158015612013573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906120369190613353565b90506000600280858c604051602001612050929190613710565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526120889161356e565b602060405180830381855afa1580156120a5573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906120c89190613353565b6040516002906120e19089906000908890602001613736565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526121199161356e565b602060405180830381855afa158015612136573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906121599190613353565b604080516020810193909352820152606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526121a39161356e565b602060405180830381855afa1580156121c0573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906121e39190613353565b905087811461229a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605460248201527f4465706f736974436f6e74726163743a207265636f6e7374727563746564204460448201527f65706f7369744461746120646f6573206e6f74206d6174636820737570706c6960648201527f6564206465706f7369745f646174615f726f6f74000000000000000000000000608482015260a40161043b565b60016122a8602060026138a5565b6122b291906138b1565b60415410612342576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4465706f736974436f6e74726163743a206d65726b6c6520747265652066756c60448201527f6c00000000000000000000000000000000000000000000000000000000000000606482015260840161043b565b60016041600082825461235591906134a3565b909155505060415460005b602081101561245d5781600116600114156123995782602182602081106123895761238961339b565b01555061051e9650505050505050565b6002602182602081106123ae576123ae61339b565b01546040805160208101929092528101859052606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526123fc9161356e565b602060405180830381855afa158015612419573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061243c9190613353565b925061244960028361348f565b915080612455816134bb565b915050612360565b5061246661336c565b505050505050505050505050565b60005460ff166124e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161043b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60408051600880825281830190925260609160208201818036833701905050905060c082901b8060071a60f81b826000815181106125955761259561339b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060061a60f81b826001815181106125de576125de61339b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060051a60f81b826002815181106126275761262761339b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060041a60f81b826003815181106126705761267061339b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060031a60f81b826004815181106126b9576126b961339b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060021a60f81b826005815181106127025761270261339b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060011a60f81b8260068151811061274b5761274b61339b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060001a60f81b826007815181106127945761279461339b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050919050565b73ffffffffffffffffffffffffffffffffffffffff82166127ed576108a481612944565b6108a48282612989565b60005460ff1615612864576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161043b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861252b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261074e908490612adb565b604051479073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f1935050505015801561074e573d6000803e3d6000fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8416906370a082319060240160206040518083038186803b1580156129f157600080fd5b505afa158015612a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a299190613353565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390529192509084169063a9059cbb90604401602060405180830381600087803b158015612a9d57600080fd5b505af1158015612ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ad59190613331565b50505050565b6000612b3d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612be79092919063ffffffff16565b80519091501561074e5780806020019051810190612b5b9190613331565b61074e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161043b565b6060612bf68484600085612c00565b90505b9392505050565b606082471015612c92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161043b565b843b612cfa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161043b565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612d23919061356e565b60006040518083038185875af1925050503d8060008114612d60576040519150601f19603f3d011682016040523d82523d6000602084013e612d65565b606091505b5091509150612d75828286612d80565b979650505050505050565b60608315612d8f575081612bf9565b825115612d9f5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043b9190613097565b600060208284031215612de557600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612bf957600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112612e5557600080fd5b813567ffffffffffffffff80821115612e7057612e70612e15565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715612eb657612eb6612e15565b81604052838152866020858801011115612ecf57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a08688031215612f0757600080fd5b853567ffffffffffffffff80821115612f1f57600080fd5b612f2b89838a01612e44565b96506020880135915080821115612f4157600080fd5b612f4d89838a01612e44565b95506040880135915080821115612f6357600080fd5b50612f7088828901612e44565b9598949750949560608101359550608001359392505050565b600060208284031215612f9b57600080fd5b813567ffffffffffffffff811115612fb257600080fd5b612fbe84828501612e44565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff811681146119ee57600080fd5b60008060408385031215612ffb57600080fd5b823561300681612fc6565b9150602083013561301681612fc6565b809150509250929050565b60005b8381101561303c578181015183820152602001613024565b83811115612ad55750506000910152565b60008151808452613065816020860160208601613021565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612bf9602083018461304d565b60008083601f8401126130bc57600080fd5b50813567ffffffffffffffff8111156130d457600080fd5b6020830191508360208260051b85010111156130ef57600080fd5b9250929050565b60008060008060006060868803121561310e57600080fd5b85359450602086013567ffffffffffffffff8082111561312d57600080fd5b61313989838a016130aa565b9096509450604088013591508082111561315257600080fd5b5061315f888289016130aa565b969995985093965092949392505050565b60006020828403121561318257600080fd5b8135612bf981612fc6565b60008083601f84011261319f57600080fd5b50813567ffffffffffffffff8111156131b757600080fd5b6020830191508360208285010111156130ef57600080fd5b600080600080606085870312156131e557600080fd5b84356131f081612fc6565b935060208501359250604085013567ffffffffffffffff81111561321357600080fd5b61321f8782880161318d565b95989497509550505050565b6000806020838503121561323e57600080fd5b823567ffffffffffffffff81111561325557600080fd5b613261858286016130aa565b90969095509350505050565b6000806000806000806000806080898b03121561328957600080fd5b883567ffffffffffffffff808211156132a157600080fd5b6132ad8c838d0161318d565b909a50985060208b01359150808211156132c657600080fd5b6132d28c838d0161318d565b909850965060408b01359150808211156132eb57600080fd5b6132f78c838d0161318d565b909650945060608b013591508082111561331057600080fd5b5061331d8b828c016130aa565b999c989b5096995094979396929594505050565b60006020828403121561334357600080fd5b81518015158114612bf957600080fd5b60006020828403121561336557600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156133dc57600080fd5b813567ffffffffffffffff81168114612bf957600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561345b5761345b6133f4565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261349e5761349e613460565b500490565b600082198211156134b6576134b66133f4565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156134ed576134ed6133f4565b5060010190565b60008261350357613503613460565b500690565b6000808585111561351857600080fd5b8386111561352557600080fd5b5050820193919092039150565b803560208310156103cc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b60008251613580818460208701613021565b9190910192915050565b838152600083516135a2816020850160208801613021565b80830190507fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008416602082015260388101915050949350505050565b60a0815260006135f160a083018861304d565b8281036020840152613603818861304d565b90508281036040840152613617818761304d565b9050828103606084015261362b818661304d565b9050828103608084015261363f818561304d565b98975050505050505050565b6000835161365d818460208801613021565b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000939093169190920190815260100192915050565b6000606082840312156136a457600080fd5b82601f8301126136b357600080fd5b6040516060810181811067ffffffffffffffff821117156136d6576136d6612e15565b6040528060608401858111156136eb57600080fd5b845b818110156137055780518352602092830192016136ed565b509195945050505050565b82815260008251613728816020850160208701613021565b919091016020019392505050565b60008451613748818460208901613021565b7fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009490941691909301908152601881019190915260380192915050565b600181815b808511156137de57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156137c4576137c46133f4565b808516156137d157918102915b93841c939080029061378a565b509250929050565b6000826137f5575060016103cc565b81613802575060006103cc565b816001811461381857600281146138225761383e565b60019150506103cc565b60ff841115613833576138336133f4565b50506001821b6103cc565b5060208310610133831016604e8410600b8410161715613861575081810a6103cc565b61386b8383613785565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561389d5761389d6133f4565b029392505050565b6000612bf983836137e6565b6000828210156138c3576138c36133f4565b50039056fea264697066735822122036fc2157b76ea8a047c135c6701792d945e1ed4ef90a59f6b46c74c84ed695e464736f6c63430008090033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc000000000000000000000000face2face0000000000000000000000000000000000000000000000000000000babe2bed00000000000000000000000000000002" }, "0xbabe2bed00000000000000000000000000000004": { "balance": "0", @@ -308,7 +308,7 @@ }, "0xface2face0000000000000000000000000000000": { "balance": "0", - "constructor": "0x608060405234801561001057600080fd5b506040516105a83803806105a883398101604081905261002f916104c5565b604051637e51dad560e11b81526001600160a01b038083166004830152859185918591859184169063fca3b5aa90602401600060405180830381600087803b15801561007a57600080fd5b505af115801561008e573d6000803e3d6000fd5b5050604051632f3d020360e01b81526001600160a01b038b81166004830152602482018d905284169250632f3d02039150604401600060405180830381600087803b1580156100dc57600080fd5b505af11580156100f0573d6000803e3d6000fd5b5050604051637e51dad560e11b81523060048201526001600160a01b038716925063fca3b5aa9150602401600060405180830381600087803b15801561013557600080fd5b505af1158015610149573d6000803e3d6000fd5b50506040516340c10f1960e01b8152306004820152602481018c90526001600160a01b03871692506340c10f199150604401600060405180830381600087803b15801561019557600080fd5b505af11580156101a9573d6000803e3d6000fd5b505060405163095ea7b360e01b81526001600160a01b038881166004830152602482018d90528716925063095ea7b39150604401602060405180830381600087803b1580156101f757600080fd5b505af115801561020b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061022f9190610532565b506040516339aca1c160e01b81526001600160a01b038981166004830152602482018b9052606060448301526002606483015261060f60f31b60848301528216906339aca1c19060a401600060405180830381600087803b15801561029357600080fd5b505af11580156102a7573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038981166004830152602482018d90528616925063a9059cbb9150604401602060405180830381600087803b1580156102f557600080fd5b505af1158015610309573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032d9190610532565b50604051633825b60160e11b81526001600160a01b038b8116600483015283169063704b6c0290602401600060405180830381600087803b15801561037157600080fd5b505af1158015610385573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b038d811660048301528a16925063704b6c029150602401600060405180830381600087803b1580156103cc57600080fd5b505af11580156103e0573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b038d811660048301528816925063704b6c029150602401600060405180830381600087803b15801561042757600080fd5b505af115801561043b573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b038d811660048301528b16925063704b6c029150602401600060405180830381600087803b15801561048257600080fd5b505af1158015610496573d6000803e3d6000fd5b505050505050505050505050505061055b565b80516001600160a01b03811681146104c057600080fd5b919050565b60008060008060008060c087890312156104de57600080fd5b6104e7876104a9565b9550602087015194506104fc604088016104a9565b935061050a606088016104a9565b9250610518608088016104a9565b915061052660a088016104a9565b90509295509295509295565b60006020828403121561054457600080fd5b8151801515811461055457600080fd5b9392505050565b603f806105696000396000f3fe6080604052600080fdfea264697066735822122049f4cc556f748aa73889b9a92412521b8a627f3f2ce73b3fad45f98df618724b64736f6c63430008090033000000000000000000000000cc4e00a72d871d6c328bcfe9025ad93d0a26df51000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000babe2bed00000000000000000000000000000002000000000000000000000000babe2bed00000000000000000000000000000001000000000000000000000000babe2bed00000000000000000000000000000003000000000000000000000000babe2bed00000000000000000000000000000004" + "constructor": "0x608060405234801561001057600080fd5b5060405161026e38038061026e83398101604081905261002f916101d4565b6040516340c10f1960e01b81526001600160a01b03808316600483015260248201859052839183918316906340c10f1990604401600060405180830381600087803b15801561007d57600080fd5b505af1158015610091573d6000803e3d6000fd5b50506040516340c10f1960e01b81526001600160a01b03898116600483015260248201899052851692506340c10f199150604401600060405180830381600087803b1580156100df57600080fd5b505af11580156100f3573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b0389811660048301528416925063704b6c029150602401600060405180830381600087803b15801561013a57600080fd5b505af115801561014e573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b0389811660048301528716925063704b6c029150602401600060405180830381600087803b15801561019557600080fd5b505af11580156101a9573d6000803e3d6000fd5b50505050505050505050610221565b80516001600160a01b03811681146101cf57600080fd5b919050565b600080600080608085870312156101ea57600080fd5b6101f3856101b8565b935060208501519250610208604086016101b8565b9150610216606086016101b8565b905092959194509250565b603f8061022f6000396000f3fe6080604052600080fdfea2646970667358221220736146d047d972ba2411e1910bb9eb02bef6f4135edcdf986f9fe8612931cf5264736f6c63430008090033000000000000000000000000cc4e00a72d871d6c328bcfe9025ad93d0a26df5100000000000000000000000000000000000000000000021e19e0c9bab2400000000000000000000000000000babe2bed00000000000000000000000000000002000000000000000000000000babe2bed00000000000000000000000000000003" } } } \ No newline at end of file diff --git a/simulators/ethereum/engine/libgno/gno.go b/simulators/ethereum/engine/libgno/gno.go index b1e0057735..eb48ab59fb 100644 --- a/simulators/ethereum/engine/libgno/gno.go +++ b/simulators/ethereum/engine/libgno/gno.go @@ -15,8 +15,9 @@ const MAX_FAILED_WITHDRAWALS_TO_PROCESS = 4 const GAS_LIMIT = 1000000 // SYSTEM_SENDER represents the address of the system sender. -var SYSTEM_SENDER = common.HexToAddress("0xfffffffffffffffffffffffffffffffffffffffe") +// var SYSTEM_SENDER = common.HexToAddress("0xfffffffffffffffffffffffffffffffffffffffe") var GNOTokenAddress = common.HexToAddress("0xbabe2bed00000000000000000000000000000001") +var WithdrawalsContractAddress = common.HexToAddress("0xbabe2bed00000000000000000000000000000003") // GNOWithdrawalContractABI represents the path to the GNO withdrawal contract ABI. // @@ -50,6 +51,20 @@ func ExecuteSystemWithdrawal(maxNumberOfFailedWithdrawalsToProcess uint64, amoun return dataBytes, nil } +// ExecuteWithdrawalsClaims gets the byte code to execute a withdrawals claims. +func ExecuteWithdrawalsClaims(addresses []common.Address) ([]byte, error) { + withdrawalABI, err := abi.JSON(strings.NewReader(GNOWithdrawalContractABI)) + if err != nil { + return []byte{}, ErrorLoadingWithdrawalContract + } + dataBytes, err := withdrawalABI.Pack("claimWithdrawals", addresses) + if err != nil { + return []byte{}, fmt.Errorf("%w: %w", ErrorPackingArguments, err) + } + // if at some point we want to convert it to hex, use something like this: hex.EncodeToString(dataBytes) + return dataBytes, nil +} + // BalanceOfAddressData return contract method to get the balance of a GNO token. func BalanceOfAddressData(account common.Address) ([]byte, error) { gnoTokenABI, err := abi.JSON(strings.NewReader(GNOTokenContractABI)) @@ -71,3 +86,12 @@ func GetGNOTokenABI() (*abi.ABI, error) { } return &gnoTokenABI, nil } + +// GetWithdrawalsABI return the Withdrawals contract ABI. +func GetWithdrawalsABI() (*abi.ABI, error) { + withdrawalsABI, err := abi.JSON(strings.NewReader(GNOWithdrawalContractABI)) + if err != nil { + return nil, ErrorLoadingWithdrawalContract + } + return &withdrawalsABI, nil +} diff --git a/simulators/ethereum/engine/libgno/withdrawals.json b/simulators/ethereum/engine/libgno/withdrawals.json index aacb10ae03..7ad794bcec 100644 --- a/simulators/ethereum/engine/libgno/withdrawals.json +++ b/simulators/ethereum/engine/libgno/withdrawals.json @@ -1,27 +1,63 @@ [ + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "uint256", - "name": "_failedWithdrawalId", - "type": "uint256" + "indexed": false, + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" }, { "indexed": false, - "internalType": "uint256", - "name": "_processedAmount", - "type": "uint256" + "internalType": "bytes", + "name": "withdrawal_credentials", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "amount", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "signature", + "type": "bytes" }, { - "indexed": true, + "indexed": false, + "internalType": "bytes", + "name": "index", + "type": "bytes" + } + ], + "name": "DepositEvent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, "internalType": "address", - "name": "_address", + "name": "account", "type": "address" } ], - "name": "FailedWithdrawalProcessed", + "name": "Paused", "type": "event" }, { @@ -29,44 +65,270 @@ "inputs": [ { "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "indexed": true, "internalType": "address", - "name": "_address", + "name": "account", "type": "address" } ], - "name": "WithdrawalExecuted", + "name": "Unpaused", "type": "event" }, { - "anonymous": false, + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "stake_token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { "inputs": [ { - "indexed": true, + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "validator_withdrawal_credentials", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "withdrawableAmount", + "outputs": [ + { "internalType": "uint256", - "name": "_failedWithdrawalId", + "name": "", "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "get_deposit_root", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "get_deposit_count", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "withdrawal_credentials", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "deposit_data_root", + "type": "bytes32" }, { - "indexed": false, "internalType": "uint256", - "name": "_amount", + "name": "stake_amount", "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "pubkeys", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "withdrawal_credentials", + "type": "bytes" }, { - "indexed": true, + "internalType": "bytes", + "name": "signatures", + "type": "bytes" + }, + { + "internalType": "bytes32[]", + "name": "deposit_data_roots", + "type": "bytes32[]" + } + ], + "name": "batchDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "stake_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onTokenTransfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + } + ], + "name": "claimTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_address", "type": "address" } ], - "name": "WithdrawalFailed", - "type": "event" + "name": "claimWithdrawal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_addresses", + "type": "address[]" + } + ], + "name": "claimWithdrawals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [ @@ -94,12 +356,17 @@ { "inputs": [ { - "internalType": "uint256", - "name": "_maxNumberOfFailedWithdrawalsToProcess", - "type": "uint256" + "internalType": "contract IUnwrapper", + "name": "_unwrapper", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" } ], - "name": "processFailedWithdrawalsFromPointer", + "name": "unwrapTokens", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -107,17 +374,12 @@ { "inputs": [ { - "internalType": "uint256", - "name": "_failedWithdrawalId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_amountToProceed", - "type": "uint256" + "internalType": "address", + "name": "addr", + "type": "address" } ], - "name": "processFailedWithdrawal", + "name": "flushTokensTo", "outputs": [], "stateMutability": "nonpayable", "type": "function" diff --git a/simulators/ethereum/engine/suites/withdrawals/tests.go b/simulators/ethereum/engine/suites/withdrawals/tests.go index 4ee719a842..8523065924 100644 --- a/simulators/ethereum/engine/suites/withdrawals/tests.go +++ b/simulators/ethereum/engine/suites/withdrawals/tests.go @@ -58,17 +58,17 @@ var Tests = []test.SpecInterface{ TimeIncrements: 5, }, - &WithdrawalsBaseSpec{ - Spec: test.Spec{ - Name: "Withdrawals Fork on Block 1", - About: ` - Tests the withdrawals fork happening directly after genesis. - `, - }, - WithdrawalsForkHeight: 1, // Only Genesis is Pre-Withdrawals - WithdrawalsBlockCount: 1, - WithdrawalsPerBlock: 16, - }, + //&WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdrawals Fork on Block 1", + // About: ` + // Tests the withdrawals fork happening directly after genesis. + // `, + // }, + // WithdrawalsForkHeight: 1, // Only Genesis is Pre-Withdrawals + // WithdrawalsBlockCount: 1, + // WithdrawalsPerBlock: 16, + //}, // TODO: Fix this test //&WithdrawalsBaseSpec{ @@ -102,36 +102,36 @@ var Tests = []test.SpecInterface{ // WithdrawalsBlockCount: 1, // WithdrawalsPerBlock: 16, //}, - - &WithdrawalsBaseSpec{ - Spec: test.Spec{ - Name: "Withdraw to a single account", - About: ` - Make multiple withdrawals to a single account. - `, - }, - WithdrawalsForkHeight: 1, - WithdrawalsBlockCount: 1, - WithdrawalsPerBlock: 64, - WithdrawableAccountCount: 1, - }, - - &WithdrawalsBaseSpec{ - Spec: test.Spec{ - Name: "Withdraw to two accounts", - About: ` - Make multiple withdrawals to two different accounts, repeated in - round-robin. - Reasoning: There might be a difference in implementation when an - account appears multiple times in the withdrawals list but the list - is not in ordered sequence. - `, - }, - WithdrawalsForkHeight: 1, - WithdrawalsBlockCount: 1, - WithdrawalsPerBlock: 64, - WithdrawableAccountCount: 2, - }, + // + //&WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdraw to a single account", + // About: ` + // Make multiple withdrawals to a single account. + // `, + // }, + // WithdrawalsForkHeight: 1, + // WithdrawalsBlockCount: 1, + // WithdrawalsPerBlock: 64, + // WithdrawableAccountCount: 1, + //}, + // + //&WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdraw to two accounts", + // About: ` + // Make multiple withdrawals to two different accounts, repeated in + // round-robin. + // Reasoning: There might be a difference in implementation when an + // account appears multiple times in the withdrawals list but the list + // is not in ordered sequence. + // `, + // }, + // WithdrawalsForkHeight: 1, + // WithdrawalsBlockCount: 1, + // WithdrawalsPerBlock: 64, + // WithdrawableAccountCount: 2, + //}, // TODO: Fix this test, it's reverting the block, which is the expected behavior. //&WithdrawalsBaseSpec{ @@ -149,46 +149,46 @@ var Tests = []test.SpecInterface{ // WithdrawableAccountCount: 1024, //}, - &WithdrawalsBaseSpec{ - Spec: test.Spec{ - Name: "Withdraw zero amount", - About: ` - Make multiple withdrawals where the amount withdrawn is 0. - `, - }, - WithdrawalsForkHeight: 1, - WithdrawalsBlockCount: 1, - WithdrawalsPerBlock: 64, - WithdrawableAccountCount: 2, - WithdrawAmounts: []uint64{ - 0, - 1, - }, - }, - - &WithdrawalsBaseSpec{ - Spec: test.Spec{ - Name: "Empty Withdrawals", - About: ` - Produce withdrawals block with zero withdrawals. - `, - }, - WithdrawalsForkHeight: 1, - WithdrawalsBlockCount: 1, - WithdrawalsPerBlock: 0, - }, - - &WithdrawalsBaseSpec{ - Spec: test.Spec{ - Name: "Corrupted Block Hash Payload (INVALID)", - About: ` - Send a valid payload with a corrupted hash using engine_newPayloadV2. - `, - }, - WithdrawalsForkHeight: 1, - WithdrawalsBlockCount: 1, - TestCorrupedHashPayloads: true, - }, + //&WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdraw zero amount", + // About: ` + // Make multiple withdrawals where the amount withdrawn is 0. + // `, + // }, + // WithdrawalsForkHeight: 1, + // WithdrawalsBlockCount: 1, + // WithdrawalsPerBlock: 64, + // WithdrawableAccountCount: 2, + // WithdrawAmounts: []uint64{ + // 0, + // 1, + // }, + //}, + // + //&WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Empty Withdrawals", + // About: ` + // Produce withdrawals block with zero withdrawals. + // `, + // }, + // WithdrawalsForkHeight: 1, + // WithdrawalsBlockCount: 1, + // WithdrawalsPerBlock: 0, + //}, + // + //&WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Corrupted Block Hash Payload (INVALID)", + // About: ` + // Send a valid payload with a corrupted hash using engine_newPayloadV2. + // `, + // }, + // WithdrawalsForkHeight: 1, + // WithdrawalsBlockCount: 1, + // TestCorrupedHashPayloads: true, + //}, // Block value tests //&BlockValueSpec{ @@ -205,102 +205,102 @@ var Tests = []test.SpecInterface{ //}, // Sync Tests - &WithdrawalsSyncSpec{ - WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ - Spec: test.Spec{ - Name: "Sync after 2 blocks - Withdrawals on Block 1 - Single Withdrawal Account - No Transactions", - About: ` - - Spawn a first client - - Go through withdrawals fork on Block 1 - - Withdraw to a single account 16 times each block for 2 blocks - - Spawn a secondary client and send FCUV2(head) - - Wait for sync and verify withdrawn account's balance - `, - //TimeoutSeconds: 6000, - }, - WithdrawalsForkHeight: 1, - WithdrawalsBlockCount: 2, - WithdrawalsPerBlock: 16, - WithdrawableAccountCount: 1, - }, - SyncSteps: 1, - }, - &WithdrawalsSyncSpec{ - WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ - Spec: test.Spec{ - Name: "Sync after 2 blocks - Withdrawals on Block 1 - Single Withdrawal Account", - About: ` - - Spawn a first client - - Go through withdrawals fork on Block 1 - - Withdraw to a single account 16 times each block for 2 blocks - - Spawn a secondary client and send FCUV2(head) - - Wait for sync and verify withdrawn account's balance - `, - }, - WithdrawalsForkHeight: 1, - WithdrawalsBlockCount: 2, - WithdrawalsPerBlock: 16, - WithdrawableAccountCount: 1, - }, - SyncSteps: 1, - }, - &WithdrawalsSyncSpec{ - WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ - Spec: test.Spec{ - Name: "Sync after 2 blocks - Withdrawals on Genesis - Single Withdrawal Account", - About: ` - - Spawn a first client, with Withdrawals since genesis - - Withdraw to a single account 16 times each block for 2 blocks - - Spawn a secondary client and send FCUV2(head) - - Wait for sync and verify withdrawn account's balance - `, - }, - WithdrawalsForkHeight: 0, - WithdrawalsBlockCount: 2, - WithdrawalsPerBlock: 16, - WithdrawableAccountCount: 1, - }, - SyncSteps: 1, - }, - &WithdrawalsSyncSpec{ - WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ - Spec: test.Spec{ - Name: "Sync after 2 blocks - Withdrawals on Block 2 - Multiple Withdrawal Accounts - No Transactions", - About: ` - - Spawn a first client - - Go through withdrawals fork on Block 2 - - Withdraw to 16 accounts each block for 2 blocks - - Spawn a secondary client and send FCUV2(head) - - Wait for sync, which include syncing a pre-Withdrawals block, and verify withdrawn account's balance - `, - }, - WithdrawalsForkHeight: 2, - WithdrawalsBlockCount: 2, - WithdrawalsPerBlock: 16, - WithdrawableAccountCount: 16, - TransactionsPerBlock: common.Big0, - }, - SyncSteps: 1, - }, - &WithdrawalsSyncSpec{ - WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ - Spec: test.Spec{ - Name: "Sync after 2 blocks - Withdrawals on Block 2 - Multiple Withdrawal Accounts", - About: ` - - Spawn a first client - - Go through withdrawals fork on Block 2 - - Withdraw to 16 accounts each block for 2 blocks - - Spawn a secondary client and send FCUV2(head) - - Wait for sync, which include syncing a pre-Withdrawals block, and verify withdrawn account's balance - `, - }, - WithdrawalsForkHeight: 2, - WithdrawalsBlockCount: 2, - WithdrawalsPerBlock: 16, - WithdrawableAccountCount: 16, - }, - SyncSteps: 1, - }, + //&WithdrawalsSyncSpec{ + // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Sync after 2 blocks - Withdrawals on Block 1 - Single Withdrawal Account - No Transactions", + // About: ` + // - Spawn a first client + // - Go through withdrawals fork on Block 1 + // - Withdraw to a single account 16 times each block for 2 blocks + // - Spawn a secondary client and send FCUV2(head) + // - Wait for sync and verify withdrawn account's balance + // `, + // //TimeoutSeconds: 6000, + // }, + // WithdrawalsForkHeight: 1, + // WithdrawalsBlockCount: 2, + // WithdrawalsPerBlock: 16, + // WithdrawableAccountCount: 1, + // }, + // SyncSteps: 1, + //}, + //&WithdrawalsSyncSpec{ + // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Sync after 2 blocks - Withdrawals on Block 1 - Single Withdrawal Account", + // About: ` + // - Spawn a first client + // - Go through withdrawals fork on Block 1 + // - Withdraw to a single account 16 times each block for 2 blocks + // - Spawn a secondary client and send FCUV2(head) + // - Wait for sync and verify withdrawn account's balance + // `, + // }, + // WithdrawalsForkHeight: 1, + // WithdrawalsBlockCount: 2, + // WithdrawalsPerBlock: 16, + // WithdrawableAccountCount: 1, + // }, + // SyncSteps: 1, + //}, + //&WithdrawalsSyncSpec{ + // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Sync after 2 blocks - Withdrawals on Genesis - Single Withdrawal Account", + // About: ` + // - Spawn a first client, with Withdrawals since genesis + // - Withdraw to a single account 16 times each block for 2 blocks + // - Spawn a secondary client and send FCUV2(head) + // - Wait for sync and verify withdrawn account's balance + // `, + // }, + // WithdrawalsForkHeight: 0, + // WithdrawalsBlockCount: 2, + // WithdrawalsPerBlock: 16, + // WithdrawableAccountCount: 1, + // }, + // SyncSteps: 1, + //}, + //&WithdrawalsSyncSpec{ + // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Sync after 2 blocks - Withdrawals on Block 2 - Multiple Withdrawal Accounts - No Transactions", + // About: ` + // - Spawn a first client + // - Go through withdrawals fork on Block 2 + // - Withdraw to 16 accounts each block for 2 blocks + // - Spawn a secondary client and send FCUV2(head) + // - Wait for sync, which include syncing a pre-Withdrawals block, and verify withdrawn account's balance + // `, + // }, + // WithdrawalsForkHeight: 2, + // WithdrawalsBlockCount: 2, + // WithdrawalsPerBlock: 16, + // WithdrawableAccountCount: 16, + // TransactionsPerBlock: common.Big0, + // }, + // SyncSteps: 1, + //}, + //&WithdrawalsSyncSpec{ + // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Sync after 2 blocks - Withdrawals on Block 2 - Multiple Withdrawal Accounts", + // About: ` + // - Spawn a first client + // - Go through withdrawals fork on Block 2 + // - Withdraw to 16 accounts each block for 2 blocks + // - Spawn a secondary client and send FCUV2(head) + // - Wait for sync, which include syncing a pre-Withdrawals block, and verify withdrawn account's balance + // `, + // }, + // WithdrawalsForkHeight: 2, + // WithdrawalsBlockCount: 2, + // WithdrawalsPerBlock: 16, + // WithdrawableAccountCount: 16, + // }, + // SyncSteps: 1, + //}, // TODO: This test is failing, need to investigate. //&WithdrawalsSyncSpec{ // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ @@ -324,62 +324,62 @@ var Tests = []test.SpecInterface{ //}, ////Re-Org tests - &WithdrawalsReorgSpec{ - WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ - Spec: test.Spec{ - Name: "Withdrawals Fork on Block 1 - 1 Block Re-Org", - About: ` - Tests a simple 1 block re-org - `, - SlotsToSafe: big.NewInt(32), - SlotsToFinalized: big.NewInt(64), - TimeoutSeconds: 300, - }, - WithdrawalsForkHeight: 1, // Genesis is Pre-Withdrawals - WithdrawalsBlockCount: 16, - WithdrawalsPerBlock: 16, - }, - ReOrgBlockCount: 1, - ReOrgViaSync: false, - }, - &WithdrawalsReorgSpec{ - WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ - Spec: test.Spec{ - Name: "Withdrawals Fork on Block 1 - 8 Block Re-Org NewPayload", - About: ` - Tests a 8 block re-org using NewPayload - Re-org does not change withdrawals fork height - `, - SlotsToSafe: big.NewInt(32), - SlotsToFinalized: big.NewInt(64), - TimeoutSeconds: 300, - }, - WithdrawalsForkHeight: 1, // Genesis is Pre-Withdrawals - WithdrawalsBlockCount: 16, - WithdrawalsPerBlock: 16, - }, - ReOrgBlockCount: 8, - ReOrgViaSync: false, - }, - &WithdrawalsReorgSpec{ - WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ - Spec: test.Spec{ - Name: "Withdrawals Fork on Block 1 - 8 Block Re-Org, Sync", - About: ` - Tests a 8 block re-org using NewPayload - Re-org does not change withdrawals fork height - `, - SlotsToSafe: big.NewInt(32), - SlotsToFinalized: big.NewInt(64), - TimeoutSeconds: 300, - }, - WithdrawalsForkHeight: 1, // Genesis is Pre-Withdrawals - WithdrawalsBlockCount: 16, - WithdrawalsPerBlock: 16, - }, - ReOrgBlockCount: 8, - ReOrgViaSync: true, - }, + //&WithdrawalsReorgSpec{ + // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdrawals Fork on Block 1 - 1 Block Re-Org", + // About: ` + // Tests a simple 1 block re-org + // `, + // SlotsToSafe: big.NewInt(32), + // SlotsToFinalized: big.NewInt(64), + // TimeoutSeconds: 300, + // }, + // WithdrawalsForkHeight: 1, // Genesis is Pre-Withdrawals + // WithdrawalsBlockCount: 16, + // WithdrawalsPerBlock: 16, + // }, + // ReOrgBlockCount: 1, + // ReOrgViaSync: false, + //}, + //&WithdrawalsReorgSpec{ + // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdrawals Fork on Block 1 - 8 Block Re-Org NewPayload", + // About: ` + // Tests a 8 block re-org using NewPayload + // Re-org does not change withdrawals fork height + // `, + // SlotsToSafe: big.NewInt(32), + // SlotsToFinalized: big.NewInt(64), + // TimeoutSeconds: 300, + // }, + // WithdrawalsForkHeight: 1, // Genesis is Pre-Withdrawals + // WithdrawalsBlockCount: 16, + // WithdrawalsPerBlock: 16, + // }, + // ReOrgBlockCount: 8, + // ReOrgViaSync: false, + //}, + //&WithdrawalsReorgSpec{ + // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdrawals Fork on Block 1 - 8 Block Re-Org, Sync", + // About: ` + // Tests a 8 block re-org using NewPayload + // Re-org does not change withdrawals fork height + // `, + // SlotsToSafe: big.NewInt(32), + // SlotsToFinalized: big.NewInt(64), + // TimeoutSeconds: 300, + // }, + // WithdrawalsForkHeight: 1, // Genesis is Pre-Withdrawals + // WithdrawalsBlockCount: 16, + // WithdrawalsPerBlock: 16, + // }, + // ReOrgBlockCount: 8, + // ReOrgViaSync: true, + //}, //&WithdrawalsReorgSpec{ // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ // Spec: test.Spec{ @@ -1181,24 +1181,80 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { startAccount = ws.GetWithdrawalsStartAccount() nextIndex = uint64(0) ) + n := ws.WithdrawalsBlockCount + for n > 0 { - t.CLMock.ProduceBlocks(int(ws.WithdrawalsBlockCount), clmock.BlockProcessCallbacks{ - OnPayloadProducerSelected: func() { + t.CLMock.ProduceBlocks(1, clmock.BlockProcessCallbacks{ + OnPayloadProducerSelected: func() { - // Send some withdrawals - t.CLMock.NextWithdrawals, nextIndex = ws.GenerateWithdrawalsForBlock(nextIndex, startAccount) - ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber] = t.CLMock.NextWithdrawals - // Send some transactions - for i := uint64(0); i < ws.GetTransactionCountPerPayload(); i++ { - var destAddr = TX_CONTRACT_ADDRESSES[int(i)%len(TX_CONTRACT_ADDRESSES)] + // Send some withdrawals + t.CLMock.NextWithdrawals, nextIndex = ws.GenerateWithdrawalsForBlock(nextIndex, startAccount) + ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber] = t.CLMock.NextWithdrawals + // Send some transactions + for i := uint64(0); i < ws.GetTransactionCountPerPayload(); i++ { + var destAddr = TX_CONTRACT_ADDRESSES[int(i)%len(TX_CONTRACT_ADDRESSES)] + + _, err := helper.SendNextTransaction( + t.TestContext, + t.CLMock.NextBlockProducer, + &helper.BaseTransactionCreator{ + Recipient: &destAddr, + Amount: common.Big1, + Payload: nil, + TxType: t.TestTransactionType, + GasLimit: t.Genesis.GasLimit(), + ChainID: t.Genesis.Config().ChainID, + }, + ) - _, err := helper.SendNextTransaction( + if err != nil { + t.Fatalf("FAIL (%s): Error trying to send transaction: %v", t.TestName, err) + } + } + + }, + OnGetPayload: func() { + if !ws.SkipBaseVerifications { + + // Verify the list of withdrawals returned on the payload built + // completely matches the list provided in the + // engine_forkchoiceUpdatedV2 method call + if sentList, ok := ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber]; !ok { + panic("withdrawals sent list was not saved") + } else { + if len(sentList) != len(t.CLMock.LatestPayloadBuilt.Withdrawals) { + t.Fatalf("FAIL (%s): Incorrect list of withdrawals on built payload: want=%d, got=%d", t.TestName, len(sentList), len(t.CLMock.LatestPayloadBuilt.Withdrawals)) + } + for i := 0; i < len(sentList); i++ { + if err := test.CompareWithdrawal(sentList[i], t.CLMock.LatestPayloadBuilt.Withdrawals[i]); err != nil { + t.Fatalf("FAIL (%s): Incorrect withdrawal on index %d: %v", t.TestName, i, err) + } + } + + } + } + }, + }) + t.CLMock.ProduceBlocks(1, clmock.BlockProcessCallbacks{ + OnPayloadProducerSelected: func() { + // Get ExecuteWithdrawalsClaims + addresses := make([]common.Address, 0) + for _, w := range ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber-1] { + addresses = append(addresses, w.Address) + } + // Send claim transaction + claims, err := libgno.ExecuteWithdrawalsClaims(addresses) + if err != nil { + return + } + + _, err = helper.SendNextTransaction( t.TestContext, t.CLMock.NextBlockProducer, &helper.BaseTransactionCreator{ - Recipient: &destAddr, + Recipient: &libgno.WithdrawalsContractAddress, Amount: common.Big1, - Payload: nil, + Payload: claims, TxType: t.TestTransactionType, GasLimit: t.Genesis.GasLimit(), ChainID: t.Genesis.Config().ChainID, @@ -1208,72 +1264,30 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { if err != nil { t.Fatalf("FAIL (%s): Error trying to send transaction: %v", t.TestName, err) } - } - - }, - OnGetPayload: func() { - if !ws.SkipBaseVerifications { - // Verify the list of withdrawals returned on the payload built - // completely matches the list provided in the - // engine_forkchoiceUpdatedV2 method call - if sentList, ok := ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber]; !ok { - panic("withdrawals sent list was not saved") - } else { - if len(sentList) != len(t.CLMock.LatestPayloadBuilt.Withdrawals) { - t.Fatalf("FAIL (%s): Incorrect list of withdrawals on built payload: want=%d, got=%d", t.TestName, len(sentList), len(t.CLMock.LatestPayloadBuilt.Withdrawals)) - } - for i := 0; i < len(sentList); i++ { - if err := test.CompareWithdrawal(sentList[i], t.CLMock.LatestPayloadBuilt.Withdrawals[i]); err != nil { - t.Fatalf("FAIL (%s): Incorrect withdrawal on index %d: %v", t.TestName, i, err) + }, + OnForkchoiceBroadcast: func() { + if !ws.SkipBaseVerifications { + for _, addr := range ws.WithdrawalsHistory.GetAddressesWithdrawnOnBlock(t.CLMock.LatestExecutedPayload.Number - 1) { + //Test balance at `latest`, which should have the + //withdrawal applied. + latestBalance, err := getBalanceOfToken(t, addr, big.NewInt(int64(t.CLMock.LatestExecutedPayload.Number-1))) + if err != nil { + t.Fatalf("FAIL (%s): Error trying to get balance of token: %v, address: %v", t.TestName, err, addr.Hex()) } - } + newLatestBalance := latestBalance.Mul(latestBalance, big.NewInt(32)) + expectBalanceEqual := ws.WithdrawalsHistory.GetExpectedAccountBalance(addr, t.CLMock.LatestExecutedPayload.Number-1) - } - } - }, - OnNewPayloadBroadcast: func() { - //if !ws.SkipBaseVerifications { - // for _, addr := range ws.WithdrawalsHistory.GetAddressesWithdrawnOnBlock(t.CLMock.LatestExecutedPayload.Number) { - // // Test balance at `latest`, which should not yet have the - // // withdrawal applied. - // expectedAccountBalance := ws.WithdrawalsHistory.GetExpectedAccountBalance( - // addr, - // t.CLMock.LatestExecutedPayload.Number-1) - // r := t.TestEngine.TestBalanceAt(addr, nil) - // r.ExpectationDescription = fmt.Sprintf(` - // Requested balance for account %s on "latest" block - // after engine_newPayloadV2, expecting balance to be equal - // to value on previous block (%d), since the new payload - // has not yet been applied. - // `, - // addr, - // t.CLMock.LatestExecutedPayload.Number-1, - // ) - // r.ExpectBalanceEqual(expectedAccountBalance) - // } - //} - }, - OnForkchoiceBroadcast: func() { - if !ws.SkipBaseVerifications { - for _, addr := range ws.WithdrawalsHistory.GetAddressesWithdrawnOnBlock(t.CLMock.LatestExecutedPayload.Number) { - //Test balance at `latest`, which should have the - //withdrawal applied. - latestBalance, err := getBalanceOfToken(t, addr, nil) - if err != nil { - t.Fatalf("FAIL (%s): Error trying to get balance of token: %v, address: %v", t.TestName, err, addr.Hex()) + if newLatestBalance.Cmp(expectBalanceEqual) != 0 { + t.Fatalf("FAIL (%s): Incorrect balance on account %s after withdrawals applied: want=%d, got=%d", t.TestName, addr, expectBalanceEqual, latestBalance) + } } - newLatestBalance := latestBalance.Mul(latestBalance, big.NewInt(32)) - expectBalanceEqual := ws.WithdrawalsHistory.GetExpectedAccountBalance(addr, t.CLMock.LatestExecutedPayload.Number) - if newLatestBalance.Cmp(expectBalanceEqual) != 0 { - t.Fatalf("FAIL (%s): Incorrect balance on account %s after withdrawals applied: want=%d, got=%d", t.TestName, addr, expectBalanceEqual, latestBalance) - } } - - } - }, - }) + }, + }) + n-- + } // Iterate over balance history of withdrawn accounts using RPC and // check that the balances match expected values. @@ -1317,11 +1331,20 @@ func getBalanceOfToken(t *test.Env, account common.Address, block *big.Int) (*bi if err != nil { return nil, err } + //withdrawalsABI, err := libgno.GetWithdrawalsABI() + //if err != nil { + // return nil, err + //} + var result []interface{} + //withdrawalsContract := bind.NewBoundContract(libgno.WithdrawalsContractAddress, *withdrawalsABI, client, client, client) + opts := &bind.CallOpts{Pending: false, BlockNumber: block} + //err = withdrawalsContract.Call(opts, &result, "claimWithdrawal", account) + //if err != nil { + // return nil, err + //} // Call the balanceOf function contract := bind.NewBoundContract(libgno.GNOTokenAddress, *tokenABI, client, client, client) - var result []interface{} - opts := &bind.CallOpts{Pending: false, BlockNumber: block} err = contract.Call(opts, &result, "balanceOf", account) if err != nil { return nil, err From 81bc889fae7e861b1c2cf1d76bedb83a1e1b3b94 Mon Sep 17 00:00:00 2001 From: Marcos Antonio Maceo Reyes Date: Fri, 23 Jun 2023 03:05:03 -0400 Subject: [PATCH 04/27] [debug] claim not working on withdrawals --- .../engine/init/nethermind_genesis.json | 8 - simulators/ethereum/engine/libgno/gno.go | 2 +- .../engine/libgno/withdrawalsContract.go | 1034 +++++++++++++++++ .../engine/suites/withdrawals/tests.go | 168 ++- 4 files changed, 1152 insertions(+), 60 deletions(-) create mode 100644 simulators/ethereum/engine/libgno/withdrawalsContract.go diff --git a/simulators/ethereum/engine/init/nethermind_genesis.json b/simulators/ethereum/engine/init/nethermind_genesis.json index 90adc68907..1e82ea1240 100644 --- a/simulators/ethereum/engine/init/nethermind_genesis.json +++ b/simulators/ethereum/engine/init/nethermind_genesis.json @@ -290,10 +290,6 @@ "balance": "0", "constructor": "0x608060405234801561001057600080fd5b506040516109dd3803806109dd833981810160405261016081101561003457600080fd5b81019080805164010000000081111561004c57600080fd5b8201602081018481111561005f57600080fd5b815185602082028301116401000000008211171561007c57600080fd5b505060208201516040909201805191949293916401000000008111156100a157600080fd5b820160208101848111156100b457600080fd5b81518560208202830111640100000000821117156100d157600080fd5b505092919060200180516401000000008111156100ed57600080fd5b8201602081018481111561010057600080fd5b815185602082028301116401000000008211171561011d57600080fd5b5050602082015160408301516060840151608085015160a086015160c087015160e0909701518c51969950949750929591949093908b9060009061015d57fe5b60200260200101516001600160a01b0316636e85d53d8c60018151811061018057fe5b60200260200101518d60068151811061019557fe5b60200260200101518e6002815181106101aa57fe5b60200260200101518f6003815181106101bf57fe5b60200260200101518e8e8e6040518863ffffffff1660e01b815260040180886001600160a01b03166001600160a01b03168152602001876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b03168152602001806020018060200184151515158152602001838103835286818151815260200191508051906020019060200280838360005b8381101561028757818101518382015260200161026f565b50505050905001838103825285818151815260200191508051906020019060200280838360005b838110156102c65781810151838201526020016102ae565b505050509050019950505050505050505050600060405180830381600087803b1580156102f257600080fd5b505af1158015610306573d6000803e3d6000fd5b5050505060608851604051908082528060200260200182016040528015610337578160200160208202803883390190505b50905060005b8151811015610410578c60008151811061035357fe5b60200260200101516001600160a01b031663a26301f98b838151811061037557fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156103c357600080fd5b505afa1580156103d7573d6000803e3d6000fd5b505050506040513d60208110156103ed57600080fd5b505182518390839081106103fd57fe5b602090810291909101015260010161033d565b508b60038151811061041e57fe5b60200260200101516001600160a01b031663cc4a66678d60008151811061044157fe5b60200260200101518e60068151811061045657fe5b6020026020010151848b8b8b8b8b6040518963ffffffff1660e01b815260040180896001600160a01b03166001600160a01b03168152602001886001600160a01b03166001600160a01b0316815260200180602001878152602001868152602001858152602001848152602001838152602001828103825288818151815260200191508051906020019060200280838360005b838110156105015781810151838201526020016104e9565b505050509050019950505050505050505050600060405180830381600087803b15801561052d57600080fd5b505af1158015610541573d6000803e3d6000fd5b50505050508a60018151811061055357fe5b60200260200101516001600160a01b031663485cc9558c60008151811061057657fe5b602002602001015160006040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b03168152602001826001600160a01b03166001600160a01b0316815260200192505050600060405180830381600087803b1580156105e157600080fd5b505af11580156105f5573d6000803e3d6000fd5b505050508a60028151811061060657fe5b60200260200101516001600160a01b03166328804dbd828d60008151811061062a57fe5b602002602001015160016040518463ffffffff1660e01b815260040180848152602001836001600160a01b03166001600160a01b03168152602001821515151581526020019350505050600060405180830381600087803b15801561068e57600080fd5b505af11580156106a2573d6000803e3d6000fd5b5050604080516001808252818301909252606093509150602080830190803883390190505090508a816000815181106106d757fe5b60200260200101906001600160a01b031690816001600160a01b0316815250508b60048151811061070457fe5b60200260200101516001600160a01b03166390482d72828e60058151811061072857fe5b60200260200101518f60008151811061073d57fe5b60200260200101516040518463ffffffff1660e01b81526004018080602001846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b03168152602001828103825285818151815260200191508051906020019060200280838360005b838110156107c45781810151838201526020016107ac565b50505050905001945050505050600060405180830381600087803b1580156107eb57600080fd5b505af11580156107ff573d6000803e3d6000fd5b505050508b60058151811061081057fe5b60200260200101516001600160a01b031663462d0b2e828e60008151811061083457fe5b60200260200101516040518363ffffffff1660e01b81526004018080602001836001600160a01b03166001600160a01b03168152602001828103825284818151815260200191508051906020019060200280838360005b838110156108a357818101518382015260200161088b565b505050509050019350505050600060405180830381600087803b1580156108c957600080fd5b505af11580156108dd573d6000803e3d6000fd5b505050508b6006815181106108ee57fe5b60200260200101516001600160a01b031663c4d66de88d60008151811061091157fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561096157600080fd5b505af1158015610975573d6000803e3d6000fd5b5050505060004311156109855733ff5b505050505050505050505050603e8061099f6000396000f3fe6080604052600080fdfea265627a7a72305820a55f32c63be7e06dfeb1da79cfe2235ed39ef2873ad64c118154d8cdff8e697e64736f6c634300050a00320000000000000000000000000000000000000000000000000000000000000160000000000000000000000000b03a86b3126157c039b55e21d378587ccfc04d45000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000000000000000000000000000000000000000004c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000070000000000000000000000001000000000000000000000000000000000000001000000000000000000000000200000000000000000000000000000000000000100000000000000000000000030000000000000000000000000000000000000010000000000000000000000001100000000000000000000000000000000000001000000000000000000000000400000000000000000000000000000000000000100000000000000000000000050000000000000000000000000000000000000010000000000000000000000006100000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000014747a698ec1227e6753026c08b29b4d5d3bc48400000000000000000000000056d421c0ac39976e89fa400d34ca6579417b84ca0000000000000000000000005cd99ac2f0f8c25a1e670f6bab19d52aad69d87500000000000000000000000060f1cf46b42df059b98acf67c1dd7771b100e124000000000000000000000000655e97ba0f63a56c2b56eb3e84f7bf42b20bae14000000000000000000000000755b6259938d140626301c0b6026c1c00c9ed5d9000000000000000000000000a8010da9cb0ac018c86a06301963853cc371a18c000000000000000000000000e11c7ffea05634889f39a1d997772b73adfd685b000000000000000000000000e621f323f5cb0ca55a041aeea0f025ce338b8aee000000000000000000000000f85bb4a67db28522644cbe63595d1665b64090ef000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000047200b51fcbf7177c24c1a484c960be8bf9abf00000000000000000000000001753f99abe0433fc81e396bc1bdabec6b0f1d49d0000000000000000000000001fd4b06403e95eb0114cb3e8f6b71f7a0cc58d7300000000000000000000000041bec4dcb8dd230cb4e077c5fda61d37798b06d90000000000000000000000004b56e96ad92b4d81f533c5716988f9f3665125d20000000000000000000000005d46a20c7e9bd3556e36d39ea1a931f9fe994519000000000000000000000000cc80dff6b6386b56213a9f2701a67ebeca0bbea8000000000000000000000000dc8a45c55f83ac461bc49662324d2ad2ea811e84000000000000000000000000dd3cd543a443bd405bfbea1165753794906bd994000000000000000000000000fdd90b7d2b52a6232675f54bb2f03a5dfb2e832a" }, - "0xbabe2bed00000000000000000000000000000001": { - "balance": "0", - "constructor": "0x60806040523480156200001157600080fd5b50604051620024103803806200241083398101604081905262000034916200037b565b6200003f83620000aa565b620000756040516200005190620001fa565b604051809103906000f0801580156200006e573d6000803e3d6000fd5b5062000146565b81516200008a90600390602085019062000208565b508051620000a090600490602084019062000208565b5050505062000442565b6000620000b6620001db565b90506001600160a01b038216620000cc57600080fd5b816001600160a01b0316816001600160a01b03161415620000ec57600080fd5b600080516020620023d0833981519152829055604080516001600160a01b038084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b6001600160a01b0381166200015a57600080fd5b6001600160a01b0381166200017c600080516020620023f08339815191525490565b6001600160a01b031614156200019157600080fd5b600080516020620023f08339815191528190556040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000620001f5600080516020620023d08339815191525490565b905090565b611af180620008df83390190565b828054620002169062000405565b90600052602060002090601f0160209004810192826200023a576000855562000285565b82601f106200025557805160ff191683800117855562000285565b8280016001018555821562000285579182015b828111156200028557825182559160200191906001019062000268565b506200029392915062000297565b5090565b5b8082111562000293576000815560010162000298565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620002d657600080fd5b81516001600160401b0380821115620002f357620002f3620002ae565b604051601f8301601f19908116603f011681019082821181831017156200031e576200031e620002ae565b816040528381526020925086838588010111156200033b57600080fd5b600091505b838210156200035f578582018301518183018401529082019062000340565b83821115620003715760008385830101525b9695505050505050565b6000806000606084860312156200039157600080fd5b83516001600160a01b0381168114620003a957600080fd5b60208501519093506001600160401b0380821115620003c757600080fd5b620003d587838801620002c4565b93506040860151915080821115620003ec57600080fd5b50620003fb86828701620002c4565b9150509250925092565b600181811c908216806200041a57607f821691505b602082108114156200043c57634e487b7160e01b600052602260045260246000fd5b50919050565b61048d80620004526000396000f3fe60806040526004361061003f5760003560e01c80633659cfe6146100af5780635c60da1b146100d1578063704b6c021461012a578063f851a4401461014a575b60006100697f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff811661008b57600080fd5b3660008037600080366000845af43d6000803e8080156100aa573d6000f35b3d6000fd5b3480156100bb57600080fd5b506100cf6100ca36600461041a565b61015f565b005b3480156100dd57600080fd5b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b34801561013657600080fd5b506100cf61014536600461041a565b6101c4565b34801561015657600080fd5b50610101610226565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101b857600080fd5b6101c181610255565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461021d57600080fd5b6101c18161033d565b60006102507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b73ffffffffffffffffffffffffffffffffffffffff811661027557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166102b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b73ffffffffffffffffffffffffffffffffffffffff1614156102d557600080fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000610347610226565b905073ffffffffffffffffffffffffffffffffffffffff821661036957600080fd5b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103a257600080fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038290556040805173ffffffffffffffffffffffffffffffffffffffff8084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b60006020828403121561042c57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461045057600080fd5b939250505056fea2646970667358221220d30683a8194480eba778aea87b3fdfe3e4c8e6ec3da161d7a16b56667b1372a964736f6c6343000809003360806040523480156200001157600080fd5b506040805160208082018084526000808452845192830190945292815281519192909162000042916003916200006b565b508051620000589060049060208401906200006b565b50506005805460ff19169055506200014e565b828054620000799062000111565b90600052602060002090601f0160209004810192826200009d5760008555620000e8565b82601f10620000b857805160ff1916838001178555620000e8565b82800160010185558215620000e8579182015b82811115620000e8578251825591602001919060010190620000cb565b50620000f6929150620000fa565b5090565b5b80821115620000f65760008155600101620000fb565b600181811c908216806200012657607f821691505b602082108114156200014857634e487b7160e01b600052602260045260246000fd5b50919050565b611993806200015e6000396000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c80635c975abb116100cd5780639dc29fac11610081578063a9059cbb11610066578063a9059cbb14610298578063dd62ed3e146102ab578063fca3b5aa146102f157600080fd5b80639dc29fac14610272578063a457c2d71461028557600080fd5b806370a08231116100b257806370a082311461022c5780638456cb591461026257806395d89b411461026a57600080fd5b80635c975abb1461020e57806369ffa08a1461021957600080fd5b8063313ce567116101245780633f4ba83a116101095780633f4ba83a146101de5780634000aea0146101e857806340c10f19146101fb57600080fd5b8063313ce567146101bc57806339509351146101cb57600080fd5b806306fdde0314610156578063095ea7b31461017457806318160ddd1461019757806323b872dd146101a9575b600080fd5b61015e610304565b60405161016b9190611621565b60405180910390f35b6101876101823660046116bd565b610396565b604051901515815260200161016b565b6002545b60405190815260200161016b565b6101876101b73660046116e7565b6103ac565b6040516012815260200161016b565b6101876101d93660046116bd565b610497565b6101e66104e0565b005b6101e66101f6366004611723565b610543565b6101e66102093660046116bd565b610666565b60055460ff16610187565b6101e66102273660046117aa565b610710565b61019b61023a3660046117dd565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6101e6610773565b61015e6107d4565b6101e66102803660046116bd565b6107e3565b6101876102933660046116bd565b610889565b6101876102a63660046116bd565b610961565b61019b6102b93660046117aa565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6101e66102ff3660046117dd565b61096e565b606060038054610313906117ff565b80601f016020809104026020016040519081016040528092919081815260200182805461033f906117ff565b801561038c5780601f106103615761010080835404028352916020019161038c565b820191906000526020600020905b81548152906001019060200180831161036f57829003601f168201915b5050505050905090565b60006103a3338484610a98565b50600192915050565b60006103b9848484610c4c565b73ffffffffffffffffffffffffffffffffffffffff841660009081526001602090815260408083203384529091529020548281101561047f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61048c8533858403610a98565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490916103a39185906104db908690611882565b610a98565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461053957600080fd5b610541610f0c565b565b3361054f818686610c4c565b6040517fa4c0ed3600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86169063a4c0ed36906105a790849088908890889060040161189a565b602060405180830381600087803b1580156105c157600080fd5b505af11580156105d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f9919061190b565b61065f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f534243546f6b656e3a204552433637372063616c6c6261636b206661696c65646044820152606401610476565b5050505050565b600554610100900473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610702576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f534243546f6b656e3a206e6f742061206d696e746572000000000000000000006044820152606401610476565b61070c8282610fed565b5050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461076957600080fd5b61070c8282611119565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107cc57600080fd5b610541611147565b606060048054610313906117ff565b600554610100900473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461087f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f534243546f6b656e3a206e6f742061206d696e746572000000000000000000006044820152606401610476565b61070c8282611207565b33600090815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff861684529091528120548281101561094a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610476565b6109573385858403610a98565b5060019392505050565b60006103a3338484610c4c565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c757600080fd5b600554610100900473ffffffffffffffffffffffffffffffffffffffff1615610a4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f534243546f6b656e3a206d696e74657220616c726561647920736574000000006044820152606401610476565b6005805473ffffffffffffffffffffffffffffffffffffffff909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b73ffffffffffffffffffffffffffffffffffffffff8316610b3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610476565b73ffffffffffffffffffffffffffffffffffffffff8216610bdd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610476565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316610cef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610476565b73ffffffffffffffffffffffffffffffffffffffff8216610d92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610476565b610d9d8383836113fd565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610e53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610476565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220858503905591851681529081208054849290610e97908490611882565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efd91815260200190565b60405180910390a35b50505050565b60055460ff16610f78576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610476565b600580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b73ffffffffffffffffffffffffffffffffffffffff821661106a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610476565b611076600083836113fd565b80600260008282546110889190611882565b909155505073ffffffffffffffffffffffffffffffffffffffff8216600090815260208190526040812080548392906110c2908490611882565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b73ffffffffffffffffffffffffffffffffffffffff821661113d5761070c81611490565b61070c82826114d5565b60055460ff16156111b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610476565b600580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fc33390565b73ffffffffffffffffffffffffffffffffffffffff82166112aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610476565b6112b6826000836113fd565b73ffffffffffffffffffffffffffffffffffffffff82166000908152602081905260409020548181101561136c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610476565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604081208383039055600280548492906113a890849061192d565b909155505060405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610c3f565b505050565b60055460ff16156113f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e7366657220776860448201527f696c6520706175736564000000000000000000000000000000000000000000006064820152608401610476565b604051479073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156113f8573d6000803e3d6000fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8416906370a082319060240160206040518083038186803b15801561153d57600080fd5b505afa158015611551573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115759190611944565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390529192509084169063a9059cbb90604401602060405180830381600087803b1580156115e957600080fd5b505af11580156115fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f06919061190b565b600060208083528351808285015260005b8181101561164e57858101830151858201604001528201611632565b81811115611660576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146116b857600080fd5b919050565b600080604083850312156116d057600080fd5b6116d983611694565b946020939093013593505050565b6000806000606084860312156116fc57600080fd5b61170584611694565b925061171360208501611694565b9150604084013590509250925092565b6000806000806060858703121561173957600080fd5b61174285611694565b935060208501359250604085013567ffffffffffffffff8082111561176657600080fd5b818701915087601f83011261177a57600080fd5b81358181111561178957600080fd5b88602082850101111561179b57600080fd5b95989497505060200194505050565b600080604083850312156117bd57600080fd5b6117c683611694565b91506117d460208401611694565b90509250929050565b6000602082840312156117ef57600080fd5b6117f882611694565b9392505050565b600181811c9082168061181357607f821691505b6020821081141561184d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561189557611895611853565b500190565b73ffffffffffffffffffffffffffffffffffffffff8516815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01601019392505050565b60006020828403121561191d57600080fd5b815180151581146117f857600080fd5b60008282101561193f5761193f611853565b500390565b60006020828403121561195657600080fd5b505191905056fea2646970667358221220563bbbc3c806a59db76f46ea4a0528959d097d2db2b4e819dc578496610174d964736f6c63430008090033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc000000000000000000000000face2face0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000953424320546f6b656e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045342435400000000000000000000000000000000000000000000000000000000" - }, "0xbabe2bed00000000000000000000000000000002": { "balance": "0", "constructor": "0x60806040523480156200001157600080fd5b5060405162001b8538038062001b8583398101604081905262000034916200037b565b6200003f83620000aa565b620000756040516200005190620001fa565b604051809103906000f0801580156200006e573d6000803e3d6000fd5b5062000146565b81516200008a90600390602085019062000208565b508051620000a090600490602084019062000208565b5050505062000442565b6000620000b6620001db565b90506001600160a01b038216620000cc57600080fd5b816001600160a01b0316816001600160a01b03161415620000ec57600080fd5b60008051602062001b45833981519152829055604080516001600160a01b038084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b6001600160a01b0381166200015a57600080fd5b6001600160a01b0381166200017c60008051602062001b658339815191525490565b6001600160a01b031614156200019157600080fd5b60008051602062001b658339815191528190556040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000620001f560008051602062001b458339815191525490565b905090565b61126680620008df83390190565b828054620002169062000405565b90600052602060002090601f0160209004810192826200023a576000855562000285565b82601f106200025557805160ff191683800117855562000285565b8280016001018555821562000285579182015b828111156200028557825182559160200191906001019062000268565b506200029392915062000297565b5090565b5b8082111562000293576000815560010162000298565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620002d657600080fd5b81516001600160401b0380821115620002f357620002f3620002ae565b604051601f8301601f19908116603f011681019082821181831017156200031e576200031e620002ae565b816040528381526020925086838588010111156200033b57600080fd5b600091505b838210156200035f578582018301518183018401529082019062000340565b83821115620003715760008385830101525b9695505050505050565b6000806000606084860312156200039157600080fd5b83516001600160a01b0381168114620003a957600080fd5b60208501519093506001600160401b0380821115620003c757600080fd5b620003d587838801620002c4565b93506040860151915080821115620003ec57600080fd5b50620003fb86828701620002c4565b9150509250925092565b600181811c908216806200041a57607f821691505b602082108114156200043c57634e487b7160e01b600052602260045260246000fd5b50919050565b61048d80620004526000396000f3fe60806040526004361061003f5760003560e01c80633659cfe6146100af5780635c60da1b146100d1578063704b6c021461012a578063f851a4401461014a575b60006100697f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff811661008b57600080fd5b3660008037600080366000845af43d6000803e8080156100aa573d6000f35b3d6000fd5b3480156100bb57600080fd5b506100cf6100ca36600461041a565b61015f565b005b3480156100dd57600080fd5b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b34801561013657600080fd5b506100cf61014536600461041a565b6101c4565b34801561015657600080fd5b50610101610226565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101b857600080fd5b6101c181610255565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461021d57600080fd5b6101c18161033d565b60006102507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b73ffffffffffffffffffffffffffffffffffffffff811661027557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166102b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b73ffffffffffffffffffffffffffffffffffffffff1614156102d557600080fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000610347610226565b905073ffffffffffffffffffffffffffffffffffffffff821661036957600080fd5b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103a257600080fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038290556040805173ffffffffffffffffffffffffffffffffffffffff8084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b60006020828403121561042c57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461045057600080fd5b939250505056fea264697066735822122097d86ab3fc05dd7aa2fa954f94bcb5b52cb229c19b25b78b4c717732b858440e64736f6c6343000809003360806040523480156200001157600080fd5b506040805160208082018084526000808452845192830190945292815281519192909162000042916003916200006b565b508051620000589060049060208401906200006b565b50506005805460ff19169055506200014e565b828054620000799062000111565b90600052602060002090601f0160209004810192826200009d5760008555620000e8565b82601f10620000b857805160ff1916838001178555620000e8565b82800160010185558215620000e8579182015b82811115620000e8578251825591602001919060010190620000cb565b50620000f6929150620000fa565b5090565b5b80821115620000f65760008155600101620000fb565b600181811c908216806200012657607f821691505b602082108114156200014857634e487b7160e01b600052602260045260246000fd5b50919050565b611108806200015e6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80635c975abb11610097578063a457c2d711610066578063a457c2d7146101fb578063a9059cbb1461020e578063dd62ed3e14610221578063f0df89e41461026757600080fd5b80635c975abb146101aa57806370a08231146101b55780638456cb59146101eb57806395d89b41146101f357600080fd5b8063313ce567116100d3578063313ce5671461016b578063395093511461017a5780633f4ba83a1461018d57806340c10f191461019757600080fd5b806306fdde0314610105578063095ea7b31461012357806318160ddd1461014657806323b872dd14610158575b600080fd5b61010d61027a565b60405161011a9190610ee8565b60405180910390f35b610136610131366004610f84565b61030c565b604051901515815260200161011a565b6002545b60405190815260200161011a565b610136610166366004610fae565b610322565b6040516012815260200161011a565b610136610188366004610f84565b61040d565b610195610456565b005b6101956101a5366004610f84565b6104b9565b60055460ff16610136565b61014a6101c3366004610fea565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b610195610520565b61010d610581565b610136610209366004610f84565b610590565b61013661021c366004610f84565b610668565b61014a61022f36600461100c565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b610195610275366004610f84565b610675565b6060600380546102899061103f565b80601f01602080910402602001604051908101604052809291908181526020018280546102b59061103f565b80156103025780601f106102d757610100808354040283529160200191610302565b820191906000526020600020905b8154815290600101906020018083116102e557829003601f168201915b5050505050905090565b6000610319338484610716565b50600192915050565b600061032f8484846108c9565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600160209081526040808320338452909152902054828110156103f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104028533858403610716565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091610319918590610451908690611093565b610716565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104af57600080fd5b6104b7610b88565b565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461051257600080fd5b61051c8282610c69565b5050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461057957600080fd5b6104b7610d95565b6060600480546102899061103f565b33600090815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281205482811015610651576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016103ec565b61065e3385858403610716565b5060019392505050565b60006103193384846108c9565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106ce57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260208190526040902054808211156107025780610704565b815b91506107118333846108c9565b505050565b73ffffffffffffffffffffffffffffffffffffffff83166107b8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016103ec565b73ffffffffffffffffffffffffffffffffffffffff821661085b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016103ec565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff831661096c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016103ec565b73ffffffffffffffffffffffffffffffffffffffff8216610a0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016103ec565b610a1a838383610e55565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610ad0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016103ec565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220858503905591851681529081208054849290610b14908490611093565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b7a91815260200190565b60405180910390a350505050565b60055460ff16610bf4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016103ec565b600580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b73ffffffffffffffffffffffffffffffffffffffff8216610ce6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016103ec565b610cf260008383610e55565b8060026000828254610d049190611093565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604081208054839290610d3e908490611093565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60055460ff1615610e02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016103ec565b600580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610c3f3390565b60055460ff1615610711576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e7366657220776860448201527f696c65207061757365640000000000000000000000000000000000000000000060648201526084016103ec565b600060208083528351808285015260005b81811015610f1557858101830151858201604001528201610ef9565b81811115610f27576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610f7f57600080fd5b919050565b60008060408385031215610f9757600080fd5b610fa083610f5b565b946020939093013593505050565b600080600060608486031215610fc357600080fd5b610fcc84610f5b565b9250610fda60208501610f5b565b9150604084013590509250925092565b600060208284031215610ffc57600080fd5b61100582610f5b565b9392505050565b6000806040838503121561101f57600080fd5b61102883610f5b565b915061103660208401610f5b565b90509250929050565b600181811c9082168061105357607f821691505b6020821081141561108d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082198211156110cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea2646970667358221220954a8093073e898b5a05c67a8a02accb8510a2022bd5292bd33dd875db9f954664736f6c63430008090033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc000000000000000000000000face2face0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000095374616b6520474e4f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003474e4f0000000000000000000000000000000000000000000000000000000000" @@ -302,10 +298,6 @@ "balance": "0", "constructor": "0x60806040523480156200001157600080fd5b50604051620042be380380620042be8339810160408190526200003491620002fe565b6200003f8262000183565b62000086816040516200005290620002d3565b6001600160a01b039091168152602001604051809103906000f0801580156200007f573d6000803e3d6000fd5b506200021f565b60005b62000097600160206200034c565b8110156200017a57600260018260208110620000b757620000b762000366565b015460018360208110620000cf57620000cf62000366565b015460408051602081019390935282015260600160408051601f1981840301815290829052620000ff916200037c565b602060405180830381855afa1580156200011d573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190620001429190620003ba565b6001620001508382620003d4565b6020811062000163576200016362000366565b0155806200017181620003ef565b91505062000089565b5050506200040d565b60006200018f620002b4565b90506001600160a01b038216620001a557600080fd5b816001600160a01b0316816001600160a01b03161415620001c557600080fd5b6000805160206200427e833981519152829055604080516001600160a01b038084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b6001600160a01b0381166200023357600080fd5b6001600160a01b038116620002556000805160206200429e8339815191525490565b6001600160a01b031614156200026a57600080fd5b6000805160206200429e8339815191528190556040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000620002ce6000805160206200427e8339815191525490565b905090565b6139d480620008aa83390190565b80516001600160a01b0381168114620002f957600080fd5b919050565b600080604083850312156200031257600080fd5b6200031d83620002e1565b91506200032d60208401620002e1565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b60008282101562000361576200036162000336565b500390565b634e487b7160e01b600052603260045260246000fd5b6000825160005b818110156200039f576020818601810151858301520162000383565b81811115620003af576000828501525b509190910192915050565b600060208284031215620003cd57600080fd5b5051919050565b60008219821115620003ea57620003ea62000336565b500190565b600060001982141562000406576200040662000336565b5060010190565b61048d806200041d6000396000f3fe60806040526004361061003f5760003560e01c80633659cfe6146100af5780635c60da1b146100d1578063704b6c021461012a578063f851a4401461014a575b60006100697f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff811661008b57600080fd5b3660008037600080366000845af43d6000803e8080156100aa573d6000f35b3d6000fd5b3480156100bb57600080fd5b506100cf6100ca36600461041a565b61015f565b005b3480156100dd57600080fd5b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b34801561013657600080fd5b506100cf61014536600461041a565b6101c4565b34801561015657600080fd5b50610101610226565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101b857600080fd5b6101c181610255565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461021d57600080fd5b6101c18161033d565b60006102507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b73ffffffffffffffffffffffffffffffffffffffff811661027557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166102b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b73ffffffffffffffffffffffffffffffffffffffff1614156102d557600080fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000610347610226565b905073ffffffffffffffffffffffffffffffffffffffff821661036957600080fd5b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103a257600080fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038290556040805173ffffffffffffffffffffffffffffffffffffffff8084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b60006020828403121561042c57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461045057600080fd5b939250505056fea26469706673582212207747c650996bfd5b0a51931c0b302249e424b5fc2d92f1d2288b11d9e3956c8364736f6c6343000809003360a06040523480156200001157600080fd5b50604051620039d4380380620039d4833981016040819052620000349162000050565b6000805460ff191690556001600160a01b031660805262000082565b6000602082840312156200006357600080fd5b81516001600160a01b03811681146200007b57600080fd5b9392505050565b6080516138fe620000d6600039600081816101f10152818161047f0152818161062e015281816107d701528181610b8001528181610c2d015281816116a50152818161193601526119c701526138fe6000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c806379d0c0bc116100b2578063bb30b8fd11610081578063c5f2892f11610066578063c5f2892f146102bf578063c82655b7146102c7578063d74d11e9146102da57600080fd5b8063bb30b8fd1461028c578063be7ab51b1461029f57600080fd5b806379d0c0bc1461024b5780638456cb591461025e578063a3066aab14610266578063a4c0ed361461027957600080fd5b80634694bd1e11610109578063621fd130116100ee578063621fd130146101d7578063640415bf146101ec57806369ffa08a1461023857600080fd5b80634694bd1e146101b95780635c975abb146101cc57600080fd5b806301ffc9a71461013b5780630cac9f311461016357806324db4c46146101785780633f4ba83a146101b1575b600080fd5b61014e610149366004612dd3565b6102ed565b60405190151581526020015b60405180910390f35b610176610171366004612eef565b6103d2565b005b6101a3610186366004612f89565b805160208183018101805160428252928201919093012091525481565b60405190815260200161015a565b610176610525565b6101766101c7366004612fe8565b610588565b60005460ff1661014e565b6101df610753565b60405161015a9190613097565b6102137f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161015a565b610176610246366004612fe8565b610765565b6101766102593660046130f6565b6108a8565b610176610ac6565b610176610274366004613170565b610b27565b61014e6102873660046131cf565b610ba7565b61017661029a36600461322b565b6110c3565b6101a36102ad366004613170565b60436020526000908152604090205481565b6101a3611108565b6101766102d536600461326d565b611337565b6101766102e8366004613170565b6118ed565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000148061038057507fffffffff0000000000000000000000000000000000000000000000000000000082167fab41c72e00000000000000000000000000000000000000000000000000000000145b806103cc57507fffffffff0000000000000000000000000000000000000000000000000000000082167fa4c0ed3600000000000000000000000000000000000000000000000000000000145b92915050565b60005460ff1615610444576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064015b60405180910390fd5b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906323b872dd90606401602060405180830381600087803b1580156104d857600080fd5b505af11580156104ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105109190613331565b5061051e85858585856119f1565b5050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461057e57600080fd5b610586612474565b565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105e157600080fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff808416916339f47693917f000000000000000000000000000000000000000000000000000000000000000091908516906370a082319060240160206040518083038186803b15801561067357600080fd5b505afa158015610687573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ab9190613353565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401602060405180830381600087803b15801561071657600080fd5b505af115801561072a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074e9190613353565b505050565b6060610760604154612555565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107be57600080fd5b8173ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16141561089a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f4465706f736974436f6e74726163743a206e6f7420616c6c6f77656420746f2060448201527f636c61696d206465706f73697420746f6b656e00000000000000000000000000606482015260840161043b565b6108a482826127c9565b5050565b3373fffffffffffffffffffffffffffffffffffffffe148061091657507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6109c8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604d60248201527f546869732066756e6374696f6e2073686f756c642062652063616c6c6564206f60448201527f6e6c792062792053595354454d5f5749544844524157414c5f4558454355544f60648201527f52206f72205f61646d696e282900000000000000000000000000000000000000608482015260a40161043b565b8281146109d7576109d761336c565b60005b83811015610abe57600060208686848181106109f8576109f861339b565b9050602002016020810190610a0d91906133ca565b610a259067ffffffffffffffff16633b9aca00613423565b610a2f919061348f565b90508060436000868686818110610a4857610a4861339b565b9050602002016020810190610a5d9190613170565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610aa691906134a3565b90915550610ab791508290506134bb565b90506109da565b505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b1f57600080fd5b6105866127f7565b73ffffffffffffffffffffffffffffffffffffffff811660009081526043602052604090205480156108a45773ffffffffffffffffffffffffffffffffffffffff8083166000908152604360205260408120556108a4907f00000000000000000000000000000000000000000000000000000000000000001683836128b7565b6000805460ff1615610c15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161043b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610cd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4465706f736974436f6e74726163743a206e6f742061206465706f736974207460448201527f6f6b656e00000000000000000000000000000000000000000000000000000000606482015260840161043b565b610ce460b0836134f4565b602014610d73576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f4465706f736974436f6e74726163743a20696e636f7272656374206465706f7360448201527f69742064617461206c656e677468000000000000000000000000000000000000606482015260840161043b565b6000610d8060b08461348f565b905060008111610e12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f42617463684465706f7369743a20596f752073686f756c64206465706f73697460448201527f206174206c65617374206f6e652076616c696461746f72000000000000000000606482015260840161043b565b846001821115610f58576080821115610ead576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f42617463684465706f7369743a20596f752063616e206465706f736974206d6160448201527f78203132382076616c696461746f727320617420612074696d65000000000000606482015260840161043b565b610ebf82670de0b6b3a7640000613423565b8614610f4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f42617463684465706f7369743a206261746368206465706f736974732072657160448201527f75697265203120474e4f206465706f73697420616d6f756e7400000000000000606482015260840161043b565b50670de0b6b3a76400005b6000610f676020828789613508565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293506020925050505b858110156110b4576000878288610fba8260306134a3565b92610fc793929190613508565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509394508b92508a915061100d90508560306134a3565b906110198660906134a3565b9261102693929190613508565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509394508c92508b915061106c90508660906134a3565b906110788760b06134a3565b9261108593929190613508565b61108e91613532565b905061109d838684848a6119f1565b50505060b0816110ad91906134a3565b9050610fa2565b50600198975050505050505050565b60005b8181101561074e576110f88383838181106110e3576110e361339b565b90506020020160208101906102749190613170565b611101816134bb565b90506110c6565b6041546000908190815b60208110156112955781600116600114156111d15760026021826020811061113c5761113c61339b565b01546040805160208101929092528101859052606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261118a9161356e565b602060405180830381855afa1580156111a7573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906111ca9190613353565b9250611276565b600283600183602081106111e7576111e761339b565b0154604080516020810193909352820152606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526112339161356e565b602060405180830381855afa158015611250573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906112739190613353565b92505b61128160028361348f565b91508061128d816134bb565b915050611112565b506002826112a4604154612555565b6040516112b892919060009060200161358a565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526112f09161356e565b602060405180830381855afa15801561130d573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906113309190613353565b9250505090565b60005460ff16156113a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161043b565b8080611432576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f42617463684465706f7369743a20596f752073686f756c64206465706f73697460448201527f206174206c65617374206f6e652076616c696461746f72000000000000000000606482015260840161043b565b60808111156114c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f42617463684465706f7369743a20596f752063616e206465706f736974206d6160448201527f78203132382076616c696461746f727320617420612074696d65000000000000606482015260840161043b565b6114ce816030613423565b881461155c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f42617463684465706f7369743a205075626b657920636f756e7420646f6e277460448201527f206d617463680000000000000000000000000000000000000000000000000000606482015260840161043b565b611567816060613423565b84146115f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f42617463684465706f7369743a205369676e61747572657320636f756e74206460448201527f6f6e2774206d6174636800000000000000000000000000000000000000000000606482015260840161043b565b60208614611685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f42617463684465706f7369743a205769746864726177616c2043726564656e7460448201527f69616c7320636f756e7420646f6e2774206d6174636800000000000000000000606482015260840161043b565b670de0b6b3a764000073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166323b872dd33306116d68686613423565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff93841660048201529290911660248301526044820152606401602060405180830381600087803b15801561174a57600080fd5b505af115801561175e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117829190613331565b5060005b828110156118e05760008b8b61179d846030613423565b906117a98560016134a3565b6117b4906030613423565b926117c193929190613508565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509394508b92508a91506118079050856060613423565b906118138660016134a3565b61181e906060613423565b9261182b93929190613508565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090506118cd828c8c8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508692508c91508b9050888181106118c0576118c061339b565b90506020020135886119f1565b5050806118d9906134bb565b9050611786565b5050505050505050505050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526119ee90829073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b15801561197857600080fd5b505afa15801561198c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b09190613353565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691906128b7565b50565b6119fc816020613423565b90508451603014611a8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4465706f736974436f6e74726163743a20696e76616c6964207075626b65792060448201527f6c656e6774680000000000000000000000000000000000000000000000000000606482015260840161043b565b8351602014611b20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f4465706f736974436f6e74726163743a20696e76616c6964207769746864726160448201527f77616c5f63726564656e7469616c73206c656e67746800000000000000000000606482015260840161043b565b8251606014611bb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4465706f736974436f6e74726163743a20696e76616c6964207369676e61747560448201527f7265206c656e6774680000000000000000000000000000000000000000000000606482015260840161043b565b670de0b6b3a7640000811015611c49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4465706f736974436f6e74726163743a206465706f7369742076616c7565207460448201527f6f6f206c6f770000000000000000000000000000000000000000000000000000606482015260840161043b565b611c57633b9aca00826134f4565b15611ce4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f4465706f736974436f6e74726163743a206465706f7369742076616c7565206e60448201527f6f74206d756c7469706c65206f66206777656900000000000000000000000000606482015260840161043b565b6000611cf4633b9aca008361348f565b905067ffffffffffffffff811115611d8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4465706f736974436f6e74726163743a206465706f7369742076616c7565207460448201527f6f6f206869676800000000000000000000000000000000000000000000000000606482015260840161043b565b6000611d9982612555565b90507f649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c587878388611dcb604154612555565b604051611ddc9594939291906135de565b60405180910390a16000600288600060801b604051602001611dff92919061364b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052611e379161356e565b602060405180830381855afa158015611e54573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611e779190613353565b9050600086806020019051810190611e8f9190613692565b90506000600280838360200201518460016020020151604051602001611ebf929190918252602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052611ef79161356e565b602060405180830381855afa158015611f14573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611f379190613353565b60408481015181516020810191909152600081830152815180820383018152606090910191829052600291611f6c919061356e565b602060405180830381855afa158015611f89573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611fac9190613353565b604080516020810193909352820152606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052611ff69161356e565b602060405180830381855afa158015612013573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906120369190613353565b90506000600280858c604051602001612050929190613710565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526120889161356e565b602060405180830381855afa1580156120a5573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906120c89190613353565b6040516002906120e19089906000908890602001613736565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526121199161356e565b602060405180830381855afa158015612136573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906121599190613353565b604080516020810193909352820152606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526121a39161356e565b602060405180830381855afa1580156121c0573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906121e39190613353565b905087811461229a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605460248201527f4465706f736974436f6e74726163743a207265636f6e7374727563746564204460448201527f65706f7369744461746120646f6573206e6f74206d6174636820737570706c6960648201527f6564206465706f7369745f646174615f726f6f74000000000000000000000000608482015260a40161043b565b60016122a8602060026138a5565b6122b291906138b1565b60415410612342576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4465706f736974436f6e74726163743a206d65726b6c6520747265652066756c60448201527f6c00000000000000000000000000000000000000000000000000000000000000606482015260840161043b565b60016041600082825461235591906134a3565b909155505060415460005b602081101561245d5781600116600114156123995782602182602081106123895761238961339b565b01555061051e9650505050505050565b6002602182602081106123ae576123ae61339b565b01546040805160208101929092528101859052606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526123fc9161356e565b602060405180830381855afa158015612419573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061243c9190613353565b925061244960028361348f565b915080612455816134bb565b915050612360565b5061246661336c565b505050505050505050505050565b60005460ff166124e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161043b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60408051600880825281830190925260609160208201818036833701905050905060c082901b8060071a60f81b826000815181106125955761259561339b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060061a60f81b826001815181106125de576125de61339b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060051a60f81b826002815181106126275761262761339b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060041a60f81b826003815181106126705761267061339b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060031a60f81b826004815181106126b9576126b961339b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060021a60f81b826005815181106127025761270261339b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060011a60f81b8260068151811061274b5761274b61339b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060001a60f81b826007815181106127945761279461339b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050919050565b73ffffffffffffffffffffffffffffffffffffffff82166127ed576108a481612944565b6108a48282612989565b60005460ff1615612864576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161043b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861252b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261074e908490612adb565b604051479073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f1935050505015801561074e573d6000803e3d6000fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8416906370a082319060240160206040518083038186803b1580156129f157600080fd5b505afa158015612a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a299190613353565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390529192509084169063a9059cbb90604401602060405180830381600087803b158015612a9d57600080fd5b505af1158015612ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ad59190613331565b50505050565b6000612b3d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612be79092919063ffffffff16565b80519091501561074e5780806020019051810190612b5b9190613331565b61074e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161043b565b6060612bf68484600085612c00565b90505b9392505050565b606082471015612c92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161043b565b843b612cfa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161043b565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612d23919061356e565b60006040518083038185875af1925050503d8060008114612d60576040519150601f19603f3d011682016040523d82523d6000602084013e612d65565b606091505b5091509150612d75828286612d80565b979650505050505050565b60608315612d8f575081612bf9565b825115612d9f5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043b9190613097565b600060208284031215612de557600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612bf957600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112612e5557600080fd5b813567ffffffffffffffff80821115612e7057612e70612e15565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715612eb657612eb6612e15565b81604052838152866020858801011115612ecf57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a08688031215612f0757600080fd5b853567ffffffffffffffff80821115612f1f57600080fd5b612f2b89838a01612e44565b96506020880135915080821115612f4157600080fd5b612f4d89838a01612e44565b95506040880135915080821115612f6357600080fd5b50612f7088828901612e44565b9598949750949560608101359550608001359392505050565b600060208284031215612f9b57600080fd5b813567ffffffffffffffff811115612fb257600080fd5b612fbe84828501612e44565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff811681146119ee57600080fd5b60008060408385031215612ffb57600080fd5b823561300681612fc6565b9150602083013561301681612fc6565b809150509250929050565b60005b8381101561303c578181015183820152602001613024565b83811115612ad55750506000910152565b60008151808452613065816020860160208601613021565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612bf9602083018461304d565b60008083601f8401126130bc57600080fd5b50813567ffffffffffffffff8111156130d457600080fd5b6020830191508360208260051b85010111156130ef57600080fd5b9250929050565b60008060008060006060868803121561310e57600080fd5b85359450602086013567ffffffffffffffff8082111561312d57600080fd5b61313989838a016130aa565b9096509450604088013591508082111561315257600080fd5b5061315f888289016130aa565b969995985093965092949392505050565b60006020828403121561318257600080fd5b8135612bf981612fc6565b60008083601f84011261319f57600080fd5b50813567ffffffffffffffff8111156131b757600080fd5b6020830191508360208285010111156130ef57600080fd5b600080600080606085870312156131e557600080fd5b84356131f081612fc6565b935060208501359250604085013567ffffffffffffffff81111561321357600080fd5b61321f8782880161318d565b95989497509550505050565b6000806020838503121561323e57600080fd5b823567ffffffffffffffff81111561325557600080fd5b613261858286016130aa565b90969095509350505050565b6000806000806000806000806080898b03121561328957600080fd5b883567ffffffffffffffff808211156132a157600080fd5b6132ad8c838d0161318d565b909a50985060208b01359150808211156132c657600080fd5b6132d28c838d0161318d565b909850965060408b01359150808211156132eb57600080fd5b6132f78c838d0161318d565b909650945060608b013591508082111561331057600080fd5b5061331d8b828c016130aa565b999c989b5096995094979396929594505050565b60006020828403121561334357600080fd5b81518015158114612bf957600080fd5b60006020828403121561336557600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156133dc57600080fd5b813567ffffffffffffffff81168114612bf957600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561345b5761345b6133f4565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261349e5761349e613460565b500490565b600082198211156134b6576134b66133f4565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156134ed576134ed6133f4565b5060010190565b60008261350357613503613460565b500690565b6000808585111561351857600080fd5b8386111561352557600080fd5b5050820193919092039150565b803560208310156103cc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b60008251613580818460208701613021565b9190910192915050565b838152600083516135a2816020850160208801613021565b80830190507fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008416602082015260388101915050949350505050565b60a0815260006135f160a083018861304d565b8281036020840152613603818861304d565b90508281036040840152613617818761304d565b9050828103606084015261362b818661304d565b9050828103608084015261363f818561304d565b98975050505050505050565b6000835161365d818460208801613021565b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000939093169190920190815260100192915050565b6000606082840312156136a457600080fd5b82601f8301126136b357600080fd5b6040516060810181811067ffffffffffffffff821117156136d6576136d6612e15565b6040528060608401858111156136eb57600080fd5b845b818110156137055780518352602092830192016136ed565b509195945050505050565b82815260008251613728816020850160208701613021565b919091016020019392505050565b60008451613748818460208901613021565b7fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009490941691909301908152601881019190915260380192915050565b600181815b808511156137de57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156137c4576137c46133f4565b808516156137d157918102915b93841c939080029061378a565b509250929050565b6000826137f5575060016103cc565b81613802575060006103cc565b816001811461381857600281146138225761383e565b60019150506103cc565b60ff841115613833576138336133f4565b50506001821b6103cc565b5060208310610133831016604e8410600b8410161715613861575081810a6103cc565b61386b8383613785565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561389d5761389d6133f4565b029392505050565b6000612bf983836137e6565b6000828210156138c3576138c36133f4565b50039056fea264697066735822122036fc2157b76ea8a047c135c6701792d945e1ed4ef90a59f6b46c74c84ed695e464736f6c63430008090033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc000000000000000000000000face2face0000000000000000000000000000000000000000000000000000000babe2bed00000000000000000000000000000002" }, - "0xbabe2bed00000000000000000000000000000004": { - "balance": "0", - "constructor": "0x608060405234801561001057600080fd5b506040516125bb3803806125bb83398101604081905261002f916101f3565b6100388361008a565b6100828282604051610049906101ce565b6001600160a01b03928316815291166020820152604001604051809103906000f08015801561007c573d6000803e3d6000fd5b50610121565b505050610240565b60006100946101b1565b90506001600160a01b0382166100a957600080fd5b816001600160a01b0316816001600160a01b031614156100c857600080fd5b60008051602061257b833981519152829055604080516001600160a01b038084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b6001600160a01b03811661013457600080fd5b6001600160a01b03811661015460008051602061259b8339815191525490565b6001600160a01b0316141561016857600080fd5b60008051602061259b8339815191528190556040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006101c960008051602061257b8339815191525490565b905090565b611e9f806106dc83390190565b6001600160a01b03811681146101f057600080fd5b50565b60008060006060848603121561020857600080fd5b8351610213816101db565b6020850151909350610224816101db565b6040850151909250610235816101db565b809150509250925092565b61048d8061024f6000396000f3fe60806040526004361061003f5760003560e01c80633659cfe6146100af5780635c60da1b146100d1578063704b6c021461012a578063f851a4401461014a575b60006100697f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff811661008b57600080fd5b3660008037600080366000845af43d6000803e8080156100aa573d6000f35b3d6000fd5b3480156100bb57600080fd5b506100cf6100ca36600461041a565b61015f565b005b3480156100dd57600080fd5b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b34801561013657600080fd5b506100cf61014536600461041a565b6101c4565b34801561015657600080fd5b50610101610226565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101b857600080fd5b6101c181610255565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461021d57600080fd5b6101c18161033d565b60006102507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b73ffffffffffffffffffffffffffffffffffffffff811661027557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166102b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b73ffffffffffffffffffffffffffffffffffffffff1614156102d557600080fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000610347610226565b905073ffffffffffffffffffffffffffffffffffffffff821661036957600080fd5b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103a257600080fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038290556040805173ffffffffffffffffffffffffffffffffffffffff8084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b60006020828403121561042c57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461045057600080fd5b939250505056fea26469706673582212201af710feee6ff1fa1858904d890343961505e320f105815740ed9738bf60db5764736f6c6343000809003360c06040523480156200001157600080fd5b5060405162001e9f38038062001e9f833981016040819052620000349162000073565b6000805460ff19169055600180556001600160a01b039182166080521660a052620000b2565b6001600160a01b03811681146200007057600080fd5b50565b600080604083850312156200008757600080fd5b825162000094816200005a565b6020840151909250620000a7816200005a565b809150509250929050565b60805160a051611dab620000f4600039600081816101eb0152610fba0152600081816102370152818161091101528181610f8d015261120b0152611dab6000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c806369ffa08a1161008c578063a4c0ed3611610066578063a4c0ed36146101b3578063c57fbf90146101c6578063e50a851e146101e6578063edc4cfd21461023257600080fd5b806369ffa08a146101855780637c41ad2c146101985780638456cb59146101ab57600080fd5b806339f47693116100bd57806339f47693146101455780633f4ba83a146101665780635c975abb1461016e57600080fd5b80630acac942146100e45780632f3d02031461011d57806339aca1c114610132575b600080fd5b6101076100f23660046119a0565b60026020526000908152604090205460ff1681565b60405161011491906119ea565b60405180910390f35b61013061012b366004611a2b565b610259565b005b610130610140366004611a55565b610431565b610158610153366004611a2b565b610818565b604051908152602001610114565b610130610a4c565b60005460ff165b6040519015158152602001610114565b610130610193366004611adc565b610aaf565b6101306101a63660046119a0565b610bde565b610130610d56565b6101756101c1366004611a55565b610db7565b6101586101d43660046119a0565b60036020526000908152604090205481565b61020d7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610114565b61020d7f000000000000000000000000000000000000000000000000000000000000000081565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102b257600080fd5b60008111610321576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f534243577261707065723a20696e76616c69642072617465000000000000000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600260208181526040808420805460017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00821681179092556003909352932084905560ff1691908290811115610395576103956119bb565b146103dc5760405173ffffffffffffffffffffffffffffffffffffffff8416907ff0dab1f31a370f655cb9afa889fed62eb62007e431d0037a9c51c64ebd97f0fb90600090a25b8273ffffffffffffffffffffffffffffffffffffffff167fc6eb9fb936b61b402d503deeffc822f46492e15c2c8f079815cc4850ad7b02b08360405161042491815260200190565b60405180910390a2505050565b6002600154141561049e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610318565b600260015560005460ff1615610510576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610318565b600173ffffffffffffffffffffffffffffffffffffffff851660009081526002602081905260409091205460ff169081111561054e5761054e6119bb565b146105b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f534243577261707065723a20746f6b656e206973206e6f7420656e61626c65646044820152606401610318565b60048111156107de577f8fcbaf0c000000000000000000000000000000000000000000000000000000006105ed600460008486611b0f565b6105f691611b39565b7fffffffff0000000000000000000000000000000000000000000000000000000016148061067b57507fd505accf0000000000000000000000000000000000000000000000000000000061064e600460008486611b0f565b61065791611b39565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b610706576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f534243577261707065723a20696e76616c6964207065726d6974207369676e6160448201527f74757265000000000000000000000000000000000000000000000000000000006064820152608401610318565b60008473ffffffffffffffffffffffffffffffffffffffff16838360405161072f929190611b81565b6000604051808303816000865af19150503d806000811461076c576040519150601f19603f3d011682016040523d82523d6000602084013e610771565b606091505b50509050806107dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f534243577261707065723a207065726d6974206661696c6564000000000000006044820152606401610318565b505b3361080173ffffffffffffffffffffffffffffffffffffffff861682308761102b565b61080c81868661110d565b50506001805550505050565b6000600173ffffffffffffffffffffffffffffffffffffffff841660009081526002602081905260409091205460ff1690811115610858576108586119bb565b146108bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f534243577261707065723a20746f6b656e206973206e6f7420656e61626c65646044820152606401610318565b6000336040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8083166004830152602482018690529192507f000000000000000000000000000000000000000000000000000000000000000090911690639dc29fac90604401600060405180830381600087803b15801561095757600080fd5b505af115801561096b573d6000803e3d6000fd5b5050505073ffffffffffffffffffffffffffffffffffffffff84166000908152600360205260408120546109a785670de0b6b3a7640000611b91565b6109b19190611bf5565b90506109d473ffffffffffffffffffffffffffffffffffffffff861683836112c6565b8173ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f844bdb9a38d1fd821344dfafdefc02959dbbcddd8e8f158cdebb56b561cb67028684604051610a3c929190918252602082015260400190565b60405180910390a3949350505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa557600080fd5b610aad611321565b565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b0857600080fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020819052604082205460ff1690811115610b4357610b436119bb565b14610bd0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f534243577261707065723a20746f6b656e20616c72656164792073776170706160448201527f626c6500000000000000000000000000000000000000000000000000000000006064820152608401610318565b610bda8282611402565b5050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c3757600080fd5b600173ffffffffffffffffffffffffffffffffffffffff821660009081526002602081905260409091205460ff1690811115610c7557610c756119bb565b14610cdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f534243577261707065723a20746f6b656e206973206e6f7420656e61626c65646044820152606401610318565b73ffffffffffffffffffffffffffffffffffffffff8116600081815260026020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909217909155517f0d09769f10bc7d8b1bb75418ca4b88c944987f6ca893174a92968cefb22d6a3d9190a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610daf57600080fd5b610aad611430565b600060026001541415610e26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610318565b600260015560005460ff1615610e98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610318565b3360008181526002602081905260409091205460019160ff90911690811115610ec357610ec36119bb565b14610f2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f534243577261707065723a20746f6b656e206973206e6f7420656e61626c65646044820152606401610318565b82610f4057610f3a86828761110d565b5061101c565b6000610f4d30838861110d565b6040517f4000aea000000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634000aea090610fe8907f00000000000000000000000000000000000000000000000000000000000000009085908a908a90600401611c30565b600060405180830381600087803b15801561100257600080fd5b505af1158015611016573d6000803e3d6000fd5b50505050505b50506001808055949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526111079085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526114f0565b50505050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260408120548190670de0b6b3a7640000906111499085611b91565b6111539190611bf5565b9050600081116111bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f534243577261707065723a20696e76616c696420616d6f756e740000000000006044820152606401610318565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b15801561124f57600080fd5b505af1158015611263573d6000803e3d6000fd5b5050604080518681526020810185905273ffffffffffffffffffffffffffffffffffffffff808a169450881692507ffa2dda1cc1b86e41239702756b13effbc1a092b5c57e3ad320fbe4f3b13fe235910160405180910390a390505b9392505050565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261131c9084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611085565b505050565b60005460ff1661138d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610318565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b73ffffffffffffffffffffffffffffffffffffffff821661142657610bda816115fc565b610bda8282611641565b60005460ff161561149d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610318565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586113d83390565b6000611552826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661178d9092919063ffffffff16565b80519091501561131c57808060200190518101906115709190611ca1565b61131c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610318565b604051479073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f1935050505015801561131c573d6000803e3d6000fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8416906370a082319060240160206040518083038186803b1580156116a957600080fd5b505afa1580156116bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e19190611cc3565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390529192509084169063a9059cbb90604401602060405180830381600087803b15801561175557600080fd5b505af1158015611769573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111079190611ca1565b606061179c84846000856117a4565b949350505050565b606082471015611836576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610318565b843b61189e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610318565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516118c79190611d08565b60006040518083038185875af1925050503d8060008114611904576040519150601f19603f3d011682016040523d82523d6000602084013e611909565b606091505b5091509150611919828286611924565b979650505050505050565b606083156119335750816112bf565b8251156119435782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103189190611d24565b803573ffffffffffffffffffffffffffffffffffffffff8116811461199b57600080fd5b919050565b6000602082840312156119b257600080fd5b6112bf82611977565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160038310611a25577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b60008060408385031215611a3e57600080fd5b611a4783611977565b946020939093013593505050565b60008060008060608587031215611a6b57600080fd5b611a7485611977565b935060208501359250604085013567ffffffffffffffff80821115611a9857600080fd5b818701915087601f830112611aac57600080fd5b813581811115611abb57600080fd5b886020828501011115611acd57600080fd5b95989497505060200194505050565b60008060408385031215611aef57600080fd5b611af883611977565b9150611b0660208401611977565b90509250929050565b60008085851115611b1f57600080fd5b83861115611b2c57600080fd5b5050820193919092039150565b7fffffffff000000000000000000000000000000000000000000000000000000008135818116916004851015611b795780818660040360031b1b83161692505b505092915050565b8183823760009101908152919050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611bf0577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500290565b600082611c2b577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b73ffffffffffffffffffffffffffffffffffffffff8516815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01601019392505050565b600060208284031215611cb357600080fd5b815180151581146112bf57600080fd5b600060208284031215611cd557600080fd5b5051919050565b60005b83811015611cf7578181015183820152602001611cdf565b838111156111075750506000910152565b60008251611d1a818460208701611cdc565b9190910192915050565b6020815260008251806020840152611d43816040850160208701611cdc565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea264697066735822122010b92fa8100cddb0d265fa7d3c9b0a75d7a655d6c9c48bd12ccaac0544a7564e64736f6c63430008090033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc000000000000000000000000face2face0000000000000000000000000000000000000000000000000000000babe2bed00000000000000000000000000000001000000000000000000000000babe2bed00000000000000000000000000000003" - }, "0xface2face0000000000000000000000000000000": { "balance": "0", "constructor": "0x608060405234801561001057600080fd5b5060405161026e38038061026e83398101604081905261002f916101d4565b6040516340c10f1960e01b81526001600160a01b03808316600483015260248201859052839183918316906340c10f1990604401600060405180830381600087803b15801561007d57600080fd5b505af1158015610091573d6000803e3d6000fd5b50506040516340c10f1960e01b81526001600160a01b03898116600483015260248201899052851692506340c10f199150604401600060405180830381600087803b1580156100df57600080fd5b505af11580156100f3573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b0389811660048301528416925063704b6c029150602401600060405180830381600087803b15801561013a57600080fd5b505af115801561014e573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b0389811660048301528716925063704b6c029150602401600060405180830381600087803b15801561019557600080fd5b505af11580156101a9573d6000803e3d6000fd5b50505050505050505050610221565b80516001600160a01b03811681146101cf57600080fd5b919050565b600080600080608085870312156101ea57600080fd5b6101f3856101b8565b935060208501519250610208604086016101b8565b9150610216606086016101b8565b905092959194509250565b603f8061022f6000396000f3fe6080604052600080fdfea2646970667358221220736146d047d972ba2411e1910bb9eb02bef6f4135edcdf986f9fe8612931cf5264736f6c63430008090033000000000000000000000000cc4e00a72d871d6c328bcfe9025ad93d0a26df5100000000000000000000000000000000000000000000021e19e0c9bab2400000000000000000000000000000babe2bed00000000000000000000000000000002000000000000000000000000babe2bed00000000000000000000000000000003" diff --git a/simulators/ethereum/engine/libgno/gno.go b/simulators/ethereum/engine/libgno/gno.go index eb48ab59fb..76d97a1ea9 100644 --- a/simulators/ethereum/engine/libgno/gno.go +++ b/simulators/ethereum/engine/libgno/gno.go @@ -16,7 +16,7 @@ const GAS_LIMIT = 1000000 // SYSTEM_SENDER represents the address of the system sender. // var SYSTEM_SENDER = common.HexToAddress("0xfffffffffffffffffffffffffffffffffffffffe") -var GNOTokenAddress = common.HexToAddress("0xbabe2bed00000000000000000000000000000001") +var GNOTokenAddress = common.HexToAddress("0xbabe2bed00000000000000000000000000000002") var WithdrawalsContractAddress = common.HexToAddress("0xbabe2bed00000000000000000000000000000003") // GNOWithdrawalContractABI represents the path to the GNO withdrawal contract ABI. diff --git a/simulators/ethereum/engine/libgno/withdrawalsContract.go b/simulators/ethereum/engine/libgno/withdrawalsContract.go new file mode 100644 index 0000000000..c1d7530e18 --- /dev/null +++ b/simulators/ethereum/engine/libgno/withdrawalsContract.go @@ -0,0 +1,1034 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package libgno + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// LibgnoMetaData contains all meta data concerning the Libgno contract. +var LibgnoMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"withdrawal_credentials\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"amount\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"index\",\"type\":\"bytes\"}],\"name\":\"DepositEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stake_token\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"validator_withdrawal_credentials\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"withdrawableAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"get_deposit_root\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"get_deposit_count\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"withdrawal_credentials\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"deposit_data_root\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"stake_amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"pubkeys\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"withdrawal_credentials\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"deposit_data_roots\",\"type\":\"bytes32[]\"}],\"name\":\"batchDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"stake_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"claimTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"claimWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_addresses\",\"type\":\"address[]\"}],\"name\":\"claimWithdrawals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxNumberOfFailedWithdrawalsToProcess\",\"type\":\"uint256\"},{\"internalType\":\"uint64[]\",\"name\":\"_amounts\",\"type\":\"uint64[]\"},{\"internalType\":\"address[]\",\"name\":\"_addresses\",\"type\":\"address[]\"}],\"name\":\"executeSystemWithdrawals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIUnwrapper\",\"name\":\"_unwrapper\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"unwrapTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"flushTokensTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// LibgnoABI is the input ABI used to generate the binding from. +// Deprecated: Use LibgnoMetaData.ABI instead. +var LibgnoABI = LibgnoMetaData.ABI + +// Libgno is an auto generated Go binding around an Ethereum contract. +type Libgno struct { + LibgnoCaller // Read-only binding to the contract + LibgnoTransactor // Write-only binding to the contract + LibgnoFilterer // Log filterer for contract events +} + +// LibgnoCaller is an auto generated read-only Go binding around an Ethereum contract. +type LibgnoCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// LibgnoTransactor is an auto generated write-only Go binding around an Ethereum contract. +type LibgnoTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// LibgnoFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type LibgnoFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// LibgnoSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type LibgnoSession struct { + Contract *Libgno // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// LibgnoCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type LibgnoCallerSession struct { + Contract *LibgnoCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// LibgnoTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type LibgnoTransactorSession struct { + Contract *LibgnoTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// LibgnoRaw is an auto generated low-level Go binding around an Ethereum contract. +type LibgnoRaw struct { + Contract *Libgno // Generic contract binding to access the raw methods on +} + +// LibgnoCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type LibgnoCallerRaw struct { + Contract *LibgnoCaller // Generic read-only contract binding to access the raw methods on +} + +// LibgnoTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type LibgnoTransactorRaw struct { + Contract *LibgnoTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewLibgno creates a new instance of Libgno, bound to a specific deployed contract. +func NewLibgno(address common.Address, backend bind.ContractBackend) (*Libgno, error) { + contract, err := bindLibgno(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Libgno{LibgnoCaller: LibgnoCaller{contract: contract}, LibgnoTransactor: LibgnoTransactor{contract: contract}, LibgnoFilterer: LibgnoFilterer{contract: contract}}, nil +} + +// NewLibgnoCaller creates a new read-only instance of Libgno, bound to a specific deployed contract. +func NewLibgnoCaller(address common.Address, caller bind.ContractCaller) (*LibgnoCaller, error) { + contract, err := bindLibgno(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &LibgnoCaller{contract: contract}, nil +} + +// NewLibgnoTransactor creates a new write-only instance of Libgno, bound to a specific deployed contract. +func NewLibgnoTransactor(address common.Address, transactor bind.ContractTransactor) (*LibgnoTransactor, error) { + contract, err := bindLibgno(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &LibgnoTransactor{contract: contract}, nil +} + +// NewLibgnoFilterer creates a new log filterer instance of Libgno, bound to a specific deployed contract. +func NewLibgnoFilterer(address common.Address, filterer bind.ContractFilterer) (*LibgnoFilterer, error) { + contract, err := bindLibgno(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &LibgnoFilterer{contract: contract}, nil +} + +// bindLibgno binds a generic wrapper to an already deployed contract. +func bindLibgno(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(LibgnoABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Libgno *LibgnoRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Libgno.Contract.LibgnoCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Libgno *LibgnoRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Libgno.Contract.LibgnoTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Libgno *LibgnoRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Libgno.Contract.LibgnoTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Libgno *LibgnoCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Libgno.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Libgno *LibgnoTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Libgno.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Libgno *LibgnoTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Libgno.Contract.contract.Transact(opts, method, params...) +} + +// GetDepositCount is a free data retrieval call binding the contract method 0x621fd130. +// +// Solidity: function get_deposit_count() view returns(bytes) +func (_Libgno *LibgnoCaller) GetDepositCount(opts *bind.CallOpts) ([]byte, error) { + var out []interface{} + err := _Libgno.contract.Call(opts, &out, "get_deposit_count") + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// GetDepositCount is a free data retrieval call binding the contract method 0x621fd130. +// +// Solidity: function get_deposit_count() view returns(bytes) +func (_Libgno *LibgnoSession) GetDepositCount() ([]byte, error) { + return _Libgno.Contract.GetDepositCount(&_Libgno.CallOpts) +} + +// GetDepositCount is a free data retrieval call binding the contract method 0x621fd130. +// +// Solidity: function get_deposit_count() view returns(bytes) +func (_Libgno *LibgnoCallerSession) GetDepositCount() ([]byte, error) { + return _Libgno.Contract.GetDepositCount(&_Libgno.CallOpts) +} + +// GetDepositRoot is a free data retrieval call binding the contract method 0xc5f2892f. +// +// Solidity: function get_deposit_root() view returns(bytes32) +func (_Libgno *LibgnoCaller) GetDepositRoot(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _Libgno.contract.Call(opts, &out, "get_deposit_root") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetDepositRoot is a free data retrieval call binding the contract method 0xc5f2892f. +// +// Solidity: function get_deposit_root() view returns(bytes32) +func (_Libgno *LibgnoSession) GetDepositRoot() ([32]byte, error) { + return _Libgno.Contract.GetDepositRoot(&_Libgno.CallOpts) +} + +// GetDepositRoot is a free data retrieval call binding the contract method 0xc5f2892f. +// +// Solidity: function get_deposit_root() view returns(bytes32) +func (_Libgno *LibgnoCallerSession) GetDepositRoot() ([32]byte, error) { + return _Libgno.Contract.GetDepositRoot(&_Libgno.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Libgno *LibgnoCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _Libgno.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Libgno *LibgnoSession) Paused() (bool, error) { + return _Libgno.Contract.Paused(&_Libgno.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Libgno *LibgnoCallerSession) Paused() (bool, error) { + return _Libgno.Contract.Paused(&_Libgno.CallOpts) +} + +// StakeToken is a free data retrieval call binding the contract method 0x640415bf. +// +// Solidity: function stake_token() view returns(address) +func (_Libgno *LibgnoCaller) StakeToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Libgno.contract.Call(opts, &out, "stake_token") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// StakeToken is a free data retrieval call binding the contract method 0x640415bf. +// +// Solidity: function stake_token() view returns(address) +func (_Libgno *LibgnoSession) StakeToken() (common.Address, error) { + return _Libgno.Contract.StakeToken(&_Libgno.CallOpts) +} + +// StakeToken is a free data retrieval call binding the contract method 0x640415bf. +// +// Solidity: function stake_token() view returns(address) +func (_Libgno *LibgnoCallerSession) StakeToken() (common.Address, error) { + return _Libgno.Contract.StakeToken(&_Libgno.CallOpts) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) pure returns(bool) +func (_Libgno *LibgnoCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var out []interface{} + err := _Libgno.contract.Call(opts, &out, "supportsInterface", interfaceId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) pure returns(bool) +func (_Libgno *LibgnoSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _Libgno.Contract.SupportsInterface(&_Libgno.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) pure returns(bool) +func (_Libgno *LibgnoCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _Libgno.Contract.SupportsInterface(&_Libgno.CallOpts, interfaceId) +} + +// ValidatorWithdrawalCredentials is a free data retrieval call binding the contract method 0x24db4c46. +// +// Solidity: function validator_withdrawal_credentials(bytes ) view returns(bytes32) +func (_Libgno *LibgnoCaller) ValidatorWithdrawalCredentials(opts *bind.CallOpts, arg0 []byte) ([32]byte, error) { + var out []interface{} + err := _Libgno.contract.Call(opts, &out, "validator_withdrawal_credentials", arg0) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ValidatorWithdrawalCredentials is a free data retrieval call binding the contract method 0x24db4c46. +// +// Solidity: function validator_withdrawal_credentials(bytes ) view returns(bytes32) +func (_Libgno *LibgnoSession) ValidatorWithdrawalCredentials(arg0 []byte) ([32]byte, error) { + return _Libgno.Contract.ValidatorWithdrawalCredentials(&_Libgno.CallOpts, arg0) +} + +// ValidatorWithdrawalCredentials is a free data retrieval call binding the contract method 0x24db4c46. +// +// Solidity: function validator_withdrawal_credentials(bytes ) view returns(bytes32) +func (_Libgno *LibgnoCallerSession) ValidatorWithdrawalCredentials(arg0 []byte) ([32]byte, error) { + return _Libgno.Contract.ValidatorWithdrawalCredentials(&_Libgno.CallOpts, arg0) +} + +// WithdrawableAmount is a free data retrieval call binding the contract method 0xbe7ab51b. +// +// Solidity: function withdrawableAmount(address ) view returns(uint256) +func (_Libgno *LibgnoCaller) WithdrawableAmount(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _Libgno.contract.Call(opts, &out, "withdrawableAmount", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// WithdrawableAmount is a free data retrieval call binding the contract method 0xbe7ab51b. +// +// Solidity: function withdrawableAmount(address ) view returns(uint256) +func (_Libgno *LibgnoSession) WithdrawableAmount(arg0 common.Address) (*big.Int, error) { + return _Libgno.Contract.WithdrawableAmount(&_Libgno.CallOpts, arg0) +} + +// WithdrawableAmount is a free data retrieval call binding the contract method 0xbe7ab51b. +// +// Solidity: function withdrawableAmount(address ) view returns(uint256) +func (_Libgno *LibgnoCallerSession) WithdrawableAmount(arg0 common.Address) (*big.Int, error) { + return _Libgno.Contract.WithdrawableAmount(&_Libgno.CallOpts, arg0) +} + +// BatchDeposit is a paid mutator transaction binding the contract method 0xc82655b7. +// +// Solidity: function batchDeposit(bytes pubkeys, bytes withdrawal_credentials, bytes signatures, bytes32[] deposit_data_roots) returns() +func (_Libgno *LibgnoTransactor) BatchDeposit(opts *bind.TransactOpts, pubkeys []byte, withdrawal_credentials []byte, signatures []byte, deposit_data_roots [][32]byte) (*types.Transaction, error) { + return _Libgno.contract.Transact(opts, "batchDeposit", pubkeys, withdrawal_credentials, signatures, deposit_data_roots) +} + +// BatchDeposit is a paid mutator transaction binding the contract method 0xc82655b7. +// +// Solidity: function batchDeposit(bytes pubkeys, bytes withdrawal_credentials, bytes signatures, bytes32[] deposit_data_roots) returns() +func (_Libgno *LibgnoSession) BatchDeposit(pubkeys []byte, withdrawal_credentials []byte, signatures []byte, deposit_data_roots [][32]byte) (*types.Transaction, error) { + return _Libgno.Contract.BatchDeposit(&_Libgno.TransactOpts, pubkeys, withdrawal_credentials, signatures, deposit_data_roots) +} + +// BatchDeposit is a paid mutator transaction binding the contract method 0xc82655b7. +// +// Solidity: function batchDeposit(bytes pubkeys, bytes withdrawal_credentials, bytes signatures, bytes32[] deposit_data_roots) returns() +func (_Libgno *LibgnoTransactorSession) BatchDeposit(pubkeys []byte, withdrawal_credentials []byte, signatures []byte, deposit_data_roots [][32]byte) (*types.Transaction, error) { + return _Libgno.Contract.BatchDeposit(&_Libgno.TransactOpts, pubkeys, withdrawal_credentials, signatures, deposit_data_roots) +} + +// ClaimTokens is a paid mutator transaction binding the contract method 0x69ffa08a. +// +// Solidity: function claimTokens(address _token, address _to) returns() +func (_Libgno *LibgnoTransactor) ClaimTokens(opts *bind.TransactOpts, _token common.Address, _to common.Address) (*types.Transaction, error) { + return _Libgno.contract.Transact(opts, "claimTokens", _token, _to) +} + +// ClaimTokens is a paid mutator transaction binding the contract method 0x69ffa08a. +// +// Solidity: function claimTokens(address _token, address _to) returns() +func (_Libgno *LibgnoSession) ClaimTokens(_token common.Address, _to common.Address) (*types.Transaction, error) { + return _Libgno.Contract.ClaimTokens(&_Libgno.TransactOpts, _token, _to) +} + +// ClaimTokens is a paid mutator transaction binding the contract method 0x69ffa08a. +// +// Solidity: function claimTokens(address _token, address _to) returns() +func (_Libgno *LibgnoTransactorSession) ClaimTokens(_token common.Address, _to common.Address) (*types.Transaction, error) { + return _Libgno.Contract.ClaimTokens(&_Libgno.TransactOpts, _token, _to) +} + +// ClaimWithdrawal is a paid mutator transaction binding the contract method 0xa3066aab. +// +// Solidity: function claimWithdrawal(address _address) returns() +func (_Libgno *LibgnoTransactor) ClaimWithdrawal(opts *bind.TransactOpts, _address common.Address) (*types.Transaction, error) { + return _Libgno.contract.Transact(opts, "claimWithdrawal", _address) +} + +// ClaimWithdrawal is a paid mutator transaction binding the contract method 0xa3066aab. +// +// Solidity: function claimWithdrawal(address _address) returns() +func (_Libgno *LibgnoSession) ClaimWithdrawal(_address common.Address) (*types.Transaction, error) { + return _Libgno.Contract.ClaimWithdrawal(&_Libgno.TransactOpts, _address) +} + +// ClaimWithdrawal is a paid mutator transaction binding the contract method 0xa3066aab. +// +// Solidity: function claimWithdrawal(address _address) returns() +func (_Libgno *LibgnoTransactorSession) ClaimWithdrawal(_address common.Address) (*types.Transaction, error) { + return _Libgno.Contract.ClaimWithdrawal(&_Libgno.TransactOpts, _address) +} + +// ClaimWithdrawals is a paid mutator transaction binding the contract method 0xbb30b8fd. +// +// Solidity: function claimWithdrawals(address[] _addresses) returns() +func (_Libgno *LibgnoTransactor) ClaimWithdrawals(opts *bind.TransactOpts, _addresses []common.Address) (*types.Transaction, error) { + return _Libgno.contract.Transact(opts, "claimWithdrawals", _addresses) +} + +// ClaimWithdrawals is a paid mutator transaction binding the contract method 0xbb30b8fd. +// +// Solidity: function claimWithdrawals(address[] _addresses) returns() +func (_Libgno *LibgnoSession) ClaimWithdrawals(_addresses []common.Address) (*types.Transaction, error) { + return _Libgno.Contract.ClaimWithdrawals(&_Libgno.TransactOpts, _addresses) +} + +// ClaimWithdrawals is a paid mutator transaction binding the contract method 0xbb30b8fd. +// +// Solidity: function claimWithdrawals(address[] _addresses) returns() +func (_Libgno *LibgnoTransactorSession) ClaimWithdrawals(_addresses []common.Address) (*types.Transaction, error) { + return _Libgno.Contract.ClaimWithdrawals(&_Libgno.TransactOpts, _addresses) +} + +// Deposit is a paid mutator transaction binding the contract method 0x0cac9f31. +// +// Solidity: function deposit(bytes pubkey, bytes withdrawal_credentials, bytes signature, bytes32 deposit_data_root, uint256 stake_amount) returns() +func (_Libgno *LibgnoTransactor) Deposit(opts *bind.TransactOpts, pubkey []byte, withdrawal_credentials []byte, signature []byte, deposit_data_root [32]byte, stake_amount *big.Int) (*types.Transaction, error) { + return _Libgno.contract.Transact(opts, "deposit", pubkey, withdrawal_credentials, signature, deposit_data_root, stake_amount) +} + +// Deposit is a paid mutator transaction binding the contract method 0x0cac9f31. +// +// Solidity: function deposit(bytes pubkey, bytes withdrawal_credentials, bytes signature, bytes32 deposit_data_root, uint256 stake_amount) returns() +func (_Libgno *LibgnoSession) Deposit(pubkey []byte, withdrawal_credentials []byte, signature []byte, deposit_data_root [32]byte, stake_amount *big.Int) (*types.Transaction, error) { + return _Libgno.Contract.Deposit(&_Libgno.TransactOpts, pubkey, withdrawal_credentials, signature, deposit_data_root, stake_amount) +} + +// Deposit is a paid mutator transaction binding the contract method 0x0cac9f31. +// +// Solidity: function deposit(bytes pubkey, bytes withdrawal_credentials, bytes signature, bytes32 deposit_data_root, uint256 stake_amount) returns() +func (_Libgno *LibgnoTransactorSession) Deposit(pubkey []byte, withdrawal_credentials []byte, signature []byte, deposit_data_root [32]byte, stake_amount *big.Int) (*types.Transaction, error) { + return _Libgno.Contract.Deposit(&_Libgno.TransactOpts, pubkey, withdrawal_credentials, signature, deposit_data_root, stake_amount) +} + +// ExecuteSystemWithdrawals is a paid mutator transaction binding the contract method 0x79d0c0bc. +// +// Solidity: function executeSystemWithdrawals(uint256 _maxNumberOfFailedWithdrawalsToProcess, uint64[] _amounts, address[] _addresses) returns() +func (_Libgno *LibgnoTransactor) ExecuteSystemWithdrawals(opts *bind.TransactOpts, _maxNumberOfFailedWithdrawalsToProcess *big.Int, _amounts []uint64, _addresses []common.Address) (*types.Transaction, error) { + return _Libgno.contract.Transact(opts, "executeSystemWithdrawals", _maxNumberOfFailedWithdrawalsToProcess, _amounts, _addresses) +} + +// ExecuteSystemWithdrawals is a paid mutator transaction binding the contract method 0x79d0c0bc. +// +// Solidity: function executeSystemWithdrawals(uint256 _maxNumberOfFailedWithdrawalsToProcess, uint64[] _amounts, address[] _addresses) returns() +func (_Libgno *LibgnoSession) ExecuteSystemWithdrawals(_maxNumberOfFailedWithdrawalsToProcess *big.Int, _amounts []uint64, _addresses []common.Address) (*types.Transaction, error) { + return _Libgno.Contract.ExecuteSystemWithdrawals(&_Libgno.TransactOpts, _maxNumberOfFailedWithdrawalsToProcess, _amounts, _addresses) +} + +// ExecuteSystemWithdrawals is a paid mutator transaction binding the contract method 0x79d0c0bc. +// +// Solidity: function executeSystemWithdrawals(uint256 _maxNumberOfFailedWithdrawalsToProcess, uint64[] _amounts, address[] _addresses) returns() +func (_Libgno *LibgnoTransactorSession) ExecuteSystemWithdrawals(_maxNumberOfFailedWithdrawalsToProcess *big.Int, _amounts []uint64, _addresses []common.Address) (*types.Transaction, error) { + return _Libgno.Contract.ExecuteSystemWithdrawals(&_Libgno.TransactOpts, _maxNumberOfFailedWithdrawalsToProcess, _amounts, _addresses) +} + +// FlushTokensTo is a paid mutator transaction binding the contract method 0xd74d11e9. +// +// Solidity: function flushTokensTo(address addr) returns() +func (_Libgno *LibgnoTransactor) FlushTokensTo(opts *bind.TransactOpts, addr common.Address) (*types.Transaction, error) { + return _Libgno.contract.Transact(opts, "flushTokensTo", addr) +} + +// FlushTokensTo is a paid mutator transaction binding the contract method 0xd74d11e9. +// +// Solidity: function flushTokensTo(address addr) returns() +func (_Libgno *LibgnoSession) FlushTokensTo(addr common.Address) (*types.Transaction, error) { + return _Libgno.Contract.FlushTokensTo(&_Libgno.TransactOpts, addr) +} + +// FlushTokensTo is a paid mutator transaction binding the contract method 0xd74d11e9. +// +// Solidity: function flushTokensTo(address addr) returns() +func (_Libgno *LibgnoTransactorSession) FlushTokensTo(addr common.Address) (*types.Transaction, error) { + return _Libgno.Contract.FlushTokensTo(&_Libgno.TransactOpts, addr) +} + +// OnTokenTransfer is a paid mutator transaction binding the contract method 0xa4c0ed36. +// +// Solidity: function onTokenTransfer(address , uint256 stake_amount, bytes data) returns(bool) +func (_Libgno *LibgnoTransactor) OnTokenTransfer(opts *bind.TransactOpts, arg0 common.Address, stake_amount *big.Int, data []byte) (*types.Transaction, error) { + return _Libgno.contract.Transact(opts, "onTokenTransfer", arg0, stake_amount, data) +} + +// OnTokenTransfer is a paid mutator transaction binding the contract method 0xa4c0ed36. +// +// Solidity: function onTokenTransfer(address , uint256 stake_amount, bytes data) returns(bool) +func (_Libgno *LibgnoSession) OnTokenTransfer(arg0 common.Address, stake_amount *big.Int, data []byte) (*types.Transaction, error) { + return _Libgno.Contract.OnTokenTransfer(&_Libgno.TransactOpts, arg0, stake_amount, data) +} + +// OnTokenTransfer is a paid mutator transaction binding the contract method 0xa4c0ed36. +// +// Solidity: function onTokenTransfer(address , uint256 stake_amount, bytes data) returns(bool) +func (_Libgno *LibgnoTransactorSession) OnTokenTransfer(arg0 common.Address, stake_amount *big.Int, data []byte) (*types.Transaction, error) { + return _Libgno.Contract.OnTokenTransfer(&_Libgno.TransactOpts, arg0, stake_amount, data) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_Libgno *LibgnoTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Libgno.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_Libgno *LibgnoSession) Pause() (*types.Transaction, error) { + return _Libgno.Contract.Pause(&_Libgno.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_Libgno *LibgnoTransactorSession) Pause() (*types.Transaction, error) { + return _Libgno.Contract.Pause(&_Libgno.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_Libgno *LibgnoTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Libgno.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_Libgno *LibgnoSession) Unpause() (*types.Transaction, error) { + return _Libgno.Contract.Unpause(&_Libgno.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_Libgno *LibgnoTransactorSession) Unpause() (*types.Transaction, error) { + return _Libgno.Contract.Unpause(&_Libgno.TransactOpts) +} + +// UnwrapTokens is a paid mutator transaction binding the contract method 0x4694bd1e. +// +// Solidity: function unwrapTokens(address _unwrapper, address _token) returns() +func (_Libgno *LibgnoTransactor) UnwrapTokens(opts *bind.TransactOpts, _unwrapper common.Address, _token common.Address) (*types.Transaction, error) { + return _Libgno.contract.Transact(opts, "unwrapTokens", _unwrapper, _token) +} + +// UnwrapTokens is a paid mutator transaction binding the contract method 0x4694bd1e. +// +// Solidity: function unwrapTokens(address _unwrapper, address _token) returns() +func (_Libgno *LibgnoSession) UnwrapTokens(_unwrapper common.Address, _token common.Address) (*types.Transaction, error) { + return _Libgno.Contract.UnwrapTokens(&_Libgno.TransactOpts, _unwrapper, _token) +} + +// UnwrapTokens is a paid mutator transaction binding the contract method 0x4694bd1e. +// +// Solidity: function unwrapTokens(address _unwrapper, address _token) returns() +func (_Libgno *LibgnoTransactorSession) UnwrapTokens(_unwrapper common.Address, _token common.Address) (*types.Transaction, error) { + return _Libgno.Contract.UnwrapTokens(&_Libgno.TransactOpts, _unwrapper, _token) +} + +// LibgnoDepositEventIterator is returned from FilterDepositEvent and is used to iterate over the raw logs and unpacked data for DepositEvent events raised by the Libgno contract. +type LibgnoDepositEventIterator struct { + Event *LibgnoDepositEvent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *LibgnoDepositEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(LibgnoDepositEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(LibgnoDepositEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *LibgnoDepositEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *LibgnoDepositEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// LibgnoDepositEvent represents a DepositEvent event raised by the Libgno contract. +type LibgnoDepositEvent struct { + Pubkey []byte + WithdrawalCredentials []byte + Amount []byte + Signature []byte + Index []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDepositEvent is a free log retrieval operation binding the contract event 0x649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5. +// +// Solidity: event DepositEvent(bytes pubkey, bytes withdrawal_credentials, bytes amount, bytes signature, bytes index) +func (_Libgno *LibgnoFilterer) FilterDepositEvent(opts *bind.FilterOpts) (*LibgnoDepositEventIterator, error) { + + logs, sub, err := _Libgno.contract.FilterLogs(opts, "DepositEvent") + if err != nil { + return nil, err + } + return &LibgnoDepositEventIterator{contract: _Libgno.contract, event: "DepositEvent", logs: logs, sub: sub}, nil +} + +// WatchDepositEvent is a free log subscription operation binding the contract event 0x649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5. +// +// Solidity: event DepositEvent(bytes pubkey, bytes withdrawal_credentials, bytes amount, bytes signature, bytes index) +func (_Libgno *LibgnoFilterer) WatchDepositEvent(opts *bind.WatchOpts, sink chan<- *LibgnoDepositEvent) (event.Subscription, error) { + + logs, sub, err := _Libgno.contract.WatchLogs(opts, "DepositEvent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(LibgnoDepositEvent) + if err := _Libgno.contract.UnpackLog(event, "DepositEvent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDepositEvent is a log parse operation binding the contract event 0x649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5. +// +// Solidity: event DepositEvent(bytes pubkey, bytes withdrawal_credentials, bytes amount, bytes signature, bytes index) +func (_Libgno *LibgnoFilterer) ParseDepositEvent(log types.Log) (*LibgnoDepositEvent, error) { + event := new(LibgnoDepositEvent) + if err := _Libgno.contract.UnpackLog(event, "DepositEvent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// LibgnoPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the Libgno contract. +type LibgnoPausedIterator struct { + Event *LibgnoPaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *LibgnoPausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(LibgnoPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(LibgnoPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *LibgnoPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *LibgnoPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// LibgnoPaused represents a Paused event raised by the Libgno contract. +type LibgnoPaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Libgno *LibgnoFilterer) FilterPaused(opts *bind.FilterOpts) (*LibgnoPausedIterator, error) { + + logs, sub, err := _Libgno.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &LibgnoPausedIterator{contract: _Libgno.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Libgno *LibgnoFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *LibgnoPaused) (event.Subscription, error) { + + logs, sub, err := _Libgno.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(LibgnoPaused) + if err := _Libgno.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Libgno *LibgnoFilterer) ParsePaused(log types.Log) (*LibgnoPaused, error) { + event := new(LibgnoPaused) + if err := _Libgno.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// LibgnoUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the Libgno contract. +type LibgnoUnpausedIterator struct { + Event *LibgnoUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *LibgnoUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(LibgnoUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(LibgnoUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *LibgnoUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *LibgnoUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// LibgnoUnpaused represents a Unpaused event raised by the Libgno contract. +type LibgnoUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Libgno *LibgnoFilterer) FilterUnpaused(opts *bind.FilterOpts) (*LibgnoUnpausedIterator, error) { + + logs, sub, err := _Libgno.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &LibgnoUnpausedIterator{contract: _Libgno.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Libgno *LibgnoFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *LibgnoUnpaused) (event.Subscription, error) { + + logs, sub, err := _Libgno.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(LibgnoUnpaused) + if err := _Libgno.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Libgno *LibgnoFilterer) ParseUnpaused(log types.Log) (*LibgnoUnpaused, error) { + event := new(LibgnoUnpaused) + if err := _Libgno.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/simulators/ethereum/engine/suites/withdrawals/tests.go b/simulators/ethereum/engine/suites/withdrawals/tests.go index 8523065924..f20f16e585 100644 --- a/simulators/ethereum/engine/suites/withdrawals/tests.go +++ b/simulators/ethereum/engine/suites/withdrawals/tests.go @@ -3,7 +3,6 @@ package suite_withdrawals import ( "context" - "encoding/json" "fmt" "github.com/ethereum/go-ethereum/accounts/abi/bind" beacon "github.com/ethereum/go-ethereum/beacon/engine" @@ -1181,10 +1180,17 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { startAccount = ws.GetWithdrawalsStartAccount() nextIndex = uint64(0) ) + client := getClient(t) + if client == nil { + t.Fatalf("Couldn't connect to client") + return + } + defer client.Close() + n := ws.WithdrawalsBlockCount for n > 0 { - t.CLMock.ProduceBlocks(1, clmock.BlockProcessCallbacks{ + t.CLMock.ProduceSingleBlock(clmock.BlockProcessCallbacks{ OnPayloadProducerSelected: func() { // Send some withdrawals @@ -1235,7 +1241,7 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { } }, }) - t.CLMock.ProduceBlocks(1, clmock.BlockProcessCallbacks{ + t.CLMock.ProduceSingleBlock(clmock.BlockProcessCallbacks{ OnPayloadProducerSelected: func() { // Get ExecuteWithdrawalsClaims addresses := make([]common.Address, 0) @@ -1243,40 +1249,46 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { addresses = append(addresses, w.Address) } // Send claim transaction - claims, err := libgno.ExecuteWithdrawalsClaims(addresses) - if err != nil { - return - } - - _, err = helper.SendNextTransaction( - t.TestContext, - t.CLMock.NextBlockProducer, - &helper.BaseTransactionCreator{ - Recipient: &libgno.WithdrawalsContractAddress, - Amount: common.Big1, - Payload: claims, - TxType: t.TestTransactionType, - GasLimit: t.Genesis.GasLimit(), - ChainID: t.Genesis.Config().ChainID, - }, - ) - + //claims, err := libgno.ExecuteWithdrawalsClaims(addresses) + //if err != nil { + // return + //} + err := claimTokens(client, addresses, t.Genesis.Config().ChainID) if err != nil { - t.Fatalf("FAIL (%s): Error trying to send transaction: %v", t.TestName, err) + t.Fatalf("Error while claiming tokens, %v", err) } + //_, err = helper.SendNextTransaction( + // t.TestContext, + // t.CLMock.NextBlockProducer, + // &helper.BaseTransactionCreator{ + // Recipient: &libgno.WithdrawalsContractAddress, + // Amount: common.Big1, + // Payload: claims, + // TxType: t.TestTransactionType, + // GasLimit: t.Genesis.GasLimit(), + // ChainID: t.Genesis.Config().ChainID, + // }, + //) + // + //if err != nil { + // t.Fatalf("FAIL (%s): Error trying to send transaction: %v", t.TestName, err) + //} + // }, + }) + t.CLMock.ProduceSingleBlock(clmock.BlockProcessCallbacks{ OnForkchoiceBroadcast: func() { if !ws.SkipBaseVerifications { - for _, addr := range ws.WithdrawalsHistory.GetAddressesWithdrawnOnBlock(t.CLMock.LatestExecutedPayload.Number - 1) { + for _, addr := range ws.WithdrawalsHistory.GetAddressesWithdrawnOnBlock(t.CLMock.LatestExecutedPayload.Number - 2) { //Test balance at `latest`, which should have the //withdrawal applied. - latestBalance, err := getBalanceOfToken(t, addr, big.NewInt(int64(t.CLMock.LatestExecutedPayload.Number-1))) + latestBalance, err := getBalanceOfToken(client, addr, big.NewInt(int64(t.CLMock.LatestExecutedPayload.Number))) if err != nil { t.Fatalf("FAIL (%s): Error trying to get balance of token: %v, address: %v", t.TestName, err, addr.Hex()) } newLatestBalance := latestBalance.Mul(latestBalance, big.NewInt(32)) - expectBalanceEqual := ws.WithdrawalsHistory.GetExpectedAccountBalance(addr, t.CLMock.LatestExecutedPayload.Number-1) + expectBalanceEqual := ws.WithdrawalsHistory.GetExpectedAccountBalance(addr, t.CLMock.LatestExecutedPayload.Number-2) if newLatestBalance.Cmp(expectBalanceEqual) != 0 { t.Fatalf("FAIL (%s): Incorrect balance on account %s after withdrawals applied: want=%d, got=%d", t.TestName, addr, expectBalanceEqual, latestBalance) @@ -1293,38 +1305,92 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { // check that the balances match expected values. // Also check one block before the withdrawal took place, verify that // withdrawal has not been updated. - if !ws.SkipBaseVerifications { - for block := uint64(0); block <= t.CLMock.LatestExecutedPayload.Number; block++ { - ws.WithdrawalsHistory.VerifyWithdrawals(block, big.NewInt(int64(block)), t.TestEngine) - - // Check the correct withdrawal root on past blocks - r := t.TestEngine.TestBlockByNumber(big.NewInt(int64(block))) - var expectedWithdrawalsRoot *common.Hash = nil - if block >= ws.WithdrawalsForkHeight { - calcWithdrawalsRoot := helper.ComputeWithdrawalsRoot( - ws.WithdrawalsHistory.GetWithdrawals(block), - ) - expectedWithdrawalsRoot = &calcWithdrawalsRoot - } - jsWithdrawals, _ := json.MarshalIndent(ws.WithdrawalsHistory.GetWithdrawals(block), "", " ") - r.ExpectationDescription = fmt.Sprintf(` - Requested block %d to verify withdrawalsRoot with the - following withdrawals: - %s`, block, jsWithdrawals) + //if !ws.SkipBaseVerifications { + // for block := uint64(0); block <= t.CLMock.LatestExecutedPayload.Number; block++ { + // ws.WithdrawalsHistory.VerifyWithdrawals(block, big.NewInt(int64(block)), t.TestEngine) + // + // // Check the correct withdrawal root on past blocks + // r := t.TestEngine.TestBlockByNumber(big.NewInt(int64(block))) + // var expectedWithdrawalsRoot *common.Hash = nil + // if block >= ws.WithdrawalsForkHeight { + // calcWithdrawalsRoot := helper.ComputeWithdrawalsRoot( + // ws.WithdrawalsHistory.GetWithdrawals(block), + // ) + // expectedWithdrawalsRoot = &calcWithdrawalsRoot + // } + // jsWithdrawals, _ := json.MarshalIndent(ws.WithdrawalsHistory.GetWithdrawals(block), "", " ") + // r.ExpectationDescription = fmt.Sprintf(` + // Requested block %d to verify withdrawalsRoot with the + // following withdrawals: + // %s`, block, jsWithdrawals) + // + // r.ExpectWithdrawalsRoot(expectedWithdrawalsRoot) + // + // } + // + // // Verify on `latest` + // ws.WithdrawalsHistory.VerifyWithdrawals(t.CLMock.LatestExecutedPayload.Number, nil, t.TestEngine) + //} +} - r.ExpectWithdrawalsRoot(expectedWithdrawalsRoot) +func claimTokens(client *ethclient.Client, addresses []common.Address, chainID *big.Int) error { + //privateKey, err := crypto.HexToECDSA("fad9c8855b740a0b7ed4c221dbad0f33a83a49cad6b3fe8d5817ac83d38b6a19") + //if err != nil { + // + //} + //publicKey := privateKey.Public() + //publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) + //if !ok { + // return errors.New("error casting public key to ECDSA") + //} + // + //fromAddress := crypto.PubkeyToAddress(*publicKeyECDSA) + nonce, err := client.PendingNonceAt(context.Background(), globals.VaultAccountAddress) + if err != nil { + return err + } - } + gasPrice, err := client.SuggestGasPrice(context.Background()) + if err != nil { + return err + } - // Verify on `latest` - ws.WithdrawalsHistory.VerifyWithdrawals(t.CLMock.LatestExecutedPayload.Number, nil, t.TestEngine) + auth, err := bind.NewKeyedTransactorWithChainID(globals.VaultKey, chainID) + if err != nil { + return err } + //auth.From = globals.VaultAccountAddress + auth.Nonce = big.NewInt(int64(nonce)) + auth.Value = big.NewInt(0) // in wei + //auth.GasLimit = uint64(300000) // in units + auth.GasPrice = gasPrice.Add(gasPrice, big.NewInt(1000)) + + //address := common.HexToAddress("0x147B8eb97fD247D06C4006D269c90C1908Fb5D54") + instance, err := libgno.NewLibgno(libgno.WithdrawalsContractAddress, client) + if err != nil { + return err + } + + tx, err := instance.ClaimWithdrawals(auth, addresses) + if err != nil { + return err + } + + tx.Hash() + + return nil } -func getBalanceOfToken(t *test.Env, account common.Address, block *big.Int) (*big.Int, error) { +func getClient(t *test.Env) *ethclient.Client { url, _ := t.CLMock.EngineClients[0].Url() client, err := ethclient.Dial(url) - defer client.Close() + if err != nil { + return nil + } + return client +} + +func getBalanceOfToken(client *ethclient.Client, account common.Address, block *big.Int) (*big.Int, error) { // get GnoTokenABI tokenABI, err := libgno.GetGNOTokenABI() @@ -1338,12 +1404,12 @@ func getBalanceOfToken(t *test.Env, account common.Address, block *big.Int) (*bi var result []interface{} //withdrawalsContract := bind.NewBoundContract(libgno.WithdrawalsContractAddress, *withdrawalsABI, client, client, client) opts := &bind.CallOpts{Pending: false, BlockNumber: block} - //err = withdrawalsContract.Call(opts, &result, "claimWithdrawal", account) + //err = withdrawalsContract.Call(opts, &result, "withdrawableAmount", account) //if err != nil { // return nil, err //} - // Call the balanceOf function + //Call the balanceOf function contract := bind.NewBoundContract(libgno.GNOTokenAddress, *tokenABI, client, client, client) err = contract.Call(opts, &result, "balanceOf", account) if err != nil { From 1bdf8b745e92acee85f6a1a542e98531043b8bbf Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Wed, 28 Jun 2023 15:20:00 +0300 Subject: [PATCH 05/27] debug: added contract to track coinbase access gascost --- clients/nethermind/genesis.json | 4 ++ clients/nethermind/nethermind_genesis.json | 4 ++ simulators/ethereum/engine/helper/core.go | 5 +- simulators/ethereum/engine/main.go | 6 +-- .../engine/suites/withdrawals/tests.go | 52 +++++++++++++++++-- 5 files changed, 61 insertions(+), 10 deletions(-) diff --git a/clients/nethermind/genesis.json b/clients/nethermind/genesis.json index 4b48458db2..8d30fe9aa0 100644 --- a/clients/nethermind/genesis.json +++ b/clients/nethermind/genesis.json @@ -309,6 +309,10 @@ "0xface2face0000000000000000000000000000000": { "balance": "0", "constructor": "0x608060405234801561001057600080fd5b506040516105a83803806105a883398101604081905261002f916104c5565b604051637e51dad560e11b81526001600160a01b038083166004830152859185918591859184169063fca3b5aa90602401600060405180830381600087803b15801561007a57600080fd5b505af115801561008e573d6000803e3d6000fd5b5050604051632f3d020360e01b81526001600160a01b038b81166004830152602482018d905284169250632f3d02039150604401600060405180830381600087803b1580156100dc57600080fd5b505af11580156100f0573d6000803e3d6000fd5b5050604051637e51dad560e11b81523060048201526001600160a01b038716925063fca3b5aa9150602401600060405180830381600087803b15801561013557600080fd5b505af1158015610149573d6000803e3d6000fd5b50506040516340c10f1960e01b8152306004820152602481018c90526001600160a01b03871692506340c10f199150604401600060405180830381600087803b15801561019557600080fd5b505af11580156101a9573d6000803e3d6000fd5b505060405163095ea7b360e01b81526001600160a01b038881166004830152602482018d90528716925063095ea7b39150604401602060405180830381600087803b1580156101f757600080fd5b505af115801561020b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061022f9190610532565b506040516339aca1c160e01b81526001600160a01b038981166004830152602482018b9052606060448301526002606483015261060f60f31b60848301528216906339aca1c19060a401600060405180830381600087803b15801561029357600080fd5b505af11580156102a7573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038981166004830152602482018d90528616925063a9059cbb9150604401602060405180830381600087803b1580156102f557600080fd5b505af1158015610309573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032d9190610532565b50604051633825b60160e11b81526001600160a01b038b8116600483015283169063704b6c0290602401600060405180830381600087803b15801561037157600080fd5b505af1158015610385573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b038d811660048301528a16925063704b6c029150602401600060405180830381600087803b1580156103cc57600080fd5b505af11580156103e0573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b038d811660048301528816925063704b6c029150602401600060405180830381600087803b15801561042757600080fd5b505af115801561043b573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b038d811660048301528b16925063704b6c029150602401600060405180830381600087803b15801561048257600080fd5b505af1158015610496573d6000803e3d6000fd5b505050505050505050505050505061055b565b80516001600160a01b03811681146104c057600080fd5b919050565b60008060008060008060c087890312156104de57600080fd5b6104e7876104a9565b9550602087015194506104fc604088016104a9565b935061050a606088016104a9565b9250610518608088016104a9565b915061052660a088016104a9565b90509295509295509295565b60006020828403121561054457600080fd5b8151801515811461055457600080fd5b9392505050565b603f806105696000396000f3fe6080604052600080fdfea264697066735822122049f4cc556f748aa73889b9a92412521b8a627f3f2ce73b3fad45f98df618724b64736f6c63430008090033000000000000000000000000cc4e00a72d871d6c328bcfe9025ad93d0a26df51000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000babe2bed00000000000000000000000000000002000000000000000000000000babe2bed00000000000000000000000000000001000000000000000000000000babe2bed00000000000000000000000000000003000000000000000000000000babe2bed00000000000000000000000000000004" + }, + "0x0101010101010101010101010101010101010101": { + "balance": "0:", + "constructor": "5a600060006000600060004160fff15a9050900360169003600055" } } } \ No newline at end of file diff --git a/clients/nethermind/nethermind_genesis.json b/clients/nethermind/nethermind_genesis.json index 78c57b64d3..d83c41a952 100644 --- a/clients/nethermind/nethermind_genesis.json +++ b/clients/nethermind/nethermind_genesis.json @@ -309,6 +309,10 @@ "0xface2face0000000000000000000000000000000": { "balance": "0", "constructor": "0x608060405234801561001057600080fd5b506040516105a83803806105a883398101604081905261002f916104c5565b604051637e51dad560e11b81526001600160a01b038083166004830152859185918591859184169063fca3b5aa90602401600060405180830381600087803b15801561007a57600080fd5b505af115801561008e573d6000803e3d6000fd5b5050604051632f3d020360e01b81526001600160a01b038b81166004830152602482018d905284169250632f3d02039150604401600060405180830381600087803b1580156100dc57600080fd5b505af11580156100f0573d6000803e3d6000fd5b5050604051637e51dad560e11b81523060048201526001600160a01b038716925063fca3b5aa9150602401600060405180830381600087803b15801561013557600080fd5b505af1158015610149573d6000803e3d6000fd5b50506040516340c10f1960e01b8152306004820152602481018c90526001600160a01b03871692506340c10f199150604401600060405180830381600087803b15801561019557600080fd5b505af11580156101a9573d6000803e3d6000fd5b505060405163095ea7b360e01b81526001600160a01b038881166004830152602482018d90528716925063095ea7b39150604401602060405180830381600087803b1580156101f757600080fd5b505af115801561020b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061022f9190610532565b506040516339aca1c160e01b81526001600160a01b038981166004830152602482018b9052606060448301526002606483015261060f60f31b60848301528216906339aca1c19060a401600060405180830381600087803b15801561029357600080fd5b505af11580156102a7573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038981166004830152602482018d90528616925063a9059cbb9150604401602060405180830381600087803b1580156102f557600080fd5b505af1158015610309573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032d9190610532565b50604051633825b60160e11b81526001600160a01b038b8116600483015283169063704b6c0290602401600060405180830381600087803b15801561037157600080fd5b505af1158015610385573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b038d811660048301528a16925063704b6c029150602401600060405180830381600087803b1580156103cc57600080fd5b505af11580156103e0573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b038d811660048301528816925063704b6c029150602401600060405180830381600087803b15801561042757600080fd5b505af115801561043b573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b038d811660048301528b16925063704b6c029150602401600060405180830381600087803b15801561048257600080fd5b505af1158015610496573d6000803e3d6000fd5b505050505050505050505050505061055b565b80516001600160a01b03811681146104c057600080fd5b919050565b60008060008060008060c087890312156104de57600080fd5b6104e7876104a9565b9550602087015194506104fc604088016104a9565b935061050a606088016104a9565b9250610518608088016104a9565b915061052660a088016104a9565b90509295509295509295565b60006020828403121561054457600080fd5b8151801515811461055457600080fd5b9392505050565b603f806105696000396000f3fe6080604052600080fdfea264697066735822122049f4cc556f748aa73889b9a92412521b8a627f3f2ce73b3fad45f98df618724b64736f6c63430008090033000000000000000000000000cc4e00a72d871d6c328bcfe9025ad93d0a26df51000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000babe2bed00000000000000000000000000000002000000000000000000000000babe2bed00000000000000000000000000000001000000000000000000000000babe2bed00000000000000000000000000000003000000000000000000000000babe2bed00000000000000000000000000000004" + }, + "0x0101010101010101010101010101010101010101": { + "balance": "0:", + "constructor": "0x5a600060006000600060004160fff15a9050900360169003600055" } } } \ No newline at end of file diff --git a/simulators/ethereum/engine/helper/core.go b/simulators/ethereum/engine/helper/core.go index 1f2daca0f1..c16254eb81 100644 --- a/simulators/ethereum/engine/helper/core.go +++ b/simulators/ethereum/engine/helper/core.go @@ -3,11 +3,12 @@ package helper import ( "encoding/json" "fmt" + "math/big" + "strconv" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" - "math/big" - "strconv" ) type GenesisAlloc interface { diff --git a/simulators/ethereum/engine/main.go b/simulators/ethereum/engine/main.go index 41a5387b0d..aa7cb10730 100644 --- a/simulators/ethereum/engine/main.go +++ b/simulators/ethereum/engine/main.go @@ -86,7 +86,6 @@ type ClientGenesis interface { // Load the genesis based on each client -// getTimestamp of the next 2 minutes func getTimestamp(spec test.SpecInterface) int64 { now := time.Now() @@ -95,14 +94,13 @@ func getTimestamp(spec test.SpecInterface) int64 { preShapellaBlock = 1 } - // Calculate the start of the next 2 minutes - nextMinute := now.Truncate(time.Minute).Add(time.Duration(preShapellaBlock) * 3 * time.Minute).Add(time.Minute) + nextMinute := now.Truncate(time.Minute).Add(time.Duration(preShapellaBlock) * 1 * time.Minute).Add(time.Minute) // Create a time.Time value from the int64 timestamp //tUnix := time.Unix(nex, 0) // Format the time in a human-readable way formattedTime := nextMinute.Format("2006-01-02 15:04:05") - fmt.Sprintf("Formatted timestamp: %v\n", formattedTime) + fmt.Printf("Formatted timestamp: %v\n", formattedTime) // Get the Unix timestamp of the next 2 minutes return nextMinute.Unix() diff --git a/simulators/ethereum/engine/suites/withdrawals/tests.go b/simulators/ethereum/engine/suites/withdrawals/tests.go index b98f764588..22f3f4eada 100644 --- a/simulators/ethereum/engine/suites/withdrawals/tests.go +++ b/simulators/ethereum/engine/suites/withdrawals/tests.go @@ -959,7 +959,50 @@ func (ws *WithdrawalsBaseSpec) GetGenesisTest(base string) string { func (ws *WithdrawalsBaseSpec) GetGenesis(base string) helper.Genesis { genesis := ws.Spec.GetGenesis(base) - + // // Add accounts that use the coinbase (EIP-3651) + // warmCoinbaseCode := []byte{ + // 0x5A, // GAS + // 0x60, // PUSH1(0x00) + // 0x00, + // 0x60, // PUSH1(0x00) + // 0x00, + // 0x60, // PUSH1(0x00) + // 0x00, + // 0x60, // PUSH1(0x00) + // 0x00, + // 0x60, // PUSH1(0x00) + // 0x00, + // 0x41, // COINBASE + // 0x60, // PUSH1(0xFF) + // 0xFF, + // 0xF1, // CALL + // 0x5A, // GAS + // 0x90, // SWAP1 + // 0x50, // POP - Call result + // 0x90, // SWAP1 + // 0x03, // SUB + // 0x60, // PUSH1(0x16) - GAS + PUSH * 6 + COINBASE + // 0x16, + // 0x90, // SWAP1 + // 0x03, // SUB + // 0x43, // NUMBER + // 0x55, // SSTORE + // } + // genesis.Alloc()[WARM_COINBASE_ADDRESS] = core.GenesisAccount{ + // Code: warmCoinbaseCode, + // Balance: common.Big0, + // } + + // // Add accounts that use the PUSH0 (EIP-3855) + // push0Code := []byte{ + // 0x43, // NUMBER + // 0x5F, // PUSH0 + // 0x55, // SSTORE + // } + // genesis.Alloc()[PUSH0_ADDRESS] = core.GenesisAccount{ + // Code: push0Code, + // Balance: common.Big0, + // } return genesis } @@ -970,8 +1013,9 @@ func (ws *WithdrawalsBaseSpec) VerifyContractsStorage(t *test.Env) { // Assume that forkchoice updated has been already sent latestPayloadNumber := t.CLMock.LatestExecutedPayload.Number latestPayloadNumberBig := big.NewInt(int64(latestPayloadNumber)) + s := big.NewInt(0) - r := t.TestEngine.TestStorageAt(WARM_COINBASE_ADDRESS, common.BigToHash(latestPayloadNumberBig), latestPayloadNumberBig) + r := t.TestEngine.TestStorageAt(WARM_COINBASE_ADDRESS, common.BigToHash(s), latestPayloadNumberBig) p := t.TestEngine.TestStorageAt(PUSH0_ADDRESS, common.Hash{}, latestPayloadNumberBig) if latestPayloadNumber >= ws.WithdrawalsForkHeight { // Shanghai @@ -1125,7 +1169,7 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { Amount: common.Big1, Payload: nil, TxType: t.TestTransactionType, - GasLimit: t.Genesis.GasLimit(), + GasLimit: 75000, ChainID: t.Genesis.Config().ChainID, }, ) @@ -1194,7 +1238,6 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { time.Sleep(durationUntilFuture) } } - // Produce requested post-shanghai blocks // (At least 1 block will be produced after this procedure ends). var ( @@ -1273,6 +1316,7 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { // r.ExpectBalanceEqual(expectedAccountBalance) // } //} + ws.VerifyContractsStorage(t) }, OnForkchoiceBroadcast: func() { if !ws.SkipBaseVerifications { From 335f64cb331f8aa0650147bb10a0469dc0551012 Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Wed, 28 Jun 2023 20:48:30 +0300 Subject: [PATCH 06/27] feat: add AllocGenesis logic for nethermind chainspec --- clients/nethermind/genesis.json | 2 +- simulators/ethereum/engine/helper/core.go | 35 +++++-- .../engine/suites/withdrawals/tests.go | 99 ++++++++++--------- 3 files changed, 78 insertions(+), 58 deletions(-) diff --git a/clients/nethermind/genesis.json b/clients/nethermind/genesis.json index 8d30fe9aa0..11ab8f1120 100644 --- a/clients/nethermind/genesis.json +++ b/clients/nethermind/genesis.json @@ -312,7 +312,7 @@ }, "0x0101010101010101010101010101010101010101": { "balance": "0:", - "constructor": "5a600060006000600060004160fff15a9050900360169003600055" + "constructor": "0x5a600060006000600060004160fff15a9050900360169003600055" } } } \ No newline at end of file diff --git a/simulators/ethereum/engine/helper/core.go b/simulators/ethereum/engine/helper/core.go index c16254eb81..f2a968a04b 100644 --- a/simulators/ethereum/engine/helper/core.go +++ b/simulators/ethereum/engine/helper/core.go @@ -20,12 +20,13 @@ type GenesisAlloc interface { type GenesisAccount interface { // Balance holds the balance of the account Balance() *big.Int - SetBalance() + SetBalance(balance *big.Int) Code() []byte SetCode(code []byte) SetConstructor(constructor []byte) Constructor() []byte } + type Genesis interface { Config() *params.ChainConfig SetConfig(config *params.ChainConfig) @@ -44,7 +45,7 @@ type Genesis interface { Coinbase() common.Address SetCoinbase(address common.Address) Alloc() GenesisAlloc - AllocGenesis(address common.Address, account GenesisAccount) + AllocGenesis(address common.Address, account Account) UpdateTimestamp(timestamp string) // Used for testing @@ -75,11 +76,26 @@ type Builtin struct { type Account map[string]interface{} -//struct { -// Balance string `json:"balance,omitempty"` -// Constructor string `json:"constructor,omitempty"` -// Builtin Builtin `json:"builtin,omitempty"` -//} +// struct { +// Balance string `json:"balance,omitempty"` +// Constructor string `json:"constructor,omitempty"` +// Builtin Builtin `json:"builtin,omitempty"` +// } +func NewAccount() Account { + return make(Account, 0) +} + +func (a Account) SetBalance(balance *big.Int) { + a["balance"] = common.BigToHash(balance) +} + +func (a Account) SetCode(code []byte) { + a["code"] = common.Bytes2Hex(code) +} + +func (a Account) SetConstructor(constructor []byte) { + a["constructor"] = common.Bytes2Hex(constructor) +} type NethermindGenesis struct { Seal struct { @@ -267,9 +283,8 @@ func (n *NethermindChainSpec) Alloc() GenesisAlloc { panic("implement me") } -func (n *NethermindChainSpec) AllocGenesis(address common.Address, account GenesisAccount) { - //TODO implement me - panic("implement me") +func (n *NethermindChainSpec) AllocGenesis(address common.Address, account Account) { + n.Accounts[address.Hex()] = account } func (n *NethermindChainSpec) Number() uint64 { diff --git a/simulators/ethereum/engine/suites/withdrawals/tests.go b/simulators/ethereum/engine/suites/withdrawals/tests.go index 22f3f4eada..578a6adfd2 100644 --- a/simulators/ethereum/engine/suites/withdrawals/tests.go +++ b/simulators/ethereum/engine/suites/withdrawals/tests.go @@ -959,50 +959,55 @@ func (ws *WithdrawalsBaseSpec) GetGenesisTest(base string) string { func (ws *WithdrawalsBaseSpec) GetGenesis(base string) helper.Genesis { genesis := ws.Spec.GetGenesis(base) - // // Add accounts that use the coinbase (EIP-3651) - // warmCoinbaseCode := []byte{ - // 0x5A, // GAS - // 0x60, // PUSH1(0x00) - // 0x00, - // 0x60, // PUSH1(0x00) - // 0x00, - // 0x60, // PUSH1(0x00) - // 0x00, - // 0x60, // PUSH1(0x00) - // 0x00, - // 0x60, // PUSH1(0x00) - // 0x00, - // 0x41, // COINBASE - // 0x60, // PUSH1(0xFF) - // 0xFF, - // 0xF1, // CALL - // 0x5A, // GAS - // 0x90, // SWAP1 - // 0x50, // POP - Call result - // 0x90, // SWAP1 - // 0x03, // SUB - // 0x60, // PUSH1(0x16) - GAS + PUSH * 6 + COINBASE - // 0x16, - // 0x90, // SWAP1 - // 0x03, // SUB - // 0x43, // NUMBER - // 0x55, // SSTORE - // } - // genesis.Alloc()[WARM_COINBASE_ADDRESS] = core.GenesisAccount{ - // Code: warmCoinbaseCode, - // Balance: common.Big0, - // } - - // // Add accounts that use the PUSH0 (EIP-3855) - // push0Code := []byte{ - // 0x43, // NUMBER - // 0x5F, // PUSH0 - // 0x55, // SSTORE - // } - // genesis.Alloc()[PUSH0_ADDRESS] = core.GenesisAccount{ - // Code: push0Code, - // Balance: common.Big0, - // } + // Add accounts that use the coinbase (EIP-3651) + warmCoinbaseCode := []byte{ + 0x5A, // GAS + 0x60, // PUSH1(0x00) + 0x00, + 0x60, // PUSH1(0x00) + 0x00, + 0x60, // PUSH1(0x00) + 0x00, + 0x60, // PUSH1(0x00) + 0x00, + 0x60, // PUSH1(0x00) + 0x00, + 0x41, // COINBASE + 0x60, // PUSH1(0xFF) + 0xFF, + 0xF1, // CALL + 0x5A, // GAS + 0x90, // SWAP1 + 0x50, // POP - Call result + 0x90, // SWAP1 + 0x03, // SUB + 0x60, // PUSH1(0x16) - GAS + PUSH * 6 + COINBASE + 0x16, + 0x90, // SWAP1 + 0x03, // SUB + // TODO: + 0x60, // PUSH1(0x00) + 0x00, + // 0x43, // NUMBER + 0x55, // SSTORE + } + warmCoinbaseAcc := helper.NewAccount() + push0Acc := helper.NewAccount() + + warmCoinbaseAcc.SetBalance(common.Big0) + warmCoinbaseAcc.SetCode(warmCoinbaseCode) + + genesis.AllocGenesis(WARM_COINBASE_ADDRESS, warmCoinbaseAcc) + // Add accounts that use the PUSH0 (EIP-3855) + push0Code := []byte{ + 0x43, // NUMBER + 0x5F, // PUSH0 + 0x55, // SSTORE + } + push0Acc.SetBalance(common.Big0) + push0Acc.SetCode(push0Code) + + genesis.AllocGenesis(PUSH0_ADDRESS, push0Acc) return genesis } @@ -1022,9 +1027,9 @@ func (ws *WithdrawalsBaseSpec) VerifyContractsStorage(t *test.Env) { r.ExpectBigIntStorageEqual(big.NewInt(100)) // WARM_STORAGE_READ_COST p.ExpectBigIntStorageEqual(latestPayloadNumberBig) // tx succeeded } else { - // // Pre-Shanghai - // r.ExpectBigIntStorageEqual(big.NewInt(2600)) // COLD_ACCOUNT_ACCESS_COST - // p.ExpectBigIntStorageEqual(big.NewInt(0)) // tx must've failed + // Pre-Shanghai + r.ExpectBigIntStorageEqual(big.NewInt(2600)) // COLD_ACCOUNT_ACCESS_COST + p.ExpectBigIntStorageEqual(big.NewInt(0)) // tx must've failed } } From 3bcf6a72bf4f413de107524fcfdd5231808d0fd6 Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Thu, 29 Jun 2023 13:02:05 +0300 Subject: [PATCH 07/27] chore: separated payload transactions logic --- clients/nethermind/genesis.json | 4 -- clients/nethermind/nethermind_genesis.json | 4 -- .../engine/suites/withdrawals/tests.go | 72 ++++++++----------- 3 files changed, 28 insertions(+), 52 deletions(-) diff --git a/clients/nethermind/genesis.json b/clients/nethermind/genesis.json index 11ab8f1120..4b48458db2 100644 --- a/clients/nethermind/genesis.json +++ b/clients/nethermind/genesis.json @@ -309,10 +309,6 @@ "0xface2face0000000000000000000000000000000": { "balance": "0", "constructor": "0x608060405234801561001057600080fd5b506040516105a83803806105a883398101604081905261002f916104c5565b604051637e51dad560e11b81526001600160a01b038083166004830152859185918591859184169063fca3b5aa90602401600060405180830381600087803b15801561007a57600080fd5b505af115801561008e573d6000803e3d6000fd5b5050604051632f3d020360e01b81526001600160a01b038b81166004830152602482018d905284169250632f3d02039150604401600060405180830381600087803b1580156100dc57600080fd5b505af11580156100f0573d6000803e3d6000fd5b5050604051637e51dad560e11b81523060048201526001600160a01b038716925063fca3b5aa9150602401600060405180830381600087803b15801561013557600080fd5b505af1158015610149573d6000803e3d6000fd5b50506040516340c10f1960e01b8152306004820152602481018c90526001600160a01b03871692506340c10f199150604401600060405180830381600087803b15801561019557600080fd5b505af11580156101a9573d6000803e3d6000fd5b505060405163095ea7b360e01b81526001600160a01b038881166004830152602482018d90528716925063095ea7b39150604401602060405180830381600087803b1580156101f757600080fd5b505af115801561020b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061022f9190610532565b506040516339aca1c160e01b81526001600160a01b038981166004830152602482018b9052606060448301526002606483015261060f60f31b60848301528216906339aca1c19060a401600060405180830381600087803b15801561029357600080fd5b505af11580156102a7573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038981166004830152602482018d90528616925063a9059cbb9150604401602060405180830381600087803b1580156102f557600080fd5b505af1158015610309573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032d9190610532565b50604051633825b60160e11b81526001600160a01b038b8116600483015283169063704b6c0290602401600060405180830381600087803b15801561037157600080fd5b505af1158015610385573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b038d811660048301528a16925063704b6c029150602401600060405180830381600087803b1580156103cc57600080fd5b505af11580156103e0573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b038d811660048301528816925063704b6c029150602401600060405180830381600087803b15801561042757600080fd5b505af115801561043b573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b038d811660048301528b16925063704b6c029150602401600060405180830381600087803b15801561048257600080fd5b505af1158015610496573d6000803e3d6000fd5b505050505050505050505050505061055b565b80516001600160a01b03811681146104c057600080fd5b919050565b60008060008060008060c087890312156104de57600080fd5b6104e7876104a9565b9550602087015194506104fc604088016104a9565b935061050a606088016104a9565b9250610518608088016104a9565b915061052660a088016104a9565b90509295509295509295565b60006020828403121561054457600080fd5b8151801515811461055457600080fd5b9392505050565b603f806105696000396000f3fe6080604052600080fdfea264697066735822122049f4cc556f748aa73889b9a92412521b8a627f3f2ce73b3fad45f98df618724b64736f6c63430008090033000000000000000000000000cc4e00a72d871d6c328bcfe9025ad93d0a26df51000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000babe2bed00000000000000000000000000000002000000000000000000000000babe2bed00000000000000000000000000000001000000000000000000000000babe2bed00000000000000000000000000000003000000000000000000000000babe2bed00000000000000000000000000000004" - }, - "0x0101010101010101010101010101010101010101": { - "balance": "0:", - "constructor": "0x5a600060006000600060004160fff15a9050900360169003600055" } } } \ No newline at end of file diff --git a/clients/nethermind/nethermind_genesis.json b/clients/nethermind/nethermind_genesis.json index d83c41a952..78c57b64d3 100644 --- a/clients/nethermind/nethermind_genesis.json +++ b/clients/nethermind/nethermind_genesis.json @@ -309,10 +309,6 @@ "0xface2face0000000000000000000000000000000": { "balance": "0", "constructor": "0x608060405234801561001057600080fd5b506040516105a83803806105a883398101604081905261002f916104c5565b604051637e51dad560e11b81526001600160a01b038083166004830152859185918591859184169063fca3b5aa90602401600060405180830381600087803b15801561007a57600080fd5b505af115801561008e573d6000803e3d6000fd5b5050604051632f3d020360e01b81526001600160a01b038b81166004830152602482018d905284169250632f3d02039150604401600060405180830381600087803b1580156100dc57600080fd5b505af11580156100f0573d6000803e3d6000fd5b5050604051637e51dad560e11b81523060048201526001600160a01b038716925063fca3b5aa9150602401600060405180830381600087803b15801561013557600080fd5b505af1158015610149573d6000803e3d6000fd5b50506040516340c10f1960e01b8152306004820152602481018c90526001600160a01b03871692506340c10f199150604401600060405180830381600087803b15801561019557600080fd5b505af11580156101a9573d6000803e3d6000fd5b505060405163095ea7b360e01b81526001600160a01b038881166004830152602482018d90528716925063095ea7b39150604401602060405180830381600087803b1580156101f757600080fd5b505af115801561020b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061022f9190610532565b506040516339aca1c160e01b81526001600160a01b038981166004830152602482018b9052606060448301526002606483015261060f60f31b60848301528216906339aca1c19060a401600060405180830381600087803b15801561029357600080fd5b505af11580156102a7573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038981166004830152602482018d90528616925063a9059cbb9150604401602060405180830381600087803b1580156102f557600080fd5b505af1158015610309573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032d9190610532565b50604051633825b60160e11b81526001600160a01b038b8116600483015283169063704b6c0290602401600060405180830381600087803b15801561037157600080fd5b505af1158015610385573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b038d811660048301528a16925063704b6c029150602401600060405180830381600087803b1580156103cc57600080fd5b505af11580156103e0573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b038d811660048301528816925063704b6c029150602401600060405180830381600087803b15801561042757600080fd5b505af115801561043b573d6000803e3d6000fd5b5050604051633825b60160e11b81526001600160a01b038d811660048301528b16925063704b6c029150602401600060405180830381600087803b15801561048257600080fd5b505af1158015610496573d6000803e3d6000fd5b505050505050505050505050505061055b565b80516001600160a01b03811681146104c057600080fd5b919050565b60008060008060008060c087890312156104de57600080fd5b6104e7876104a9565b9550602087015194506104fc604088016104a9565b935061050a606088016104a9565b9250610518608088016104a9565b915061052660a088016104a9565b90509295509295509295565b60006020828403121561054457600080fd5b8151801515811461055457600080fd5b9392505050565b603f806105696000396000f3fe6080604052600080fdfea264697066735822122049f4cc556f748aa73889b9a92412521b8a627f3f2ce73b3fad45f98df618724b64736f6c63430008090033000000000000000000000000cc4e00a72d871d6c328bcfe9025ad93d0a26df51000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000babe2bed00000000000000000000000000000002000000000000000000000000babe2bed00000000000000000000000000000001000000000000000000000000babe2bed00000000000000000000000000000003000000000000000000000000babe2bed00000000000000000000000000000004" - }, - "0x0101010101010101010101010101010101010101": { - "balance": "0:", - "constructor": "0x5a600060006000600060004160fff15a9050900360169003600055" } } } \ No newline at end of file diff --git a/simulators/ethereum/engine/suites/withdrawals/tests.go b/simulators/ethereum/engine/suites/withdrawals/tests.go index 578a6adfd2..97b92d9640 100644 --- a/simulators/ethereum/engine/suites/withdrawals/tests.go +++ b/simulators/ethereum/engine/suites/withdrawals/tests.go @@ -1026,6 +1026,7 @@ func (ws *WithdrawalsBaseSpec) VerifyContractsStorage(t *test.Env) { // Shanghai r.ExpectBigIntStorageEqual(big.NewInt(100)) // WARM_STORAGE_READ_COST p.ExpectBigIntStorageEqual(latestPayloadNumberBig) // tx succeeded + } else { // Pre-Shanghai r.ExpectBigIntStorageEqual(big.NewInt(2600)) // COLD_ACCOUNT_ACCESS_COST @@ -1106,6 +1107,29 @@ func getTimestamp() int64 { return nextThreeSeconds.Unix() } +func (ws *WithdrawalsBaseSpec) sendPayloadTransactions(t *test.Env) { + for i := uint64(0); i < ws.GetTransactionCountPerPayload(); i++ { + var destAddr = TX_CONTRACT_ADDRESSES[int(i)%len(TX_CONTRACT_ADDRESSES)] + + _, err := helper.SendNextTransaction( + t.TestContext, + t.CLMock.NextBlockProducer, + &helper.BaseTransactionCreator{ + Recipient: &destAddr, + Amount: common.Big1, + Payload: nil, + TxType: t.TestTransactionType, + GasLimit: t.Genesis.GasLimit(), + ChainID: t.Genesis.Config().ChainID, + }, + ) + + if err != nil { + t.Fatalf("FAIL (%s): Error trying to send transaction: %v", t.TestName, err) + } + } +} + // type balancer map[common.Address]uint64 // type blockBalancer map[uint64]balancer // @@ -1161,28 +1185,7 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { t.CLMock.ProduceBlocks(int(ws.GetPreWithdrawalsBlockCount()), clmock.BlockProcessCallbacks{ OnPayloadProducerSelected: func() { - // Send some transactions - for i := uint64(0); i < ws.GetTransactionCountPerPayload(); i++ { - - var destAddr = TX_CONTRACT_ADDRESSES[int(i)%len(TX_CONTRACT_ADDRESSES)] - - _, err := helper.SendNextTransaction( - t.TestContext, - t.CLMock.NextBlockProducer, - &helper.BaseTransactionCreator{ - Recipient: &destAddr, - Amount: common.Big1, - Payload: nil, - TxType: t.TestTransactionType, - GasLimit: 75000, - ChainID: t.Genesis.Config().ChainID, - }, - ) - - if err != nil { - t.Fatalf("FAIL (%s): Error trying to send transaction: %v", t.TestName, err) - } - } + ws.sendPayloadTransactions(t) if !ws.SkipBaseVerifications { @@ -1256,27 +1259,8 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { // Send some withdrawals t.CLMock.NextWithdrawals, nextIndex = ws.GenerateWithdrawalsForBlock(nextIndex, startAccount) ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber] = t.CLMock.NextWithdrawals - // Send some transactions - for i := uint64(0); i < ws.GetTransactionCountPerPayload(); i++ { - var destAddr = TX_CONTRACT_ADDRESSES[int(i)%len(TX_CONTRACT_ADDRESSES)] - - _, err := helper.SendNextTransaction( - t.TestContext, - t.CLMock.NextBlockProducer, - &helper.BaseTransactionCreator{ - Recipient: &destAddr, - Amount: common.Big1, - Payload: nil, - TxType: t.TestTransactionType, - GasLimit: t.Genesis.GasLimit(), - ChainID: t.Genesis.Config().ChainID, - }, - ) - if err != nil { - t.Fatalf("FAIL (%s): Error trying to send transaction: %v", t.TestName, err) - } - } + ws.sendPayloadTransactions(t) }, OnGetPayload: func() { @@ -1321,7 +1305,7 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { // r.ExpectBalanceEqual(expectedAccountBalance) // } //} - ws.VerifyContractsStorage(t) + }, OnForkchoiceBroadcast: func() { if !ws.SkipBaseVerifications { @@ -1339,7 +1323,7 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { t.Fatalf("FAIL (%s): Incorrect balance on account %s after withdrawals applied: want=%d, got=%d", t.TestName, addr, expectBalanceEqual, latestBalance) } } - + ws.VerifyContractsStorage(t) } }, }) From aac98c2b821fc854585f383cd3a706422a8b576d Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Thu, 29 Jun 2023 13:26:40 +0300 Subject: [PATCH 08/27] docs: add payload transactions function comments --- simulators/ethereum/engine/suites/withdrawals/tests.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/simulators/ethereum/engine/suites/withdrawals/tests.go b/simulators/ethereum/engine/suites/withdrawals/tests.go index 97b92d9640..4facf0c59c 100644 --- a/simulators/ethereum/engine/suites/withdrawals/tests.go +++ b/simulators/ethereum/engine/suites/withdrawals/tests.go @@ -1107,6 +1107,15 @@ func getTimestamp() int64 { return nextThreeSeconds.Unix() } +// sendPayloadTransactions spreads and sends TransactionCountPerPayload equaly between TX_CONTRACT_ADDRESSES +// +// Tx params: +// +// Amount: common.Big1 +// Payload: nil +// TxType: t.TestTransactionType +// GasLimit: t.Genesis.GasLimit() +// ChainID: t.Genesis.Config().ChainID, func (ws *WithdrawalsBaseSpec) sendPayloadTransactions(t *test.Env) { for i := uint64(0); i < ws.GetTransactionCountPerPayload(); i++ { var destAddr = TX_CONTRACT_ADDRESSES[int(i)%len(TX_CONTRACT_ADDRESSES)] From 2335eb217a78bde2721f6a7b6c2afe17db1fd5c8 Mon Sep 17 00:00:00 2001 From: Marcos Antonio Maceo Reyes Date: Thu, 29 Jun 2023 11:39:29 -0400 Subject: [PATCH 09/27] [debug] working withdrawals but crashing on nethermind node --- simulators/ethereum/engine/clmock/clmock.go | 16 +- simulators/ethereum/engine/globals/globals.go | 6 +- simulators/ethereum/engine/helper/helper.go | 26 + .../engine/init/nethermind_genesis.json | 3 + simulators/ethereum/engine/libgno/gno.go | 13 + simulators/ethereum/engine/libgno/gnoToken.go | 1225 +++++++++++++++++ simulators/ethereum/engine/main.go | 8 - .../engine/suites/withdrawals/tests.go | 315 +++-- 8 files changed, 1458 insertions(+), 154 deletions(-) create mode 100644 simulators/ethereum/engine/libgno/gnoToken.go diff --git a/simulators/ethereum/engine/clmock/clmock.go b/simulators/ethereum/engine/clmock/clmock.go index 1054586cbb..5e50112c74 100644 --- a/simulators/ethereum/engine/clmock/clmock.go +++ b/simulators/ethereum/engine/clmock/clmock.go @@ -108,14 +108,6 @@ type CLMocker struct { } func isShanghai(blockTimestamp uint64, shanghaiTimestamp *big.Int) bool { - tUnix := time.Unix(int64(blockTimestamp), 0) - formattedTime := tUnix.Format("2006-01-02 15:04:05") - fmt.Sprintf("Block timestamp: %v", formattedTime) - - tUnix = time.Unix(shanghaiTimestamp.Int64(), 0) - shangai := tUnix.Format("2006-01-02 15:04:05") - fmt.Sprintf("Shangai Timestamp: %v", shangai) - return shanghaiTimestamp != nil && big.NewInt(int64(blockTimestamp)).Cmp(shanghaiTimestamp) >= 0 } @@ -322,8 +314,9 @@ func (cl *CLMocker) pickNextPayloadProducer() { // Selected client latest block hash does not match canonical chain, try again cl.NextBlockProducer = nil continue + } else { + break } - break } @@ -550,9 +543,8 @@ func (cl *CLMocker) ProduceSingleBlock(callbacks BlockProcessCallbacks) { previousForkchoice := cl.LatestForkchoice cl.HeadHashHistory = append(cl.HeadHashHistory, cl.LatestPayloadBuilt.BlockHash) - cl.LatestForkchoice = api.ForkchoiceStateV1{ - HeadBlockHash: cl.LatestPayloadBuilt.BlockHash, - } + cl.LatestForkchoice = api.ForkchoiceStateV1{} + cl.LatestForkchoice.HeadBlockHash = cl.LatestPayloadBuilt.BlockHash if len(cl.HeadHashHistory) > int(cl.SlotsToSafe.Int64()) { cl.LatestForkchoice.SafeBlockHash = cl.HeadHashHistory[len(cl.HeadHashHistory)-int(cl.SlotsToSafe.Int64())-1] } diff --git a/simulators/ethereum/engine/globals/globals.go b/simulators/ethereum/engine/globals/globals.go index 0371d62f9d..9591c807c9 100644 --- a/simulators/ethereum/engine/globals/globals.go +++ b/simulators/ethereum/engine/globals/globals.go @@ -31,8 +31,10 @@ var ( MaxTimeDriftSeconds = int64(60) // This is the account that sends vault funding transactions. - VaultAccountAddress = common.HexToAddress("0x59f80ed315477f9f0059D862713A7b082A599217") - VaultKey, _ = crypto.HexToECDSA("ff804d09c833619af673fa99c92ae506d30ff60f37ad41a3d098dcf714db1e4a") + VaultAccountAddress = common.HexToAddress("0x59f80ed315477f9f0059D862713A7b082A599217") + VaultKey, _ = crypto.HexToECDSA("ff804d09c833619af673fa99c92ae506d30ff60f37ad41a3d098dcf714db1e4a") + GnoVaultAccountAddress = common.HexToAddress("0xcC4e00A72d871D6c328BcFE9025AD93d0a26dF51") + GnoVaultVaultKey, _ = crypto.HexToECDSA("82fcff5c93519f3615d6a92a5a7d146ee305082d3d768d63eb1b45f11f419346") // Global test case timeout DefaultTestCaseTimeout = time.Minute * 10 diff --git a/simulators/ethereum/engine/helper/helper.go b/simulators/ethereum/engine/helper/helper.go index 73295c24e8..a440db9dbd 100644 --- a/simulators/ethereum/engine/helper/helper.go +++ b/simulators/ethereum/engine/helper/helper.go @@ -566,6 +566,32 @@ func SendNextTransaction(testCtx context.Context, node client.EngineClient, txCr } } +func SendNextTransactionWithAccount(testCtx context.Context, node client.EngineClient, txCreator TransactionCreator, sender common.Address) (*types.Transaction, error) { + nonce, err := node.GetNextAccountNonce(testCtx, sender) + if err != nil { + return nil, err + } + tx, err := txCreator.MakeTransaction(nonce) + if err != nil { + return nil, err + } + for { + ctx, cancel := context.WithTimeout(testCtx, globals.RPCTimeout) + defer cancel() + err := node.SendTransaction(ctx, tx) + if err == nil { + return tx, nil + } else if SentTxAlreadyKnown(err) { + return tx, nil + } + select { + case <-time.After(time.Second): + case <-testCtx.Done(): + return nil, testCtx.Err() + } + } +} + func SendNextTransactions(testCtx context.Context, node client.EngineClient, txCreator TransactionCreator, txCount uint64) ([]*types.Transaction, error) { var err error nonce, err := node.GetNextAccountNonce(testCtx, globals.VaultAccountAddress) diff --git a/simulators/ethereum/engine/init/nethermind_genesis.json b/simulators/ethereum/engine/init/nethermind_genesis.json index 1e82ea1240..f31acaf006 100644 --- a/simulators/ethereum/engine/init/nethermind_genesis.json +++ b/simulators/ethereum/engine/init/nethermind_genesis.json @@ -115,6 +115,9 @@ } } }, + "0x0000000000000000000000babe0babe000000000": { + "balance": "0" + }, "0x0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", diff --git a/simulators/ethereum/engine/libgno/gno.go b/simulators/ethereum/engine/libgno/gno.go index 76d97a1ea9..714f9dc9c7 100644 --- a/simulators/ethereum/engine/libgno/gno.go +++ b/simulators/ethereum/engine/libgno/gno.go @@ -78,6 +78,19 @@ func BalanceOfAddressData(account common.Address) ([]byte, error) { return dataBytes, nil } +// BalanceOfAddressData return contract method to get the balance of a GNO token. +func TransferData(recipient common.Address, amount *big.Int) ([]byte, error) { + gnoTokenABI, err := abi.JSON(strings.NewReader(GNOTokenContractABI)) + if err != nil { + return []byte{}, ErrorLoadingGNOTokenContract + } + dataBytes, err := gnoTokenABI.Pack("transfer", recipient, amount) + if err != nil { + return []byte{}, fmt.Errorf("%w: %w", ErrorPackingArguments, err) + } + return dataBytes, nil +} + // GetGNOTokenABI return the GNO token ABI. func GetGNOTokenABI() (*abi.ABI, error) { gnoTokenABI, err := abi.JSON(strings.NewReader(GNOTokenContractABI)) diff --git a/simulators/ethereum/engine/libgno/gnoToken.go b/simulators/ethereum/engine/libgno/gnoToken.go new file mode 100644 index 0000000000..cc57a962f0 --- /dev/null +++ b/simulators/ethereum/engine/libgno/gnoToken.go @@ -0,0 +1,1225 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package libgno + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// GnoTokenMetaData contains all meta data concerning the GnoToken contract. +var GnoTokenMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"}],\"name\":\"setMinter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"transferAndCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"claimTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// GnoTokenABI is the input ABI used to generate the binding from. +// Deprecated: Use GnoTokenMetaData.ABI instead. +var GnoTokenABI = GnoTokenMetaData.ABI + +// GnoToken is an auto generated Go binding around an Ethereum contract. +type GnoToken struct { + GnoTokenCaller // Read-only binding to the contract + GnoTokenTransactor // Write-only binding to the contract + GnoTokenFilterer // Log filterer for contract events +} + +// GnoTokenCaller is an auto generated read-only Go binding around an Ethereum contract. +type GnoTokenCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GnoTokenTransactor is an auto generated write-only Go binding around an Ethereum contract. +type GnoTokenTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GnoTokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type GnoTokenFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GnoTokenSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type GnoTokenSession struct { + Contract *GnoToken // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// GnoTokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type GnoTokenCallerSession struct { + Contract *GnoTokenCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// GnoTokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type GnoTokenTransactorSession struct { + Contract *GnoTokenTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// GnoTokenRaw is an auto generated low-level Go binding around an Ethereum contract. +type GnoTokenRaw struct { + Contract *GnoToken // Generic contract binding to access the raw methods on +} + +// GnoTokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type GnoTokenCallerRaw struct { + Contract *GnoTokenCaller // Generic read-only contract binding to access the raw methods on +} + +// GnoTokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type GnoTokenTransactorRaw struct { + Contract *GnoTokenTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewGnoToken creates a new instance of GnoToken, bound to a specific deployed contract. +func NewGnoToken(address common.Address, backend bind.ContractBackend) (*GnoToken, error) { + contract, err := bindGnoToken(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &GnoToken{GnoTokenCaller: GnoTokenCaller{contract: contract}, GnoTokenTransactor: GnoTokenTransactor{contract: contract}, GnoTokenFilterer: GnoTokenFilterer{contract: contract}}, nil +} + +// NewGnoTokenCaller creates a new read-only instance of GnoToken, bound to a specific deployed contract. +func NewGnoTokenCaller(address common.Address, caller bind.ContractCaller) (*GnoTokenCaller, error) { + contract, err := bindGnoToken(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &GnoTokenCaller{contract: contract}, nil +} + +// NewGnoTokenTransactor creates a new write-only instance of GnoToken, bound to a specific deployed contract. +func NewGnoTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*GnoTokenTransactor, error) { + contract, err := bindGnoToken(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &GnoTokenTransactor{contract: contract}, nil +} + +// NewGnoTokenFilterer creates a new log filterer instance of GnoToken, bound to a specific deployed contract. +func NewGnoTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*GnoTokenFilterer, error) { + contract, err := bindGnoToken(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &GnoTokenFilterer{contract: contract}, nil +} + +// bindGnoToken binds a generic wrapper to an already deployed contract. +func bindGnoToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(GnoTokenABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_GnoToken *GnoTokenRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _GnoToken.Contract.GnoTokenCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_GnoToken *GnoTokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GnoToken.Contract.GnoTokenTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_GnoToken *GnoTokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _GnoToken.Contract.GnoTokenTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_GnoToken *GnoTokenCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _GnoToken.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_GnoToken *GnoTokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GnoToken.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_GnoToken *GnoTokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _GnoToken.Contract.contract.Transact(opts, method, params...) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_GnoToken *GnoTokenCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _GnoToken.contract.Call(opts, &out, "allowance", owner, spender) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_GnoToken *GnoTokenSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _GnoToken.Contract.Allowance(&_GnoToken.CallOpts, owner, spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_GnoToken *GnoTokenCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _GnoToken.Contract.Allowance(&_GnoToken.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_GnoToken *GnoTokenCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { + var out []interface{} + err := _GnoToken.contract.Call(opts, &out, "balanceOf", account) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_GnoToken *GnoTokenSession) BalanceOf(account common.Address) (*big.Int, error) { + return _GnoToken.Contract.BalanceOf(&_GnoToken.CallOpts, account) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_GnoToken *GnoTokenCallerSession) BalanceOf(account common.Address) (*big.Int, error) { + return _GnoToken.Contract.BalanceOf(&_GnoToken.CallOpts, account) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_GnoToken *GnoTokenCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _GnoToken.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_GnoToken *GnoTokenSession) Decimals() (uint8, error) { + return _GnoToken.Contract.Decimals(&_GnoToken.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_GnoToken *GnoTokenCallerSession) Decimals() (uint8, error) { + return _GnoToken.Contract.Decimals(&_GnoToken.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_GnoToken *GnoTokenCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _GnoToken.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_GnoToken *GnoTokenSession) Name() (string, error) { + return _GnoToken.Contract.Name(&_GnoToken.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_GnoToken *GnoTokenCallerSession) Name() (string, error) { + return _GnoToken.Contract.Name(&_GnoToken.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_GnoToken *GnoTokenCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _GnoToken.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_GnoToken *GnoTokenSession) Paused() (bool, error) { + return _GnoToken.Contract.Paused(&_GnoToken.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_GnoToken *GnoTokenCallerSession) Paused() (bool, error) { + return _GnoToken.Contract.Paused(&_GnoToken.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_GnoToken *GnoTokenCaller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _GnoToken.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_GnoToken *GnoTokenSession) Symbol() (string, error) { + return _GnoToken.Contract.Symbol(&_GnoToken.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_GnoToken *GnoTokenCallerSession) Symbol() (string, error) { + return _GnoToken.Contract.Symbol(&_GnoToken.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_GnoToken *GnoTokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _GnoToken.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_GnoToken *GnoTokenSession) TotalSupply() (*big.Int, error) { + return _GnoToken.Contract.TotalSupply(&_GnoToken.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_GnoToken *GnoTokenCallerSession) TotalSupply() (*big.Int, error) { + return _GnoToken.Contract.TotalSupply(&_GnoToken.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 amount) returns(bool) +func (_GnoToken *GnoTokenTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _GnoToken.contract.Transact(opts, "approve", spender, amount) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 amount) returns(bool) +func (_GnoToken *GnoTokenSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _GnoToken.Contract.Approve(&_GnoToken.TransactOpts, spender, amount) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 amount) returns(bool) +func (_GnoToken *GnoTokenTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _GnoToken.Contract.Approve(&_GnoToken.TransactOpts, spender, amount) +} + +// Burn is a paid mutator transaction binding the contract method 0x9dc29fac. +// +// Solidity: function burn(address _from, uint256 _amount) returns() +func (_GnoToken *GnoTokenTransactor) Burn(opts *bind.TransactOpts, _from common.Address, _amount *big.Int) (*types.Transaction, error) { + return _GnoToken.contract.Transact(opts, "burn", _from, _amount) +} + +// Burn is a paid mutator transaction binding the contract method 0x9dc29fac. +// +// Solidity: function burn(address _from, uint256 _amount) returns() +func (_GnoToken *GnoTokenSession) Burn(_from common.Address, _amount *big.Int) (*types.Transaction, error) { + return _GnoToken.Contract.Burn(&_GnoToken.TransactOpts, _from, _amount) +} + +// Burn is a paid mutator transaction binding the contract method 0x9dc29fac. +// +// Solidity: function burn(address _from, uint256 _amount) returns() +func (_GnoToken *GnoTokenTransactorSession) Burn(_from common.Address, _amount *big.Int) (*types.Transaction, error) { + return _GnoToken.Contract.Burn(&_GnoToken.TransactOpts, _from, _amount) +} + +// ClaimTokens is a paid mutator transaction binding the contract method 0x69ffa08a. +// +// Solidity: function claimTokens(address _token, address _to) returns() +func (_GnoToken *GnoTokenTransactor) ClaimTokens(opts *bind.TransactOpts, _token common.Address, _to common.Address) (*types.Transaction, error) { + return _GnoToken.contract.Transact(opts, "claimTokens", _token, _to) +} + +// ClaimTokens is a paid mutator transaction binding the contract method 0x69ffa08a. +// +// Solidity: function claimTokens(address _token, address _to) returns() +func (_GnoToken *GnoTokenSession) ClaimTokens(_token common.Address, _to common.Address) (*types.Transaction, error) { + return _GnoToken.Contract.ClaimTokens(&_GnoToken.TransactOpts, _token, _to) +} + +// ClaimTokens is a paid mutator transaction binding the contract method 0x69ffa08a. +// +// Solidity: function claimTokens(address _token, address _to) returns() +func (_GnoToken *GnoTokenTransactorSession) ClaimTokens(_token common.Address, _to common.Address) (*types.Transaction, error) { + return _GnoToken.Contract.ClaimTokens(&_GnoToken.TransactOpts, _token, _to) +} + +// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. +// +// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) +func (_GnoToken *GnoTokenTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _GnoToken.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) +} + +// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. +// +// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) +func (_GnoToken *GnoTokenSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _GnoToken.Contract.DecreaseAllowance(&_GnoToken.TransactOpts, spender, subtractedValue) +} + +// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. +// +// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) +func (_GnoToken *GnoTokenTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _GnoToken.Contract.DecreaseAllowance(&_GnoToken.TransactOpts, spender, subtractedValue) +} + +// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. +// +// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) +func (_GnoToken *GnoTokenTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _GnoToken.contract.Transact(opts, "increaseAllowance", spender, addedValue) +} + +// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. +// +// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) +func (_GnoToken *GnoTokenSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _GnoToken.Contract.IncreaseAllowance(&_GnoToken.TransactOpts, spender, addedValue) +} + +// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. +// +// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) +func (_GnoToken *GnoTokenTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _GnoToken.Contract.IncreaseAllowance(&_GnoToken.TransactOpts, spender, addedValue) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address _to, uint256 _amount) returns() +func (_GnoToken *GnoTokenTransactor) Mint(opts *bind.TransactOpts, _to common.Address, _amount *big.Int) (*types.Transaction, error) { + return _GnoToken.contract.Transact(opts, "mint", _to, _amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address _to, uint256 _amount) returns() +func (_GnoToken *GnoTokenSession) Mint(_to common.Address, _amount *big.Int) (*types.Transaction, error) { + return _GnoToken.Contract.Mint(&_GnoToken.TransactOpts, _to, _amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address _to, uint256 _amount) returns() +func (_GnoToken *GnoTokenTransactorSession) Mint(_to common.Address, _amount *big.Int) (*types.Transaction, error) { + return _GnoToken.Contract.Mint(&_GnoToken.TransactOpts, _to, _amount) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_GnoToken *GnoTokenTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GnoToken.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_GnoToken *GnoTokenSession) Pause() (*types.Transaction, error) { + return _GnoToken.Contract.Pause(&_GnoToken.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_GnoToken *GnoTokenTransactorSession) Pause() (*types.Transaction, error) { + return _GnoToken.Contract.Pause(&_GnoToken.TransactOpts) +} + +// SetMinter is a paid mutator transaction binding the contract method 0xfca3b5aa. +// +// Solidity: function setMinter(address minter) returns() +func (_GnoToken *GnoTokenTransactor) SetMinter(opts *bind.TransactOpts, minter common.Address) (*types.Transaction, error) { + return _GnoToken.contract.Transact(opts, "setMinter", minter) +} + +// SetMinter is a paid mutator transaction binding the contract method 0xfca3b5aa. +// +// Solidity: function setMinter(address minter) returns() +func (_GnoToken *GnoTokenSession) SetMinter(minter common.Address) (*types.Transaction, error) { + return _GnoToken.Contract.SetMinter(&_GnoToken.TransactOpts, minter) +} + +// SetMinter is a paid mutator transaction binding the contract method 0xfca3b5aa. +// +// Solidity: function setMinter(address minter) returns() +func (_GnoToken *GnoTokenTransactorSession) SetMinter(minter common.Address) (*types.Transaction, error) { + return _GnoToken.Contract.SetMinter(&_GnoToken.TransactOpts, minter) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address recipient, uint256 amount) returns(bool) +func (_GnoToken *GnoTokenTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _GnoToken.contract.Transact(opts, "transfer", recipient, amount) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address recipient, uint256 amount) returns(bool) +func (_GnoToken *GnoTokenSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _GnoToken.Contract.Transfer(&_GnoToken.TransactOpts, recipient, amount) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address recipient, uint256 amount) returns(bool) +func (_GnoToken *GnoTokenTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _GnoToken.Contract.Transfer(&_GnoToken.TransactOpts, recipient, amount) +} + +// TransferAndCall is a paid mutator transaction binding the contract method 0x4000aea0. +// +// Solidity: function transferAndCall(address _to, uint256 _amount, bytes _data) returns() +func (_GnoToken *GnoTokenTransactor) TransferAndCall(opts *bind.TransactOpts, _to common.Address, _amount *big.Int, _data []byte) (*types.Transaction, error) { + return _GnoToken.contract.Transact(opts, "transferAndCall", _to, _amount, _data) +} + +// TransferAndCall is a paid mutator transaction binding the contract method 0x4000aea0. +// +// Solidity: function transferAndCall(address _to, uint256 _amount, bytes _data) returns() +func (_GnoToken *GnoTokenSession) TransferAndCall(_to common.Address, _amount *big.Int, _data []byte) (*types.Transaction, error) { + return _GnoToken.Contract.TransferAndCall(&_GnoToken.TransactOpts, _to, _amount, _data) +} + +// TransferAndCall is a paid mutator transaction binding the contract method 0x4000aea0. +// +// Solidity: function transferAndCall(address _to, uint256 _amount, bytes _data) returns() +func (_GnoToken *GnoTokenTransactorSession) TransferAndCall(_to common.Address, _amount *big.Int, _data []byte) (*types.Transaction, error) { + return _GnoToken.Contract.TransferAndCall(&_GnoToken.TransactOpts, _to, _amount, _data) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) +func (_GnoToken *GnoTokenTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _GnoToken.contract.Transact(opts, "transferFrom", sender, recipient, amount) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) +func (_GnoToken *GnoTokenSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _GnoToken.Contract.TransferFrom(&_GnoToken.TransactOpts, sender, recipient, amount) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) +func (_GnoToken *GnoTokenTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _GnoToken.Contract.TransferFrom(&_GnoToken.TransactOpts, sender, recipient, amount) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_GnoToken *GnoTokenTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GnoToken.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_GnoToken *GnoTokenSession) Unpause() (*types.Transaction, error) { + return _GnoToken.Contract.Unpause(&_GnoToken.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_GnoToken *GnoTokenTransactorSession) Unpause() (*types.Transaction, error) { + return _GnoToken.Contract.Unpause(&_GnoToken.TransactOpts) +} + +// GnoTokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the GnoToken contract. +type GnoTokenApprovalIterator struct { + Event *GnoTokenApproval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GnoTokenApprovalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GnoTokenApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GnoTokenApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GnoTokenApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GnoTokenApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GnoTokenApproval represents a Approval event raised by the GnoToken contract. +type GnoTokenApproval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_GnoToken *GnoTokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*GnoTokenApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _GnoToken.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &GnoTokenApprovalIterator{contract: _GnoToken.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_GnoToken *GnoTokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *GnoTokenApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _GnoToken.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GnoTokenApproval) + if err := _GnoToken.contract.UnpackLog(event, "Approval", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_GnoToken *GnoTokenFilterer) ParseApproval(log types.Log) (*GnoTokenApproval, error) { + event := new(GnoTokenApproval) + if err := _GnoToken.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GnoTokenPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the GnoToken contract. +type GnoTokenPausedIterator struct { + Event *GnoTokenPaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GnoTokenPausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GnoTokenPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GnoTokenPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GnoTokenPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GnoTokenPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GnoTokenPaused represents a Paused event raised by the GnoToken contract. +type GnoTokenPaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_GnoToken *GnoTokenFilterer) FilterPaused(opts *bind.FilterOpts) (*GnoTokenPausedIterator, error) { + + logs, sub, err := _GnoToken.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &GnoTokenPausedIterator{contract: _GnoToken.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_GnoToken *GnoTokenFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *GnoTokenPaused) (event.Subscription, error) { + + logs, sub, err := _GnoToken.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GnoTokenPaused) + if err := _GnoToken.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_GnoToken *GnoTokenFilterer) ParsePaused(log types.Log) (*GnoTokenPaused, error) { + event := new(GnoTokenPaused) + if err := _GnoToken.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GnoTokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the GnoToken contract. +type GnoTokenTransferIterator struct { + Event *GnoTokenTransfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GnoTokenTransferIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GnoTokenTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GnoTokenTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GnoTokenTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GnoTokenTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GnoTokenTransfer represents a Transfer event raised by the GnoToken contract. +type GnoTokenTransfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_GnoToken *GnoTokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*GnoTokenTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _GnoToken.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &GnoTokenTransferIterator{contract: _GnoToken.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_GnoToken *GnoTokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *GnoTokenTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _GnoToken.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GnoTokenTransfer) + if err := _GnoToken.contract.UnpackLog(event, "Transfer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_GnoToken *GnoTokenFilterer) ParseTransfer(log types.Log) (*GnoTokenTransfer, error) { + event := new(GnoTokenTransfer) + if err := _GnoToken.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GnoTokenUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the GnoToken contract. +type GnoTokenUnpausedIterator struct { + Event *GnoTokenUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GnoTokenUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GnoTokenUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GnoTokenUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GnoTokenUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GnoTokenUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GnoTokenUnpaused represents a Unpaused event raised by the GnoToken contract. +type GnoTokenUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_GnoToken *GnoTokenFilterer) FilterUnpaused(opts *bind.FilterOpts) (*GnoTokenUnpausedIterator, error) { + + logs, sub, err := _GnoToken.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &GnoTokenUnpausedIterator{contract: _GnoToken.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_GnoToken *GnoTokenFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *GnoTokenUnpaused) (event.Subscription, error) { + + logs, sub, err := _GnoToken.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GnoTokenUnpaused) + if err := _GnoToken.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_GnoToken *GnoTokenFilterer) ParseUnpaused(log types.Log) (*GnoTokenUnpaused, error) { + event := new(GnoTokenUnpaused) + if err := _GnoToken.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/simulators/ethereum/engine/main.go b/simulators/ethereum/engine/main.go index 41a5387b0d..cf4734c42c 100644 --- a/simulators/ethereum/engine/main.go +++ b/simulators/ethereum/engine/main.go @@ -97,14 +97,6 @@ func getTimestamp(spec test.SpecInterface) int64 { // Calculate the start of the next 2 minutes nextMinute := now.Truncate(time.Minute).Add(time.Duration(preShapellaBlock) * 3 * time.Minute).Add(time.Minute) - // Create a time.Time value from the int64 timestamp - //tUnix := time.Unix(nex, 0) - - // Format the time in a human-readable way - formattedTime := nextMinute.Format("2006-01-02 15:04:05") - fmt.Sprintf("Formatted timestamp: %v\n", formattedTime) - - // Get the Unix timestamp of the next 2 minutes return nextMinute.Unix() } diff --git a/simulators/ethereum/engine/suites/withdrawals/tests.go b/simulators/ethereum/engine/suites/withdrawals/tests.go index 1b1155eb04..52a6811f1c 100644 --- a/simulators/ethereum/engine/suites/withdrawals/tests.go +++ b/simulators/ethereum/engine/suites/withdrawals/tests.go @@ -40,26 +40,9 @@ var ( balances = make(map[int64]map[common.Address]big.Int, 0) ) -// Withdrawals base spec: -// Specifies a simple withdrawals test where the withdrawals fork can happen -// on genesis or afterwards. -type WithdrawalsBaseSpec struct { - test.Spec - TimeIncrements uint64 // Timestamp increments per block throughout the test - WithdrawalsForkHeight uint64 // Withdrawals activation fork height - WithdrawalsBlockCount uint64 // Number of blocks on and after withdrawals fork activation - WithdrawalsPerBlock uint64 // Number of withdrawals per block - WithdrawableAccountCount uint64 // Number of accounts to withdraw to (round-robin) - WithdrawalsHistory WithdrawalsHistory // Internal withdrawals history that keeps track of all withdrawals - WithdrawAmounts []uint64 // Amounts of withdrawn wei on each withdrawal (round-robin) - TransactionsPerBlock *big.Int // Amount of test transactions to include in withdrawal blocks - TestCorrupedHashPayloads bool // Send a valid payload with corrupted hash - SkipBaseVerifications bool // For code reuse of the base spec procedure -} - // Execution specification reference: // https://github.com/ethereum/execution-apis/blob/main/src/engine/specification.md -// + // List of all withdrawals tests var Tests = []test.SpecInterface{ &WithdrawalsBaseSpec{ @@ -892,6 +875,23 @@ func (wh WithdrawalsHistory) Copy() WithdrawalsHistory { return result } +// Withdrawals base spec: +// Specifies a simple withdrawals test where the withdrawals fork can happen +// on genesis or afterwards. +type WithdrawalsBaseSpec struct { + test.Spec + TimeIncrements uint64 // Timestamp increments per block throughout the test + WithdrawalsForkHeight uint64 // Withdrawals activation fork height + WithdrawalsBlockCount uint64 // Number of blocks on and after withdrawals fork activation + WithdrawalsPerBlock uint64 // Number of withdrawals per block + WithdrawableAccountCount uint64 // Number of accounts to withdraw to (round-robin) + WithdrawalsHistory WithdrawalsHistory // Internal withdrawals history that keeps track of all withdrawals + WithdrawAmounts []uint64 // Amounts of withdrawn wei on each withdrawal (round-robin) + TransactionsPerBlock *big.Int // Amount of test transactions to include in withdrawal blocks + TestCorrupedHashPayloads bool // Send a valid payload with corrupted hash + SkipBaseVerifications bool // For code reuse of the base spec procedure +} + func (ws *WithdrawalsBaseSpec) GetPreShapellaBlockCount() int { return int(ws.WithdrawalsForkHeight) } @@ -1096,10 +1096,7 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { // Create a time.Time value from the int64 timestamp tUnix := time.Unix(t.CLMock.ShanghaiTimestamp.Int64(), 0) - // Format the time in a human-readable way - formattedTime := tUnix.Format("2006-01-02 15:04:05") - // Print shangai timestamp - t.Logf("Shanghai timestamp: %v", formattedTime) + // Wait ttd t.CLMock.WaitForTTD() r := t.TestEngine.TestBlockByNumber(nil) @@ -1188,6 +1185,7 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { }, }) + // Wait for shangai if time.Now().Unix() < int64(*t.Genesis.Config().ShanghaiTime) { tUnix = time.Unix(t.CLMock.ShanghaiTimestamp.Int64(), 0) durationUntilFuture := time.Until(tUnix) @@ -1196,12 +1194,13 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { } } - // Produce requested post-shanghai blocks - // (At least 1 block will be produced after this procedure ends). var ( - startAccount = ws.GetWithdrawalsStartAccount() - nextIndex = uint64(0) + //startAccount = ws.GetWithdrawalsStartAccount() + //nextIndex = uint64(0) + //addressToSend = common.HexToAddress("0x0000000000000000000000babe0babe000000000") ) + + // start client client := getClient(t) if client == nil { t.Fatalf("Couldn't connect to client") @@ -1209,118 +1208,124 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { } defer client.Close() - n := ws.WithdrawalsBlockCount - for n > 0 { - + // Check balance of address before send any amount of tokens + //latestBalance, err := getBalanceOfToken(client, globals.GnoVaultAccountAddress, big.NewInt(int64(t.CLMock.LatestExecutedPayload.Number))) + //if err != nil { + // t.Fatalf("FAIL (%s): Error trying to get balance of token: %v, address: %v", t.TestName, err, globals.GnoVaultAccountAddress.Hex()) + //} + //t.Logf("First Balance %v", latestBalance.Uint64()) + // + // Produce requested post-shanghai blocks + // (At least 1 block will be produced after this procedure ends). + //n := ws.WithdrawalsBlockCount + //for n > 0 { + for i := 0; i < int(ws.WithdrawalsBlockCount); i++ { t.CLMock.ProduceSingleBlock(clmock.BlockProcessCallbacks{ - OnPayloadProducerSelected: func() { - - // Send some withdrawals - t.CLMock.NextWithdrawals, nextIndex = ws.GenerateWithdrawalsForBlock(nextIndex, startAccount) - ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber] = t.CLMock.NextWithdrawals - // Send some transactions - for i := uint64(0); i < ws.GetTransactionCountPerPayload(); i++ { - var destAddr = TX_CONTRACT_ADDRESSES[int(i)%len(TX_CONTRACT_ADDRESSES)] - - _, err := helper.SendNextTransaction( - t.TestContext, - t.CLMock.NextBlockProducer, - &helper.BaseTransactionCreator{ - Recipient: &destAddr, - Amount: common.Big1, - Payload: nil, - TxType: t.TestTransactionType, - GasLimit: t.Genesis.GasLimit(), - ChainID: t.Genesis.Config().ChainID, - }, - ) - - if err != nil { - t.Fatalf("FAIL (%s): Error trying to send transaction: %v", t.TestName, err) - } - } - - }, - OnGetPayload: func() { - if !ws.SkipBaseVerifications { - - // Verify the list of withdrawals returned on the payload built - // completely matches the list provided in the - // engine_forkchoiceUpdatedV2 method call - if sentList, ok := ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber]; !ok { - panic("withdrawals sent list was not saved") - } else { - if len(sentList) != len(t.CLMock.LatestPayloadBuilt.Withdrawals) { - t.Fatalf("FAIL (%s): Incorrect list of withdrawals on built payload: want=%d, got=%d", t.TestName, len(sentList), len(t.CLMock.LatestPayloadBuilt.Withdrawals)) - } - for i := 0; i < len(sentList); i++ { - if err := test.CompareWithdrawal(sentList[i], t.CLMock.LatestPayloadBuilt.Withdrawals[i]); err != nil { - t.Fatalf("FAIL (%s): Incorrect withdrawal on index %d: %v", t.TestName, i, err) - } - } - - } - } - }, + //OnPayloadProducerSelected: func() { + // + // // Send some withdrawals + // t.CLMock.NextWithdrawals, nextIndex = ws.GenerateWithdrawalsForBlock(nextIndex, startAccount) + // ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber] = t.CLMock.NextWithdrawals + // // Send some transactions + // for i := uint64(0); i < ws.GetTransactionCountPerPayload(); i++ { + // var destAddr = TX_CONTRACT_ADDRESSES[int(i)%len(TX_CONTRACT_ADDRESSES)] + // + // _, err := helper.SendNextTransaction( + // t.TestContext, + // t.CLMock.NextBlockProducer, + // &helper.BaseTransactionCreator{ + // Recipient: &destAddr, + // Amount: common.Big1, + // Payload: nil, + // TxType: t.TestTransactionType, + // GasLimit: t.Genesis.GasLimit(), + // ChainID: t.Genesis.Config().ChainID, + // }, + // ) + // if err != nil { + // t.Fatalf("FAIL (%s): Error trying to send transaction: %v", t.TestName, err) + // } + // } + //}, + //OnGetPayload: func() { + // if !ws.SkipBaseVerifications { + // + // // Verify the list of withdrawals returned on the payload built + // // completely matches the list provided in the + // // engine_forkchoiceUpdatedV2 method call + // if sentList, ok := ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber]; !ok { + // panic("withdrawals sent list was not saved") + // } else { + // if len(sentList) != len(t.CLMock.LatestPayloadBuilt.Withdrawals) { + // t.Fatalf("FAIL (%s): Incorrect list of withdrawals on built payload: want=%d, got=%d", t.TestName, len(sentList), len(t.CLMock.LatestPayloadBuilt.Withdrawals)) + // } + // for i := 0; i < len(sentList); i++ { + // if err := test.CompareWithdrawal(sentList[i], t.CLMock.LatestPayloadBuilt.Withdrawals[i]); err != nil { + // t.Fatalf("FAIL (%s): Incorrect withdrawal on index %d: %v", t.TestName, i, err) + // } + // } + // + // } + // } + //}, }) - t.CLMock.ProduceSingleBlock(clmock.BlockProcessCallbacks{ - OnPayloadProducerSelected: func() { - // Get ExecuteWithdrawalsClaims - addresses := make([]common.Address, 0) - for _, w := range ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber-1] { - addresses = append(addresses, w.Address) - } - // Send claim transaction - //claims, err := libgno.ExecuteWithdrawalsClaims(addresses) - //if err != nil { - // return - //} - err := claimTokens(client, addresses, t.Genesis.Config().ChainID) - if err != nil { - t.Fatalf("Error while claiming tokens, %v", err) - } + println("processed block 1") - //_, err = helper.SendNextTransaction( - // t.TestContext, - // t.CLMock.NextBlockProducer, - // &helper.BaseTransactionCreator{ - // Recipient: &libgno.WithdrawalsContractAddress, - // Amount: common.Big1, - // Payload: claims, - // TxType: t.TestTransactionType, - // GasLimit: t.Genesis.GasLimit(), - // ChainID: t.Genesis.Config().ChainID, - // }, - //) - // - //if err != nil { - // t.Fatalf("FAIL (%s): Error trying to send transaction: %v", t.TestName, err) - //} - // - }, + t.CLMock.ProduceSingleBlock(clmock.BlockProcessCallbacks{ + //OnPayloadProducerSelected: func() { + // // Get ExecuteWithdrawalsClaims + // addresses := make([]common.Address, 0) + // for _, w := range ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber-1] { + // addresses = append(addresses, w.Address) + // } + // // Send claim transaction + // claims, err := libgno.ExecuteWithdrawalsClaims(addresses) + // if err != nil { + // t.Fatalf("Couldn't claim tokens") + // } + // _, err = helper.SendNextTransactionWithAccount( + // t.TestContext, + // t.CLMock.NextBlockProducer, + // &helper.BaseTransactionCreator{ + // Recipient: &libgno.WithdrawalsContractAddress, + // Amount: common.Big0, + // Payload: claims, + // PrivateKey: globals.GnoVaultVaultKey, + // TxType: t.TestTransactionType, + // GasLimit: t.Genesis.GasLimit(), + // ChainID: t.Genesis.Config().ChainID, + // }, + // globals.GnoVaultAccountAddress, + // ) + // if err != nil { + // t.Fatalf("FAIL (%s): Error trying to send transaction: %v", t.TestName, err) + // } + //}, }) + println("processed block 2") t.CLMock.ProduceSingleBlock(clmock.BlockProcessCallbacks{ - OnForkchoiceBroadcast: func() { - if !ws.SkipBaseVerifications { - for _, addr := range ws.WithdrawalsHistory.GetAddressesWithdrawnOnBlock(t.CLMock.LatestExecutedPayload.Number - 2) { - //Test balance at `latest`, which should have the - //withdrawal applied. - latestBalance, err := getBalanceOfToken(client, addr, big.NewInt(int64(t.CLMock.LatestExecutedPayload.Number))) - if err != nil { - t.Fatalf("FAIL (%s): Error trying to get balance of token: %v, address: %v", t.TestName, err, addr.Hex()) - } - newLatestBalance := latestBalance.Mul(latestBalance, big.NewInt(32)) - expectBalanceEqual := ws.WithdrawalsHistory.GetExpectedAccountBalance(addr, t.CLMock.LatestExecutedPayload.Number-2) - - if newLatestBalance.Cmp(expectBalanceEqual) != 0 { - t.Fatalf("FAIL (%s): Incorrect balance on account %s after withdrawals applied: want=%d, got=%d", t.TestName, addr, expectBalanceEqual, latestBalance) - } - } - - } - }, + //OnForkchoiceBroadcast: func() { + // if !ws.SkipBaseVerifications { + // for _, addr := range ws.WithdrawalsHistory.GetAddressesWithdrawnOnBlock(t.CLMock.LatestExecutedPayload.Number - 2) { + // //Test balance at `latest`, which should have the + // //withdrawal applied. + // latestBalance, err := getBalanceOfToken(client, addr, big.NewInt(int64(t.CLMock.LatestExecutedPayload.Number))) + // if err != nil { + // t.Fatalf("FAIL (%s): Error trying to get balance of token: %v, address: %v", t.TestName, err, addr.Hex()) + // } + // newLatestBalance := latestBalance.Mul(latestBalance, big.NewInt(32)) + // expectBalanceEqual := ws.WithdrawalsHistory.GetExpectedAccountBalance(addr, t.CLMock.LatestExecutedPayload.Number-2) + // + // if newLatestBalance.Cmp(expectBalanceEqual) != 0 { + // t.Fatalf("FAIL (%s): Incorrect balance on account %s after withdrawals applied: want=%d, got=%d", t.TestName, addr, expectBalanceEqual, latestBalance) + // } + // } + // + // } + //}, }) - n-- + println("processed block 3") + //n-- } // Iterate over balance history of withdrawn accounts using RPC and @@ -1403,6 +1408,52 @@ func claimTokens(client *ethclient.Client, addresses []common.Address, chainID * return nil } +func transferTokens(client *ethclient.Client, address common.Address, amount *big.Int, chainID *big.Int) (common.Hash, error) { + //privateKey, err := crypto.HexToECDSA("fad9c8855b740a0b7ed4c221dbad0f33a83a49cad6b3fe8d5817ac83d38b6a19") + //if err != nil { + // + //} + //publicKey := privateKey.Public() + //publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) + //if !ok { + // return errors.New("error casting public key to ECDSA") + //} + // + //fromAddress := crypto.PubkeyToAddress(*publicKeyECDSA) + nonce, err := client.PendingNonceAt(context.Background(), globals.VaultAccountAddress) + if err != nil { + return common.Hash{}, err + } + + gasPrice, err := client.SuggestGasPrice(context.Background()) + if err != nil { + return common.Hash{}, err + } + + auth, err := bind.NewKeyedTransactorWithChainID(globals.GnoVaultVaultKey, chainID) + if err != nil { + return common.Hash{}, err + } + //auth.From = globals.VaultAccountAddress + auth.Nonce = big.NewInt(int64(nonce)) + //auth.Value = big.NewInt(0) // in wei + //auth.GasLimit = uint64(300000) // in units + auth.GasPrice = gasPrice.Add(gasPrice, big.NewInt(1000)) + + //address := common.HexToAddress("0x147B8eb97fD247D06C4006D269c90C1908Fb5D54") + instance, err := libgno.NewGnoToken(libgno.GNOTokenAddress, client) + if err != nil { + return common.Hash{}, err + } + + tx, err := instance.Transfer(auth, address, amount) + if err != nil { + return common.Hash{}, err + } + + return tx.Hash(), nil +} + func getClient(t *test.Env) *ethclient.Client { url, _ := t.CLMock.EngineClients[0].Url() client, err := ethclient.Dial(url) From 35d9400f06c1a5e4ae8c36b88e9b135c63968788 Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Thu, 29 Jun 2023 23:52:03 +0300 Subject: [PATCH 10/27] fix: fixed contracts WARM_COINBASE && PUSH0 pre/post shapella checks --- simulators/ethereum/engine/main.go | 2 +- .../ethereum/engine/suites/withdrawals/tests.go | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/simulators/ethereum/engine/main.go b/simulators/ethereum/engine/main.go index aa7cb10730..8cf2d0ebe8 100644 --- a/simulators/ethereum/engine/main.go +++ b/simulators/ethereum/engine/main.go @@ -94,7 +94,7 @@ func getTimestamp(spec test.SpecInterface) int64 { preShapellaBlock = 1 } - nextMinute := now.Truncate(time.Minute).Add(time.Duration(preShapellaBlock) * 1 * time.Minute).Add(time.Minute) + nextMinute := now.Truncate(time.Minute).Add(time.Duration(preShapellaBlock) * 3 * time.Minute).Add(time.Minute) // Create a time.Time value from the int64 timestamp //tUnix := time.Unix(nex, 0) diff --git a/simulators/ethereum/engine/suites/withdrawals/tests.go b/simulators/ethereum/engine/suites/withdrawals/tests.go index 4facf0c59c..3154d3a22a 100644 --- a/simulators/ethereum/engine/suites/withdrawals/tests.go +++ b/simulators/ethereum/engine/suites/withdrawals/tests.go @@ -986,9 +986,9 @@ func (ws *WithdrawalsBaseSpec) GetGenesis(base string) helper.Genesis { 0x90, // SWAP1 0x03, // SUB // TODO: - 0x60, // PUSH1(0x00) - 0x00, - // 0x43, // NUMBER + // 0x60, // PUSH1(0x00) + // 0x00, + 0x43, // NUMBER 0x55, // SSTORE } warmCoinbaseAcc := helper.NewAccount() @@ -1018,9 +1018,8 @@ func (ws *WithdrawalsBaseSpec) VerifyContractsStorage(t *test.Env) { // Assume that forkchoice updated has been already sent latestPayloadNumber := t.CLMock.LatestExecutedPayload.Number latestPayloadNumberBig := big.NewInt(int64(latestPayloadNumber)) - s := big.NewInt(0) - r := t.TestEngine.TestStorageAt(WARM_COINBASE_ADDRESS, common.BigToHash(s), latestPayloadNumberBig) + r := t.TestEngine.TestStorageAt(WARM_COINBASE_ADDRESS, common.BigToHash(latestPayloadNumberBig), latestPayloadNumberBig) p := t.TestEngine.TestStorageAt(PUSH0_ADDRESS, common.Hash{}, latestPayloadNumberBig) if latestPayloadNumber >= ws.WithdrawalsForkHeight { // Shanghai @@ -1128,8 +1127,9 @@ func (ws *WithdrawalsBaseSpec) sendPayloadTransactions(t *test.Env) { Amount: common.Big1, Payload: nil, TxType: t.TestTransactionType, - GasLimit: t.Genesis.GasLimit(), - ChainID: t.Genesis.Config().ChainID, + // TODO: figure out why contract storage check fails on block 2 with Genesis.GasLimit() + GasLimit: 75000, + ChainID: t.Genesis.Config().ChainID, }, ) From 83eeec4ded636c3674421e097618d8e8f3a89ffd Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Fri, 30 Jun 2023 16:13:21 +0300 Subject: [PATCH 11/27] docs: contracts bytecode explanations --- .../engine/suites/withdrawals/tests.go | 89 +++++++++++-------- 1 file changed, 50 insertions(+), 39 deletions(-) diff --git a/simulators/ethereum/engine/suites/withdrawals/tests.go b/simulators/ethereum/engine/suites/withdrawals/tests.go index 3154d3a22a..80bcbb83b1 100644 --- a/simulators/ethereum/engine/suites/withdrawals/tests.go +++ b/simulators/ethereum/engine/suites/withdrawals/tests.go @@ -31,8 +31,55 @@ var ( InvalidParamsError = -32602 MAX_INITCODE_SIZE = 49152 + /* + Warm coinbase contract needs to check if EIP-3651 applied after shapella + https://eips.ethereum.org/EIPS/eip-3651 + + Contract bytecode saves coinbase access cost to the slot number of current block + i.e. if current block number is 5 ==> coinbase access cost saved to slot 5 etc + */ WARM_COINBASE_ADDRESS = common.HexToAddress("0x0101010101010101010101010101010101010101") - PUSH0_ADDRESS = common.HexToAddress("0x0202020202020202020202020202020202020202") + warmCoinbaseCode = []byte{ + 0x5A, // GAS + 0x60, // PUSH1(0x00) + 0x00, + 0x60, // PUSH1(0x00) + 0x00, + 0x60, // PUSH1(0x00) + 0x00, + 0x60, // PUSH1(0x00) + 0x00, + 0x60, // PUSH1(0x00) + 0x00, + 0x41, // COINBASE + 0x60, // PUSH1(0xFF) + 0xFF, + 0xF1, // CALL + 0x5A, // GAS + 0x90, // SWAP1 + 0x50, // POP - Call result + 0x90, // SWAP1 + 0x03, // SUB + 0x60, // PUSH1(0x16) - GAS + PUSH * 6 + COINBASE + 0x16, + 0x90, // SWAP1 + 0x03, // SUB + 0x43, // NUMBER + 0x55, // SSTORE + } + /* + Warm coinbase contract needs to check if EIP-3855 applied after shapella + https://eips.ethereum.org/EIPS/eip-3855 + + Contract bytecode reverts tx before the shapells (because PUSH0 opcode does not exists) + After shapella hardfork it saves current block number to 0 slot + */ + PUSH0_ADDRESS = common.HexToAddress("0x0202020202020202020202020202020202020202") + push0Code = []byte{ + 0x43, // NUMBER + 0x5F, // PUSH0 + 0x55, // SSTORE + } TX_CONTRACT_ADDRESSES = []common.Address{ WARM_COINBASE_ADDRESS, @@ -959,38 +1006,7 @@ func (ws *WithdrawalsBaseSpec) GetGenesisTest(base string) string { func (ws *WithdrawalsBaseSpec) GetGenesis(base string) helper.Genesis { genesis := ws.Spec.GetGenesis(base) - // Add accounts that use the coinbase (EIP-3651) - warmCoinbaseCode := []byte{ - 0x5A, // GAS - 0x60, // PUSH1(0x00) - 0x00, - 0x60, // PUSH1(0x00) - 0x00, - 0x60, // PUSH1(0x00) - 0x00, - 0x60, // PUSH1(0x00) - 0x00, - 0x60, // PUSH1(0x00) - 0x00, - 0x41, // COINBASE - 0x60, // PUSH1(0xFF) - 0xFF, - 0xF1, // CALL - 0x5A, // GAS - 0x90, // SWAP1 - 0x50, // POP - Call result - 0x90, // SWAP1 - 0x03, // SUB - 0x60, // PUSH1(0x16) - GAS + PUSH * 6 + COINBASE - 0x16, - 0x90, // SWAP1 - 0x03, // SUB - // TODO: - // 0x60, // PUSH1(0x00) - // 0x00, - 0x43, // NUMBER - 0x55, // SSTORE - } + warmCoinbaseAcc := helper.NewAccount() push0Acc := helper.NewAccount() @@ -998,12 +1014,7 @@ func (ws *WithdrawalsBaseSpec) GetGenesis(base string) helper.Genesis { warmCoinbaseAcc.SetCode(warmCoinbaseCode) genesis.AllocGenesis(WARM_COINBASE_ADDRESS, warmCoinbaseAcc) - // Add accounts that use the PUSH0 (EIP-3855) - push0Code := []byte{ - 0x43, // NUMBER - 0x5F, // PUSH0 - 0x55, // SSTORE - } + push0Acc.SetBalance(common.Big0) push0Acc.SetCode(push0Code) From 4f2e47535484b7918ca0f62846b3f41ecee3d373 Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Fri, 30 Jun 2023 16:35:40 +0300 Subject: [PATCH 12/27] feat(helper:account): add getters --- simulators/ethereum/engine/helper/core.go | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/simulators/ethereum/engine/helper/core.go b/simulators/ethereum/engine/helper/core.go index f2a968a04b..b32d900537 100644 --- a/simulators/ethereum/engine/helper/core.go +++ b/simulators/ethereum/engine/helper/core.go @@ -85,14 +85,47 @@ func NewAccount() Account { return make(Account, 0) } +// GetCode returns theaccount balance if it was set, +// otherwise returns common.Big0 +func (a Account) GetBalance() *big.Int { + hexBalance, ok := a["balance"] + if !ok { + return common.Big0 + } + hexStr := hexBalance.(string) + balance := common.Big0 + _ = balance.FillBytes(common.Hex2Bytes(hexStr)) + return balance +} + func (a Account) SetBalance(balance *big.Int) { a["balance"] = common.BigToHash(balance) } +// GetCode returns the hex representation of code if it was set, +// otherwise returns "" +func (a Account) GetCode() string { + code, ok := a["code"] + if !ok { + return "" + } + return fmt.Sprintf("%x", code.(string)) +} + func (a Account) SetCode(code []byte) { a["code"] = common.Bytes2Hex(code) } +// GetConstructor returns the hex representation of constructor if it was set, +// otherwise returns "" +func (a Account) GetConstructor() string { + constructor, ok := a["constructor"] + if !ok { + return "" + } + return fmt.Sprintf("%x", constructor.(string)) +} + func (a Account) SetConstructor(constructor []byte) { a["constructor"] = common.Bytes2Hex(constructor) } From a2cc34784c168abb96e67965d8fbeda3df31cd59 Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Fri, 30 Jun 2023 17:00:54 +0300 Subject: [PATCH 13/27] chore: push0 name typo in docstring --- .../engine/suites/withdrawals/tests.go | 93 +++++++++---------- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/simulators/ethereum/engine/suites/withdrawals/tests.go b/simulators/ethereum/engine/suites/withdrawals/tests.go index 80bcbb83b1..41b29d41ef 100644 --- a/simulators/ethereum/engine/suites/withdrawals/tests.go +++ b/simulators/ethereum/engine/suites/withdrawals/tests.go @@ -68,7 +68,7 @@ var ( 0x55, // SSTORE } /* - Warm coinbase contract needs to check if EIP-3855 applied after shapella + PUSH0 contract needs to check if EIP-3855 applied after shapella https://eips.ethereum.org/EIPS/eip-3855 Contract bytecode reverts tx before the shapells (because PUSH0 opcode does not exists) @@ -110,32 +110,31 @@ type WithdrawalsBaseSpec struct { // // List of all withdrawals tests var Tests = []test.SpecInterface{ - //&WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "Withdrawals Fork On Genesis", - // About: ` - // Tests the withdrawals fork happening on block 5 (e.g. on a - // testnet). - // `, - // }, - // WithdrawalsForkHeight: 1, //TODO - // WithdrawalsBlockCount: 2, // Genesis is not a withdrawals block - // WithdrawalsPerBlock: 16, - // TimeIncrements: 5, - //}, - // - //&WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "Withdrawals Fork on Block 1", - // About: ` - // Tests the withdrawals fork happening directly after genesis. - // `, - // }, - // WithdrawalsForkHeight: 1, // Only Genesis is Pre-Withdrawals - // WithdrawalsBlockCount: 1, - // WithdrawalsPerBlock: 16, - //}, - //// TODO + // &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdrawals Fork on Block 1", + // About: ` + // Tests the withdrawals fork happening directly after genesis. + // `, + // }, + // WithdrawalsForkHeight: 1, // Only Genesis is Pre-Withdrawals + // WithdrawalsBlockCount: 1, + // WithdrawalsPerBlock: 16, + // TimeIncrements: 5, + // }, + // &WithdrawalsBaseSpec{ + // Spec: test.Spec{ + // Name: "Withdrawals Fork On Genesis", + // About: ` + // Tests the withdrawals fork happening directly after genesis. + // Produce 2 blocks with withdrawals after the fork. + // `, + // }, + // WithdrawalsForkHeight: 1, + // WithdrawalsBlockCount: 2, // Genesis is not a withdrawals block + // WithdrawalsPerBlock: 16, + // TimeIncrements: 5, + // }, &WithdrawalsBaseSpec{ Spec: test.Spec{ Name: "Withdrawals Fork on Block 5", @@ -1305,26 +1304,26 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { } }, OnNewPayloadBroadcast: func() { - //if !ws.SkipBaseVerifications { - // for _, addr := range ws.WithdrawalsHistory.GetAddressesWithdrawnOnBlock(t.CLMock.LatestExecutedPayload.Number) { - // // Test balance at `latest`, which should not yet have the - // // withdrawal applied. - // expectedAccountBalance := ws.WithdrawalsHistory.GetExpectedAccountBalance( - // addr, - // t.CLMock.LatestExecutedPayload.Number-1) - // r := t.TestEngine.TestBalanceAt(addr, nil) - // r.ExpectationDescription = fmt.Sprintf(` - // Requested balance for account %s on "latest" block - // after engine_newPayloadV2, expecting balance to be equal - // to value on previous block (%d), since the new payload - // has not yet been applied. - // `, - // addr, - // t.CLMock.LatestExecutedPayload.Number-1, - // ) - // r.ExpectBalanceEqual(expectedAccountBalance) - // } - //} + if !ws.SkipBaseVerifications { + for _, addr := range ws.WithdrawalsHistory.GetAddressesWithdrawnOnBlock(t.CLMock.LatestExecutedPayload.Number) { + // Test balance at `latest`, which should not yet have the + // withdrawal applied. + expectedAccountBalance := ws.WithdrawalsHistory.GetExpectedAccountBalance( + addr, + t.CLMock.LatestExecutedPayload.Number-1) + r := t.TestEngine.TestBalanceAt(addr, nil) + r.ExpectationDescription = fmt.Sprintf(` + Requested balance for account %s on "latest" block + after engine_newPayloadV2, expecting balance to be equal + to value on previous block (%d), since the new payload + has not yet been applied. + `, + addr, + t.CLMock.LatestExecutedPayload.Number-1, + ) + r.ExpectBalanceEqual(expectedAccountBalance) + } + } }, OnForkchoiceBroadcast: func() { From 0dbe6333cb7138bfbb1474d9d7f4f6bc7fcaeffb Mon Sep 17 00:00:00 2001 From: Marcos Antonio Maceo Reyes Date: Fri, 30 Jun 2023 10:42:37 -0400 Subject: [PATCH 14/27] [debug] breaking nethermind node --- simulators/ethereum/engine/suites/withdrawals/tests.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simulators/ethereum/engine/suites/withdrawals/tests.go b/simulators/ethereum/engine/suites/withdrawals/tests.go index 8cac227edb..b55d5d5f70 100644 --- a/simulators/ethereum/engine/suites/withdrawals/tests.go +++ b/simulators/ethereum/engine/suites/withdrawals/tests.go @@ -99,8 +99,8 @@ var Tests = []test.SpecInterface{ Tests the withdrawals fork happening on block 1, Block 0 is for Aura. `, }, - WithdrawalsForkHeight: 1, //TODO - WithdrawalsBlockCount: 2, // Genesis is not a withdrawals block + WithdrawalsForkHeight: 1, //TODO + WithdrawalsBlockCount: 10, // Genesis is not a withdrawals block WithdrawalsPerBlock: 16, TimeIncrements: 5, }, From 692f4f918c3a3e85a9e9eb288b3b9d500a212a77 Mon Sep 17 00:00:00 2001 From: Marcos Antonio Maceo Reyes Date: Fri, 30 Jun 2023 12:12:30 -0400 Subject: [PATCH 15/27] [feat] clean up base tests --- .../engine/suites/withdrawals/tests.go | 303 +++++++++--------- 1 file changed, 151 insertions(+), 152 deletions(-) diff --git a/simulators/ethereum/engine/suites/withdrawals/tests.go b/simulators/ethereum/engine/suites/withdrawals/tests.go index b55d5d5f70..3295887572 100644 --- a/simulators/ethereum/engine/suites/withdrawals/tests.go +++ b/simulators/ethereum/engine/suites/withdrawals/tests.go @@ -3,6 +3,7 @@ package suite_withdrawals import ( "context" + "encoding/json" "fmt" "math/big" "time" @@ -99,8 +100,8 @@ var Tests = []test.SpecInterface{ Tests the withdrawals fork happening on block 1, Block 0 is for Aura. `, }, - WithdrawalsForkHeight: 1, //TODO - WithdrawalsBlockCount: 10, // Genesis is not a withdrawals block + WithdrawalsForkHeight: 1, //TODO + WithdrawalsBlockCount: 1, // Genesis is not a withdrawals block WithdrawalsPerBlock: 16, TimeIncrements: 5, }, @@ -1267,9 +1268,9 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { } var ( - //startAccount = ws.GetWithdrawalsStartAccount() - //nextIndex = uint64(0) - //addressToSend = common.HexToAddress("0x0000000000000000000000babe0babe000000000") + startAccount = ws.GetWithdrawalsStartAccount() + nextIndex = uint64(0) + //addressToSend = common.HexToAddress("0x0000000000000000000000babe0babe000000000") ) // start client @@ -1280,156 +1281,147 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { } defer client.Close() - // Check balance of address before send any amount of tokens - //latestBalance, err := getBalanceOfToken(client, globals.GnoVaultAccountAddress, big.NewInt(int64(t.CLMock.LatestExecutedPayload.Number))) - //if err != nil { - // t.Fatalf("FAIL (%s): Error trying to get balance of token: %v, address: %v", t.TestName, err, globals.GnoVaultAccountAddress.Hex()) - //} - //t.Logf("First Balance %v", latestBalance.Uint64()) - // // Produce requested post-shanghai blocks - // (At least 1 block will be produced after this procedure ends). - //n := ws.WithdrawalsBlockCount - //for n > 0 { + // (At least 3 block will be produced after this procedure ends). + // Since we implemented a pull strategy for withdrawals, we needed to + // process 3 blocks: + // 1. Send some withdrawals and transactions + // 2. Check withdrawable amount, claim tokens and check balance is as expected + // 3. for i := 0; i < int(ws.WithdrawalsBlockCount); i++ { t.CLMock.ProduceSingleBlock(clmock.BlockProcessCallbacks{ - //OnPayloadProducerSelected: func() { - // - // // Send some withdrawals - // t.CLMock.NextWithdrawals, nextIndex = ws.GenerateWithdrawalsForBlock(nextIndex, startAccount) - // ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber] = t.CLMock.NextWithdrawals - // // Send some transactions - // for i := uint64(0); i < ws.GetTransactionCountPerPayload(); i++ { - // var destAddr = TX_CONTRACT_ADDRESSES[int(i)%len(TX_CONTRACT_ADDRESSES)] - // - // _, err := helper.SendNextTransaction( - // t.TestContext, - // t.CLMock.NextBlockProducer, - // &helper.BaseTransactionCreator{ - // Recipient: &destAddr, - // Amount: common.Big1, - // Payload: nil, - // TxType: t.TestTransactionType, - // GasLimit: t.Genesis.GasLimit(), - // ChainID: t.Genesis.Config().ChainID, - // }, - // ) - // if err != nil { - // t.Fatalf("FAIL (%s): Error trying to send transaction: %v", t.TestName, err) - // } - // } - //}, - //OnGetPayload: func() { - // if !ws.SkipBaseVerifications { - // - // // Verify the list of withdrawals returned on the payload built - // // completely matches the list provided in the - // // engine_forkchoiceUpdatedV2 method call - // if sentList, ok := ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber]; !ok { - // panic("withdrawals sent list was not saved") - // } else { - // if len(sentList) != len(t.CLMock.LatestPayloadBuilt.Withdrawals) { - // t.Fatalf("FAIL (%s): Incorrect list of withdrawals on built payload: want=%d, got=%d", t.TestName, len(sentList), len(t.CLMock.LatestPayloadBuilt.Withdrawals)) - // } - // for i := 0; i < len(sentList); i++ { - // if err := test.CompareWithdrawal(sentList[i], t.CLMock.LatestPayloadBuilt.Withdrawals[i]); err != nil { - // t.Fatalf("FAIL (%s): Incorrect withdrawal on index %d: %v", t.TestName, i, err) - // } - // } - // - // } - // } - //}, - }) - println("processed block 1") + OnPayloadProducerSelected: func() { + println("processed block 1") + // Send some withdrawals + t.CLMock.NextWithdrawals, nextIndex = ws.GenerateWithdrawalsForBlock(nextIndex, startAccount) + ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber] = t.CLMock.NextWithdrawals - t.CLMock.ProduceSingleBlock(clmock.BlockProcessCallbacks{ - //OnPayloadProducerSelected: func() { - // // Get ExecuteWithdrawalsClaims - // addresses := make([]common.Address, 0) - // for _, w := range ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber-1] { - // addresses = append(addresses, w.Address) - // } - // // Send claim transaction - // claims, err := libgno.ExecuteWithdrawalsClaims(addresses) - // if err != nil { - // t.Fatalf("Couldn't claim tokens") - // } - // _, err = helper.SendNextTransactionWithAccount( - // t.TestContext, - // t.CLMock.NextBlockProducer, - // &helper.BaseTransactionCreator{ - // Recipient: &libgno.WithdrawalsContractAddress, - // Amount: common.Big0, - // Payload: claims, - // PrivateKey: globals.GnoVaultVaultKey, - // TxType: t.TestTransactionType, - // GasLimit: t.Genesis.GasLimit(), - // ChainID: t.Genesis.Config().ChainID, - // }, - // globals.GnoVaultAccountAddress, - // ) - // if err != nil { - // t.Fatalf("FAIL (%s): Error trying to send transaction: %v", t.TestName, err) - // } - //}, + ws.sendPayloadTransactions(t) + }, + OnGetPayload: func() { + if !ws.SkipBaseVerifications { + + // Verify the list of withdrawals returned on the payload built + // completely matches the list provided in the + // engine_forkchoiceUpdatedV2 method call + if sentList, ok := ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber]; !ok { + panic("withdrawals sent list was not saved") + } else { + if len(sentList) != len(t.CLMock.LatestPayloadBuilt.Withdrawals) { + t.Fatalf("FAIL (%s): Incorrect list of withdrawals on built payload: want=%d, got=%d", t.TestName, len(sentList), len(t.CLMock.LatestPayloadBuilt.Withdrawals)) + } + for i := 0; i < len(sentList); i++ { + if err := test.CompareWithdrawal(sentList[i], t.CLMock.LatestPayloadBuilt.Withdrawals[i]); err != nil { + t.Fatalf("FAIL (%s): Incorrect withdrawal on index %d: %v", t.TestName, i, err) + } + } + + } + } + }, + OnForkchoiceBroadcast: func() { + if !ws.SkipBaseVerifications { + for _, addr := range ws.WithdrawalsHistory.GetAddressesWithdrawnOnBlock(t.CLMock.LatestExecutedPayload.Number) { + //Test balance at `latest`, which should have the + //withdrawal applied. + latestBalance, err := getWithdrawableAmount(client, addr, big.NewInt(int64(t.CLMock.LatestExecutedPayload.Number))) + if err != nil { + t.Fatalf("FAIL (%s): Error trying to get balance of token: %v, address: %v", t.TestName, err, addr.Hex()) + } + newLatestBalance := latestBalance.Mul(latestBalance, big.NewInt(32)) + expectBalanceEqual := ws.WithdrawalsHistory.GetExpectedAccountBalance(addr, t.CLMock.LatestExecutedPayload.Number) + + if newLatestBalance.Cmp(expectBalanceEqual) != 0 { + t.Fatalf("FAIL (%s): Incorrect balance on account %s after withdrawals applied: want=%d, got=%d", t.TestName, addr, expectBalanceEqual, latestBalance) + } + } + } + }, }) - println("processed block 2") + t.CLMock.ProduceSingleBlock(clmock.BlockProcessCallbacks{ - //OnForkchoiceBroadcast: func() { - // if !ws.SkipBaseVerifications { - // for _, addr := range ws.WithdrawalsHistory.GetAddressesWithdrawnOnBlock(t.CLMock.LatestExecutedPayload.Number - 2) { - // //Test balance at `latest`, which should have the - // //withdrawal applied. - // latestBalance, err := getBalanceOfToken(client, addr, big.NewInt(int64(t.CLMock.LatestExecutedPayload.Number))) - // if err != nil { - // t.Fatalf("FAIL (%s): Error trying to get balance of token: %v, address: %v", t.TestName, err, addr.Hex()) - // } - // newLatestBalance := latestBalance.Mul(latestBalance, big.NewInt(32)) - // expectBalanceEqual := ws.WithdrawalsHistory.GetExpectedAccountBalance(addr, t.CLMock.LatestExecutedPayload.Number-2) - // - // if newLatestBalance.Cmp(expectBalanceEqual) != 0 { - // t.Fatalf("FAIL (%s): Incorrect balance on account %s after withdrawals applied: want=%d, got=%d", t.TestName, addr, expectBalanceEqual, latestBalance) - // } - // } - // - // } - //}, + OnPayloadProducerSelected: func() { + // Get ExecuteWithdrawalsClaims + addresses := make([]common.Address, 0) + for _, w := range ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber-1] { + addresses = append(addresses, w.Address) + } + // Send claim transaction + claims, err := libgno.ExecuteWithdrawalsClaims(addresses) + if err != nil { + t.Fatalf("Couldn't claim tokens") + } + _, err = helper.SendNextTransactionWithAccount( + t.TestContext, + t.CLMock.NextBlockProducer, + &helper.BaseTransactionCreator{ + Recipient: &libgno.WithdrawalsContractAddress, + Amount: common.Big0, + Payload: claims, + PrivateKey: globals.GnoVaultVaultKey, + TxType: t.TestTransactionType, + GasLimit: t.Genesis.GasLimit(), + ChainID: t.Genesis.Config().ChainID, + }, + globals.GnoVaultAccountAddress, + ) + if err != nil { + t.Fatalf("FAIL (%s): Error trying to send transaction: %v", t.TestName, err) + } + }, + //}) + //t.CLMock.ProduceSingleBlock(clmock.BlockProcessCallbacks{ + OnForkchoiceBroadcast: func() { + if !ws.SkipBaseVerifications { + for _, addr := range ws.WithdrawalsHistory.GetAddressesWithdrawnOnBlock(t.CLMock.LatestExecutedPayload.Number - 1) { + //Test balance at `latest`, which should have the + //withdrawal applied. + latestBalance, err := getBalanceOfToken(client, addr, big.NewInt(int64(t.CLMock.LatestExecutedPayload.Number))) + if err != nil { + t.Fatalf("FAIL (%s): Error trying to get balance of token: %v, address: %v", t.TestName, err, addr.Hex()) + } + newLatestBalance := latestBalance.Mul(latestBalance, big.NewInt(32)) + expectBalanceEqual := ws.WithdrawalsHistory.GetExpectedAccountBalance(addr, t.CLMock.LatestExecutedPayload.Number-1) + + if newLatestBalance.Cmp(expectBalanceEqual) != 0 { + t.Fatalf("FAIL (%s): Incorrect balance on account %s after withdrawals applied: want=%d, got=%d", t.TestName, addr, expectBalanceEqual, latestBalance) + } + } + } + }, }) - println("processed block 3") - //n-- } // Iterate over balance history of withdrawn accounts using RPC and // check that the balances match expected values. // Also check one block before the withdrawal took place, verify that // withdrawal has not been updated. - //if !ws.SkipBaseVerifications { - // for block := uint64(0); block <= t.CLMock.LatestExecutedPayload.Number; block++ { - // ws.WithdrawalsHistory.VerifyWithdrawals(block, big.NewInt(int64(block)), t.TestEngine) - // - // // Check the correct withdrawal root on past blocks - // r := t.TestEngine.TestBlockByNumber(big.NewInt(int64(block))) - // var expectedWithdrawalsRoot *common.Hash = nil - // if block >= ws.WithdrawalsForkHeight { - // calcWithdrawalsRoot := helper.ComputeWithdrawalsRoot( - // ws.WithdrawalsHistory.GetWithdrawals(block), - // ) - // expectedWithdrawalsRoot = &calcWithdrawalsRoot - // } - // jsWithdrawals, _ := json.MarshalIndent(ws.WithdrawalsHistory.GetWithdrawals(block), "", " ") - // r.ExpectationDescription = fmt.Sprintf(` - // Requested block %d to verify withdrawalsRoot with the - // following withdrawals: - // %s`, block, jsWithdrawals) - // - // r.ExpectWithdrawalsRoot(expectedWithdrawalsRoot) - // - // } - // - // // Verify on `latest` - // ws.WithdrawalsHistory.VerifyWithdrawals(t.CLMock.LatestExecutedPayload.Number, nil, t.TestEngine) - //} + if !ws.SkipBaseVerifications { + for block := uint64(0); block <= t.CLMock.LatestExecutedPayload.Number; block++ { + ws.WithdrawalsHistory.VerifyWithdrawals(block, big.NewInt(int64(block)), t.TestEngine) + + // Check the correct withdrawal root on past blocks + r := t.TestEngine.TestBlockByNumber(big.NewInt(int64(block))) + var expectedWithdrawalsRoot *common.Hash = nil + if block >= ws.WithdrawalsForkHeight { + calcWithdrawalsRoot := helper.ComputeWithdrawalsRoot( + ws.WithdrawalsHistory.GetWithdrawals(block), + ) + expectedWithdrawalsRoot = &calcWithdrawalsRoot + } + jsWithdrawals, _ := json.MarshalIndent(ws.WithdrawalsHistory.GetWithdrawals(block), "", " ") + r.ExpectationDescription = fmt.Sprintf(` + Requested block %d to verify withdrawalsRoot with the + following withdrawals: + %s`, block, jsWithdrawals) + + r.ExpectWithdrawalsRoot(expectedWithdrawalsRoot) + + } + + // Verify on `latest` + ws.WithdrawalsHistory.VerifyWithdrawals(t.CLMock.LatestExecutedPayload.Number, nil, t.TestEngine) + } } func claimTokens(client *ethclient.Client, addresses []common.Address, chainID *big.Int) error { @@ -1536,23 +1528,13 @@ func getClient(t *test.Env) *ethclient.Client { } func getBalanceOfToken(client *ethclient.Client, account common.Address, block *big.Int) (*big.Int, error) { - // get GnoTokenABI tokenABI, err := libgno.GetGNOTokenABI() if err != nil { return nil, err } - //withdrawalsABI, err := libgno.GetWithdrawalsABI() - //if err != nil { - // return nil, err - //} var result []interface{} - //withdrawalsContract := bind.NewBoundContract(libgno.WithdrawalsContractAddress, *withdrawalsABI, client, client, client) opts := &bind.CallOpts{Pending: false, BlockNumber: block} - //err = withdrawalsContract.Call(opts, &result, "withdrawableAmount", account) - //if err != nil { - // return nil, err - //} //Call the balanceOf function contract := bind.NewBoundContract(libgno.GNOTokenAddress, *tokenABI, client, client, client) @@ -1565,6 +1547,23 @@ func getBalanceOfToken(client *ethclient.Client, account common.Address, block * } return result[0].(*big.Int), nil } +func getWithdrawableAmount(client *ethclient.Client, account common.Address, block *big.Int) (*big.Int, error) { + withdrawalsABI, err := libgno.GetWithdrawalsABI() + if err != nil { + return nil, err + } + var result []interface{} + withdrawalsContract := bind.NewBoundContract(libgno.WithdrawalsContractAddress, *withdrawalsABI, client, client, client) + opts := &bind.CallOpts{Pending: false, BlockNumber: block} + err = withdrawalsContract.Call(opts, &result, "withdrawableAmount", account) + if err != nil { + return nil, err + } + if len(result) != 1 { + return nil, fmt.Errorf("unexpected result length: %d", len(result)) + } + return result[0].(*big.Int), nil +} // Withdrawals sync spec: // Specifies a withdrawals test where the withdrawals happen and then a From 03ee2e4af44ff20e4bdf501f22f6e65a736f5d53 Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Sat, 1 Jul 2023 18:28:49 +0300 Subject: [PATCH 16/27] chore(ethereum/engine): go work sync --- simulators/ethereum/engine/go.mod | 4 ++-- simulators/ethereum/engine/go.sum | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/simulators/ethereum/engine/go.mod b/simulators/ethereum/engine/go.mod index 4e02f54979..d7a597004e 100644 --- a/simulators/ethereum/engine/go.mod +++ b/simulators/ethereum/engine/go.mod @@ -5,8 +5,7 @@ go 1.18 require ( github.com/ethereum/go-ethereum v1.11.6 github.com/ethereum/hive v0.0.0-20230313141339-8e3200bfc09e - github.com/ethereum/hive/simulators/ethereum/rpc v0.0.0-20230526161643-a5c0542ee4ac - github.com/golang-jwt/jwt/v4 v4.4.3 + github.com/golang-jwt/jwt/v4 v4.5.0 github.com/mailru/easyjson v0.7.7 github.com/pkg/errors v0.9.1 golang.org/x/exp v0.0.0-20230206171751-46f607a40771 @@ -18,6 +17,7 @@ require ( github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/cespare/cp v1.1.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cockroachdb/errors v1.9.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect diff --git a/simulators/ethereum/engine/go.sum b/simulators/ethereum/engine/go.sum index 0e03a0aad6..be464b0072 100644 --- a/simulators/ethereum/engine/go.sum +++ b/simulators/ethereum/engine/go.sum @@ -79,8 +79,6 @@ github.com/ethereum/go-ethereum v1.11.6 h1:2VF8Mf7XiSUfmoNOy3D+ocfl9Qu8baQBrCNbo github.com/ethereum/go-ethereum v1.11.6/go.mod h1:+a8pUj1tOyJ2RinsNQD4326YS+leSoKGiG/uVVb0x6Y= github.com/ethereum/hive v0.0.0-20230313141339-8e3200bfc09e h1:3g9cqRqpbZ92tSlGL4PfFoq435axKw6HiZ1Gz3fOkfk= github.com/ethereum/hive v0.0.0-20230313141339-8e3200bfc09e/go.mod h1:PlpDuxHg6q1jU0K8Ouf+RXlHguignJ7k8Eyukc9RCPQ= -github.com/ethereum/hive/simulators/ethereum/rpc v0.0.0-20230526161643-a5c0542ee4ac h1:vXJyOdY/KftXDrg6f0TFtOJkP/LaTPMOGsbngYm0KK0= -github.com/ethereum/hive/simulators/ethereum/rpc v0.0.0-20230526161643-a5c0542ee4ac/go.mod h1:DyRd29AtsFbT/tBEB7/cE87X029pmEmNbhFfb/+9A/E= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fjl/memsize v0.0.1 h1:+zhkb+dhUgx0/e+M8sF0QqiouvMQUiKR+QYvdxIOKcQ= @@ -122,8 +120,7 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU= -github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= From 4a0d0fef69be7479ef931957fc037bbdc9805f09 Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Sat, 1 Jul 2023 18:29:28 +0300 Subject: [PATCH 17/27] chore(simulators/ethereum): go work sync --- simulators/ethereum/consensus/go.sum | 19 ++++-------------- simulators/ethereum/graphql/go.mod | 11 ++++++----- simulators/ethereum/graphql/go.sum | 21 +++++++++----------- simulators/ethereum/pyspec/go.mod | 14 +++++++------- simulators/ethereum/pyspec/go.sum | 25 ++++++++++-------------- simulators/ethereum/rpc-compat/go.mod | 11 ++++++----- simulators/ethereum/rpc-compat/go.sum | 21 +++++++++----------- simulators/ethereum/rpc/go.mod | 16 +++++++-------- simulators/ethereum/rpc/go.sum | 28 +++++++++++---------------- simulators/ethereum/sync/go.mod | 2 +- simulators/ethereum/sync/go.sum | 21 ++++++-------------- 11 files changed, 77 insertions(+), 112 deletions(-) diff --git a/simulators/ethereum/consensus/go.sum b/simulators/ethereum/consensus/go.sum index 313550256c..1c68887584 100644 --- a/simulators/ethereum/consensus/go.sum +++ b/simulators/ethereum/consensus/go.sum @@ -50,9 +50,7 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= @@ -65,8 +63,6 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/ethereum/go-ethereum v1.11.4 h1:KG81SnUHXWk8LJB3mBcHg/E2yLvXoiPmRMCIRxgx3cE= -github.com/ethereum/go-ethereum v1.11.4/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= github.com/ethereum/go-ethereum v1.11.6 h1:2VF8Mf7XiSUfmoNOy3D+ocfl9Qu8baQBrCNbo2CXQ8E= github.com/ethereum/go-ethereum v1.11.6/go.mod h1:+a8pUj1tOyJ2RinsNQD4326YS+leSoKGiG/uVVb0x6Y= github.com/ethereum/hive v0.0.0-20230313141339-8e3200bfc09e h1:3g9cqRqpbZ92tSlGL4PfFoq435axKw6HiZ1Gz3fOkfk= @@ -120,8 +116,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -144,8 +140,6 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.2.1 h1:XRtyuda/zw2l+Bq/38n5XUoEF72aSOu/77Thd9pPp2o= -github.com/holiman/uint256 v1.2.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/holiman/uint256 v1.2.2 h1:TXKcSGc2WaxPD2+bmzAsVthL4+pEN0YwXcL5qED83vk= github.com/holiman/uint256 v1.2.2/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -322,8 +316,6 @@ golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8= -golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ= golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -358,7 +350,7 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -402,8 +394,6 @@ golang.org/x/sys v0.0.0-20220405052023-b1e9470b6e64/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -414,8 +404,7 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/simulators/ethereum/graphql/go.mod b/simulators/ethereum/graphql/go.mod index 908b51174d..2055f3adc3 100644 --- a/simulators/ethereum/graphql/go.mod +++ b/simulators/ethereum/graphql/go.mod @@ -7,19 +7,20 @@ require github.com/ethereum/hive v0.0.0-20230313141339-8e3200bfc09e require ( github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect - github.com/ethereum/go-ethereum v1.11.4 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/ethereum/go-ethereum v1.11.6 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-stack/stack v1.8.1 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/gorilla/websocket v1.5.0 // indirect + github.com/holiman/uint256 v1.2.2 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/stretchr/testify v1.8.1 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - golang.org/x/crypto v0.4.0 // indirect - golang.org/x/sys v0.5.0 // indirect + golang.org/x/crypto v0.8.0 // indirect + golang.org/x/sys v0.7.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect ) diff --git a/simulators/ethereum/graphql/go.sum b/simulators/ethereum/graphql/go.sum index 2b80706cb8..e49b1ce601 100644 --- a/simulators/ethereum/graphql/go.sum +++ b/simulators/ethereum/graphql/go.sum @@ -9,11 +9,9 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= -github.com/ethereum/go-ethereum v1.11.4 h1:KG81SnUHXWk8LJB3mBcHg/E2yLvXoiPmRMCIRxgx3cE= -github.com/ethereum/go-ethereum v1.11.4/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/ethereum/go-ethereum v1.11.6 h1:2VF8Mf7XiSUfmoNOy3D+ocfl9Qu8baQBrCNbo2CXQ8E= github.com/ethereum/hive v0.0.0-20230313141339-8e3200bfc09e h1:3g9cqRqpbZ92tSlGL4PfFoq435axKw6HiZ1Gz3fOkfk= github.com/ethereum/hive v0.0.0-20230313141339-8e3200bfc09e/go.mod h1:PlpDuxHg6q1jU0K8Ouf+RXlHguignJ7k8Eyukc9RCPQ= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -34,8 +32,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -44,6 +42,7 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/holiman/uint256 v1.2.2 h1:TXKcSGc2WaxPD2+bmzAsVthL4+pEN0YwXcL5qED83vk= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -87,8 +86,7 @@ github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8= -golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= +golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -98,7 +96,7 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -120,15 +118,14 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= diff --git a/simulators/ethereum/pyspec/go.mod b/simulators/ethereum/pyspec/go.mod index a33b1225db..a29a186d94 100644 --- a/simulators/ethereum/pyspec/go.mod +++ b/simulators/ethereum/pyspec/go.mod @@ -3,7 +3,7 @@ module github.com/ethereum/hive/simulators/ethereum/pyspec go 1.19 require ( - github.com/ethereum/go-ethereum v1.11.4 + github.com/ethereum/go-ethereum v1.11.6 github.com/ethereum/hive v0.0.0-20230313141339-8e3200bfc09e github.com/ethereum/hive/simulators/ethereum/engine v0.0.0-20230315233552-7d35d478f4a5 ) @@ -19,7 +19,7 @@ require ( github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 // indirect github.com/cockroachdb/redact v1.1.3 // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/getsentry/sentry-go v0.18.0 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-stack/stack v1.8.1 // indirect @@ -27,10 +27,10 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/holiman/uint256 v1.2.1 // indirect + github.com/holiman/uint256 v1.2.2 // indirect github.com/klauspost/compress v1.15.15 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -50,10 +50,10 @@ require ( github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - golang.org/x/crypto v0.6.0 // indirect + golang.org/x/crypto v0.8.0 // indirect golang.org/x/exp v0.0.0-20230206171751-46f607a40771 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/sys v0.7.0 // indirect + golang.org/x/text v0.9.0 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect ) diff --git a/simulators/ethereum/pyspec/go.sum b/simulators/ethereum/pyspec/go.sum index 5b2337d0e8..a27aef516d 100644 --- a/simulators/ethereum/pyspec/go.sum +++ b/simulators/ethereum/pyspec/go.sum @@ -51,9 +51,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -64,8 +63,7 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/ethereum/go-ethereum v1.11.4 h1:KG81SnUHXWk8LJB3mBcHg/E2yLvXoiPmRMCIRxgx3cE= -github.com/ethereum/go-ethereum v1.11.4/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= +github.com/ethereum/go-ethereum v1.11.6 h1:2VF8Mf7XiSUfmoNOy3D+ocfl9Qu8baQBrCNbo2CXQ8E= github.com/ethereum/hive v0.0.0-20230313141339-8e3200bfc09e h1:3g9cqRqpbZ92tSlGL4PfFoq435axKw6HiZ1Gz3fOkfk= github.com/ethereum/hive v0.0.0-20230313141339-8e3200bfc09e/go.mod h1:PlpDuxHg6q1jU0K8Ouf+RXlHguignJ7k8Eyukc9RCPQ= github.com/ethereum/hive/simulators/ethereum/engine v0.0.0-20230315233552-7d35d478f4a5 h1:K/3RvyXwwf4YwSvyntszcPtqkmzFaSCJtz9fxqj6v8I= @@ -123,8 +121,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -148,8 +146,7 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.2.1 h1:XRtyuda/zw2l+Bq/38n5XUoEF72aSOu/77Thd9pPp2o= -github.com/holiman/uint256 v1.2.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/holiman/uint256 v1.2.2 h1:TXKcSGc2WaxPD2+bmzAsVthL4+pEN0YwXcL5qED83vk= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= @@ -334,8 +331,7 @@ golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20230206171751-46f607a40771 h1:xP7rWLUr1e1n2xkK5YB4LI0hPEy3LJC6Wk+D4pGlOJg= golang.org/x/exp v0.0.0-20230206171751-46f607a40771/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= @@ -368,7 +364,7 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -412,8 +408,7 @@ golang.org/x/sys v0.0.0-20220405052023-b1e9470b6e64/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -422,8 +417,7 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -482,6 +476,7 @@ gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/R gopkg.in/inconshreveable/log15.v2 v2.0.0-20200109203555-b30bc20e4fd1 h1:iiHuQZCNgYPmFQxd3BBN/Nc5+dAwzZuq5y40s20oQw0= gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= diff --git a/simulators/ethereum/rpc-compat/go.mod b/simulators/ethereum/rpc-compat/go.mod index 047468a76a..4b636accbd 100644 --- a/simulators/ethereum/rpc-compat/go.mod +++ b/simulators/ethereum/rpc-compat/go.mod @@ -10,12 +10,13 @@ require ( require ( github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect - github.com/ethereum/go-ethereum v1.11.4 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/ethereum/go-ethereum v1.11.6 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-stack/stack v1.8.1 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/gorilla/websocket v1.5.0 // indirect + github.com/holiman/uint256 v1.2.2 // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/stretchr/testify v1.8.1 // indirect @@ -25,7 +26,7 @@ require ( github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect github.com/yudai/pp v2.0.1+incompatible // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - golang.org/x/crypto v0.4.0 // indirect - golang.org/x/sys v0.5.0 // indirect + golang.org/x/crypto v0.8.0 // indirect + golang.org/x/sys v0.7.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect ) diff --git a/simulators/ethereum/rpc-compat/go.sum b/simulators/ethereum/rpc-compat/go.sum index 8c441d29d3..9b9f507363 100644 --- a/simulators/ethereum/rpc-compat/go.sum +++ b/simulators/ethereum/rpc-compat/go.sum @@ -9,11 +9,9 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= -github.com/ethereum/go-ethereum v1.11.4 h1:KG81SnUHXWk8LJB3mBcHg/E2yLvXoiPmRMCIRxgx3cE= -github.com/ethereum/go-ethereum v1.11.4/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/ethereum/go-ethereum v1.11.6 h1:2VF8Mf7XiSUfmoNOy3D+ocfl9Qu8baQBrCNbo2CXQ8E= github.com/ethereum/hive v0.0.0-20230313141339-8e3200bfc09e h1:3g9cqRqpbZ92tSlGL4PfFoq435axKw6HiZ1Gz3fOkfk= github.com/ethereum/hive v0.0.0-20230313141339-8e3200bfc09e/go.mod h1:PlpDuxHg6q1jU0K8Ouf+RXlHguignJ7k8Eyukc9RCPQ= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -34,8 +32,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -44,6 +42,7 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/holiman/uint256 v1.2.2 h1:TXKcSGc2WaxPD2+bmzAsVthL4+pEN0YwXcL5qED83vk= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -99,8 +98,7 @@ github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8= -golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= +golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -110,7 +108,7 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -132,15 +130,14 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= diff --git a/simulators/ethereum/rpc/go.mod b/simulators/ethereum/rpc/go.mod index 128c785276..36d56efdcb 100644 --- a/simulators/ethereum/rpc/go.mod +++ b/simulators/ethereum/rpc/go.mod @@ -3,7 +3,7 @@ module github.com/ethereum/hive/simulators/ethereum/rpc go 1.18 require ( - github.com/ethereum/go-ethereum v1.11.4 + github.com/ethereum/go-ethereum v1.11.6 github.com/ethereum/hive v0.0.0-20230313141339-8e3200bfc09e github.com/kr/pretty v0.3.1 ) @@ -20,7 +20,7 @@ require ( github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 // indirect github.com/cockroachdb/redact v1.1.3 // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/fjl/memsize v0.0.1 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect @@ -29,14 +29,14 @@ require ( github.com/go-stack/stack v1.8.1 // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.4.3 // indirect + github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/uuid v1.3.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/hashicorp/go-bexpr v0.1.11 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/holiman/uint256 v1.2.1 // indirect + github.com/holiman/uint256 v1.2.2 // indirect github.com/klauspost/compress v1.15.15 // indirect github.com/kr/text v0.2.0 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect @@ -58,10 +58,10 @@ require ( github.com/tklauser/numcpus v0.6.0 // indirect github.com/urfave/cli/v2 v2.23.7 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - golang.org/x/crypto v0.4.0 // indirect + golang.org/x/crypto v0.8.0 // indirect golang.org/x/exp v0.0.0-20230206171751-46f607a40771 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/sys v0.7.0 // indirect + golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.3.0 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect diff --git a/simulators/ethereum/rpc/go.sum b/simulators/ethereum/rpc/go.sum index 4d3a531c48..657f75e114 100644 --- a/simulators/ethereum/rpc/go.sum +++ b/simulators/ethereum/rpc/go.sum @@ -54,9 +54,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -67,8 +66,7 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/ethereum/go-ethereum v1.11.4 h1:KG81SnUHXWk8LJB3mBcHg/E2yLvXoiPmRMCIRxgx3cE= -github.com/ethereum/go-ethereum v1.11.4/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= +github.com/ethereum/go-ethereum v1.11.6 h1:2VF8Mf7XiSUfmoNOy3D+ocfl9Qu8baQBrCNbo2CXQ8E= github.com/ethereum/hive v0.0.0-20230313141339-8e3200bfc09e h1:3g9cqRqpbZ92tSlGL4PfFoq435axKw6HiZ1Gz3fOkfk= github.com/ethereum/hive v0.0.0-20230313141339-8e3200bfc09e/go.mod h1:PlpDuxHg6q1jU0K8Ouf+RXlHguignJ7k8Eyukc9RCPQ= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= @@ -109,8 +107,7 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU= -github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -127,8 +124,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -154,8 +151,7 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.2.1 h1:XRtyuda/zw2l+Bq/38n5XUoEF72aSOu/77Thd9pPp2o= -github.com/holiman/uint256 v1.2.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/holiman/uint256 v1.2.2 h1:TXKcSGc2WaxPD2+bmzAsVthL4+pEN0YwXcL5qED83vk= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= @@ -346,8 +342,7 @@ golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8= -golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= +golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20230206171751-46f607a40771 h1:xP7rWLUr1e1n2xkK5YB4LI0hPEy3LJC6Wk+D4pGlOJg= golang.org/x/exp v0.0.0-20230206171751-46f607a40771/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= @@ -380,7 +375,7 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -425,8 +420,7 @@ golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -435,8 +429,7 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -496,6 +489,7 @@ gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/R gopkg.in/inconshreveable/log15.v2 v2.0.0-20200109203555-b30bc20e4fd1 h1:iiHuQZCNgYPmFQxd3BBN/Nc5+dAwzZuq5y40s20oQw0= gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= diff --git a/simulators/ethereum/sync/go.mod b/simulators/ethereum/sync/go.mod index fb0981822d..09bafb975a 100644 --- a/simulators/ethereum/sync/go.mod +++ b/simulators/ethereum/sync/go.mod @@ -15,7 +15,7 @@ require ( github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-stack/stack v1.8.1 // indirect - github.com/golang-jwt/jwt/v4 v4.4.3 // indirect + github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/hashicorp/go-bexpr v0.1.11 // indirect diff --git a/simulators/ethereum/sync/go.sum b/simulators/ethereum/sync/go.sum index 8df05d8cd1..3f92a3ce5e 100644 --- a/simulators/ethereum/sync/go.sum +++ b/simulators/ethereum/sync/go.sum @@ -18,14 +18,10 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= -github.com/ethereum/go-ethereum v1.11.4 h1:KG81SnUHXWk8LJB3mBcHg/E2yLvXoiPmRMCIRxgx3cE= -github.com/ethereum/go-ethereum v1.11.4/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= github.com/ethereum/go-ethereum v1.11.6 h1:2VF8Mf7XiSUfmoNOy3D+ocfl9Qu8baQBrCNbo2CXQ8E= github.com/ethereum/go-ethereum v1.11.6/go.mod h1:+a8pUj1tOyJ2RinsNQD4326YS+leSoKGiG/uVVb0x6Y= github.com/ethereum/hive v0.0.0-20230313141339-8e3200bfc09e h1:3g9cqRqpbZ92tSlGL4PfFoq435axKw6HiZ1Gz3fOkfk= @@ -46,8 +42,7 @@ github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU= -github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -58,8 +53,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -73,7 +68,6 @@ github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/hashicorp/go-bexpr v0.1.11 h1:6DqdA/KBjurGby9yTY0bmkathya0lfwF2SeuubCI7dY= github.com/hashicorp/go-bexpr v0.1.11/go.mod h1:f03lAo0duBlDIUMGCuad8oLcgejw4m7U+N8T+6Kz1AE= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= -github.com/holiman/uint256 v1.2.1 h1:XRtyuda/zw2l+Bq/38n5XUoEF72aSOu/77Thd9pPp2o= github.com/holiman/uint256 v1.2.2 h1:TXKcSGc2WaxPD2+bmzAsVthL4+pEN0YwXcL5qED83vk= github.com/holiman/uint256 v1.2.2/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -149,8 +143,6 @@ github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8= -golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ= golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/exp v0.0.0-20230206171751-46f607a40771 h1:xP7rWLUr1e1n2xkK5YB4LI0hPEy3LJC6Wk+D4pGlOJg= @@ -163,7 +155,7 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -186,8 +178,6 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -196,7 +186,7 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -219,6 +209,7 @@ google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inconshreveable/log15.v2 v2.0.0-20200109203555-b30bc20e4fd1 h1:iiHuQZCNgYPmFQxd3BBN/Nc5+dAwzZuq5y40s20oQw0= +gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= From fa2883830d617d592803011cb18ec1242e8b5fbf Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Sat, 1 Jul 2023 21:23:36 +0300 Subject: [PATCH 18/27] chore(withdrawals): remove unused and commented code --- simulators/ethereum/engine/go.sum | 2 + simulators/ethereum/engine/libgno/gno.go | 6 +- .../engine/suites/withdrawals/tests.go | 812 +----------------- 3 files changed, 39 insertions(+), 781 deletions(-) diff --git a/simulators/ethereum/engine/go.sum b/simulators/ethereum/engine/go.sum index be464b0072..42765f287f 100644 --- a/simulators/ethereum/engine/go.sum +++ b/simulators/ethereum/engine/go.sum @@ -26,6 +26,7 @@ github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= +github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -121,6 +122,7 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= diff --git a/simulators/ethereum/engine/libgno/gno.go b/simulators/ethereum/engine/libgno/gno.go index 714f9dc9c7..13d90abcf0 100644 --- a/simulators/ethereum/engine/libgno/gno.go +++ b/simulators/ethereum/engine/libgno/gno.go @@ -3,10 +3,11 @@ package libgno import ( _ "embed" "fmt" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/common" "math/big" "strings" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" ) // MAX_FAILED_WITHDRAWALS_TO_PROCESS represents the maximum number of failed withdrawals to process. @@ -51,6 +52,7 @@ func ExecuteSystemWithdrawal(maxNumberOfFailedWithdrawalsToProcess uint64, amoun return dataBytes, nil } +// TODO: rename // ExecuteWithdrawalsClaims gets the byte code to execute a withdrawals claims. func ExecuteWithdrawalsClaims(addresses []common.Address) ([]byte, error) { withdrawalABI, err := abi.JSON(strings.NewReader(GNOWithdrawalContractABI)) diff --git a/simulators/ethereum/engine/suites/withdrawals/tests.go b/simulators/ethereum/engine/suites/withdrawals/tests.go index 3295887572..4d732ddc57 100644 --- a/simulators/ethereum/engine/suites/withdrawals/tests.go +++ b/simulators/ethereum/engine/suites/withdrawals/tests.go @@ -10,16 +10,16 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" beacon "github.com/ethereum/go-ethereum/beacon/engine" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/ethereum/hive/simulators/ethereum/engine/client/hive_rpc" - "github.com/ethereum/hive/simulators/ethereum/engine/libgno" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/ethclient" + + "github.com/ethereum/hive/simulators/ethereum/engine/client/hive_rpc" "github.com/ethereum/hive/simulators/ethereum/engine/clmock" "github.com/ethereum/hive/simulators/ethereum/engine/globals" "github.com/ethereum/hive/simulators/ethereum/engine/helper" + "github.com/ethereum/hive/simulators/ethereum/engine/libgno" "github.com/ethereum/hive/simulators/ethereum/engine/test" ) @@ -85,7 +85,6 @@ var ( WARM_COINBASE_ADDRESS, PUSH0_ADDRESS, } - balances = make(map[int64]map[common.Address]big.Int, 0) ) // Execution specification reference: @@ -569,271 +568,6 @@ var Tests = []test.SpecInterface{ // OverflowMaxInitcodeTxCountBeforeFork: 0, // OverflowMaxInitcodeTxCountAfterFork: 1, //}, - // - //// Get Payload Bodies Requests - //&GetPayloadBodiesSpec{ - // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "GetPayloadBodiesByRange", - // About: ` - // Make multiple withdrawals to 16 accounts each payload. - // Retrieve many of the payloads' bodies by number range. - // `, - // TimeoutSeconds: 240, - // SlotsToSafe: big.NewInt(32), - // SlotsToFinalized: big.NewInt(64), - // }, - // WithdrawalsForkHeight: 17, - // WithdrawalsBlockCount: 16, - // WithdrawalsPerBlock: 16, - // WithdrawableAccountCount: 1024, - // }, - // GetPayloadBodiesRequests: []GetPayloadBodyRequest{ - // GetPayloadBodyRequestByRange{ - // Start: 1, - // Count: 4, - // }, - // GetPayloadBodyRequestByRange{ - // Start: 1, - // Count: 8, - // }, - // GetPayloadBodyRequestByRange{ - // Start: 1, - // Count: 1, - // }, - // GetPayloadBodyRequestByRange{ - // Start: 4, - // Count: 1, - // }, - // GetPayloadBodyRequestByRange{ - // Start: 16, - // Count: 2, - // }, - // GetPayloadBodyRequestByRange{ - // Start: 17, - // Count: 16, - // }, - // GetPayloadBodyRequestByRange{ - // Start: 1, - // Count: 32, - // }, - // GetPayloadBodyRequestByRange{ - // Start: 31, - // Count: 3, - // }, - // GetPayloadBodyRequestByRange{ - // Start: 32, - // Count: 2, - // }, - // GetPayloadBodyRequestByRange{ - // Start: 33, - // Count: 1, - // }, - // GetPayloadBodyRequestByRange{ - // Start: 33, - // Count: 32, - // }, - // GetPayloadBodyRequestByRange{ - // Start: 32, - // Count: 0, - // }, - // GetPayloadBodyRequestByRange{ - // Start: 0, - // Count: 1, - // }, - // }, - //}, - // - //&GetPayloadBodiesSpec{ - // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "GetPayloadBodies After Sync", - // About: ` - // Make multiple withdrawals to 16 accounts each payload. - // Spawn a secondary client which must sync the canonical chain - // from the first client. - // Retrieve many of the payloads' bodies by number range from - // this secondary client. - // `, - // TimeoutSeconds: 240, - // SlotsToSafe: big.NewInt(32), - // SlotsToFinalized: big.NewInt(64), - // }, - // WithdrawalsForkHeight: 17, - // WithdrawalsBlockCount: 16, - // WithdrawalsPerBlock: 16, - // WithdrawableAccountCount: 1024, - // }, - // GetPayloadBodiesRequests: []GetPayloadBodyRequest{ - // GetPayloadBodyRequestByRange{ - // Start: 16, - // Count: 2, - // }, - // GetPayloadBodyRequestByRange{ - // Start: 31, - // Count: 3, - // }, - // GetPayloadBodyRequestByHashIndex{ - // BlockNumbers: []uint64{ - // 1, - // 16, - // 2, - // 17, - // }, - // }, - // GetPayloadBodyRequestByHashIndex{ // Existing+Random hashes - // BlockNumbers: []uint64{ - // 32, - // 1000, - // 31, - // 1000, - // 30, - // 1000, - // }, - // }, - // }, - //}, - // - //&GetPayloadBodiesSpec{ - // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "GetPayloadBodiesByRange (Sidechain)", - // About: ` - // Make multiple withdrawals to 16 accounts each payload. - // Retrieve many of the payloads' bodies by number range. - // Create a sidechain extending beyond the canonical chain block number. - // `, - // TimeoutSeconds: 240, - // SlotsToSafe: big.NewInt(32), - // SlotsToFinalized: big.NewInt(64), - // }, - // WithdrawalsForkHeight: 17, - // WithdrawalsBlockCount: 16, - // WithdrawalsPerBlock: 16, - // WithdrawableAccountCount: 1024, - // }, - // GenerateSidechain: true, - // GetPayloadBodiesRequests: []GetPayloadBodyRequest{ - // GetPayloadBodyRequestByRange{ - // Start: 33, - // Count: 1, - // }, - // GetPayloadBodyRequestByRange{ - // Start: 32, - // Count: 2, - // }, - // }, - //}, - // - //&GetPayloadBodiesSpec{ - // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "GetPayloadBodiesByRange (Empty Transactions/Withdrawals)", - // About: ` - // Make no withdrawals and no transactions in many payloads. - // Retrieve many of the payloads' bodies by number range. - // `, - // TimeoutSeconds: 240, - // SlotsToSafe: big.NewInt(32), - // SlotsToFinalized: big.NewInt(64), - // }, - // WithdrawalsForkHeight: 2, - // WithdrawalsBlockCount: 1, - // WithdrawalsPerBlock: 0, - // TransactionsPerBlock: common.Big0, - // }, - // GetPayloadBodiesRequests: []GetPayloadBodyRequest{ - // GetPayloadBodyRequestByRange{ - // Start: 1, - // Count: 1, - // }, - // GetPayloadBodyRequestByRange{ - // Start: 2, - // Count: 1, - // }, - // GetPayloadBodyRequestByRange{ - // Start: 1, - // Count: 2, - // }, - // }, - //}, - //&GetPayloadBodiesSpec{ - // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "GetPayloadBodiesByHash", - // About: ` - // Make multiple withdrawals to 16 accounts each payload. - // Retrieve many of the payloads' bodies by hash. - // `, - // TimeoutSeconds: 240, - // SlotsToSafe: big.NewInt(32), - // SlotsToFinalized: big.NewInt(64), - // }, - // WithdrawalsForkHeight: 17, - // WithdrawalsBlockCount: 16, - // WithdrawalsPerBlock: 16, - // WithdrawableAccountCount: 1024, - // }, - // GetPayloadBodiesRequests: []GetPayloadBodyRequest{ - // GetPayloadBodyRequestByHashIndex{ - // BlockNumbers: []uint64{ - // 1, - // 16, - // 2, - // 17, - // }, - // }, - // GetPayloadBodyRequestByHashIndex{ - // Start: 1, - // End: 32, - // }, - // GetPayloadBodyRequestByHashIndex{ // Existing+Random hashes - // BlockNumbers: []uint64{ - // 32, - // 1000, - // 31, - // 1000, - // 30, - // 1000, - // }, - // }, - // GetPayloadBodyRequestByHashIndex{ // All Random hashes - // BlockNumbers: []uint64{ - // 1000, - // 1000, - // 1000, - // 1000, - // 1000, - // 1000, - // }, - // }, - // }, - //}, - // - //&GetPayloadBodiesSpec{ - // WithdrawalsBaseSpec: &WithdrawalsBaseSpec{ - // Spec: test.Spec{ - // Name: "GetPayloadBodiesByHash (Empty Transactions/Withdrawals)", - // About: ` - // Make no withdrawals and no transactions in many payloads. - // Retrieve many of the payloads' bodies by hash. - // `, - // TimeoutSeconds: 240, - // SlotsToSafe: big.NewInt(32), - // SlotsToFinalized: big.NewInt(64), - // }, - // WithdrawalsForkHeight: 17, - // WithdrawalsBlockCount: 16, - // WithdrawalsPerBlock: 0, - // TransactionsPerBlock: common.Big0, - // }, - // GetPayloadBodiesRequests: []GetPayloadBodyRequest{ - // GetPayloadBodyRequestByHashIndex{ - // Start: 16, - // End: 17, - // }, - // }, - //}, } // Helper types to convert gwei into wei more easily @@ -903,12 +637,7 @@ func (wh WithdrawalsHistory) GetWithdrawnAccounts(blockHeight uint64) map[common // Verify all withdrawals on a client at a given height func (wh WithdrawalsHistory) VerifyWithdrawals(block uint64, rpcBlock *big.Int, testEngine *test.TestEngineClient) { accounts := wh.GetWithdrawnAccounts(block) - for account, _ := range accounts { - //r := testEngine.TestBalanceAt(account, rpcBlock) - //r.ExpectBalanceEqual(expectedBalance) - // All withdrawals account have a bytecode that unconditionally set the - // zero storage key to one on EVM execution. - // Withdrawals must not trigger EVM so we expect zero. + for account := range accounts { s := testEngine.TestStorageAt(account, common.BigToHash(common.Big0), rpcBlock) s.ExpectBigIntStorageEqual(common.Big0) } @@ -1108,17 +837,6 @@ func (ws *WithdrawalsBaseSpec) GetTransactionCountPerPayload() uint64 { return ws.TransactionsPerBlock.Uint64() } -// getTimestamp of the next 2 minutes -func getTimestamp() int64 { - now := time.Now() - - // Calculate the start of the next 2 minutes - nextThreeSeconds := now.Truncate(time.Minute).Add(3 * time.Second) - - // Get the Unix timestamp of the next 2 minutes - return nextThreeSeconds.Unix() -} - // sendPayloadTransactions spreads and sends TransactionCountPerPayload equaly between TX_CONTRACT_ADDRESSES // // Tx params: @@ -1152,35 +870,6 @@ func (ws *WithdrawalsBaseSpec) sendPayloadTransactions(t *test.Env) { } } -// type balancer map[common.Address]uint64 -// type blockBalancer map[uint64]balancer -// -// // init blockBalancer -// -// func (ws *WithdrawalsBaseSpec) initBlockBalancer() blockBalancer { -// blockBal := make(blockBalancer) -// for i := uint64(0); i < ws.WithdrawalsBlockCount; i++ { -// blockBal[i] = make(balancer) -// } -// return blockBal -// } -// -// // add to blockBalancer the amount to be withdrawn for a specific address in a specific block -// -// func (ws *WithdrawalsBaseSpec) addToBlockBalancer(blockBal blockBalancer, block uint64, addr common.Address, amount uint64) { -// if _, ok := blockBal[block][addr]; !ok { -// blockBal[block][addr] = amount -// } else { -// blockBal[block][addr] += amount -// } -// } -// -// // get balance of an address in a specific block -// -// func (ws *WithdrawalsBaseSpec) getBalance(blockBal blockBalancer, block uint64, addr common.Address) uint64 { -// return blockBal[block][addr] -// } -// // Base test case execution procedure for withdrawals func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { // Create the withdrawals history object @@ -1270,7 +959,6 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { var ( startAccount = ws.GetWithdrawalsStartAccount() nextIndex = uint64(0) - //addressToSend = common.HexToAddress("0x0000000000000000000000babe0babe000000000") ) // start client @@ -1291,7 +979,6 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { for i := 0; i < int(ws.WithdrawalsBlockCount); i++ { t.CLMock.ProduceSingleBlock(clmock.BlockProcessCallbacks{ OnPayloadProducerSelected: func() { - println("processed block 1") // Send some withdrawals t.CLMock.NextWithdrawals, nextIndex = ws.GenerateWithdrawalsForBlock(nextIndex, startAccount) ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber] = t.CLMock.NextWithdrawals @@ -1305,25 +992,28 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { // completely matches the list provided in the // engine_forkchoiceUpdatedV2 method call if sentList, ok := ws.WithdrawalsHistory[t.CLMock.CurrentPayloadNumber]; !ok { - panic("withdrawals sent list was not saved") + t.Fatalf("FAIL (%s): Withdrawals sent list was not saved", t.TestName) } else { if len(sentList) != len(t.CLMock.LatestPayloadBuilt.Withdrawals) { - t.Fatalf("FAIL (%s): Incorrect list of withdrawals on built payload: want=%d, got=%d", t.TestName, len(sentList), len(t.CLMock.LatestPayloadBuilt.Withdrawals)) + t.Fatalf( + "FAIL (%s): Incorrect list of withdrawals on built payload: want=%d, got=%d", + t.TestName, + len(sentList), + len(t.CLMock.LatestPayloadBuilt.Withdrawals), + ) } for i := 0; i < len(sentList); i++ { if err := test.CompareWithdrawal(sentList[i], t.CLMock.LatestPayloadBuilt.Withdrawals[i]); err != nil { t.Fatalf("FAIL (%s): Incorrect withdrawal on index %d: %v", t.TestName, i, err) } } - } } }, OnForkchoiceBroadcast: func() { if !ws.SkipBaseVerifications { for _, addr := range ws.WithdrawalsHistory.GetAddressesWithdrawnOnBlock(t.CLMock.LatestExecutedPayload.Number) { - //Test balance at `latest`, which should have the - //withdrawal applied. + //Test balance at `latest`, which should have the withdrawal applied. latestBalance, err := getWithdrawableAmount(client, addr, big.NewInt(int64(t.CLMock.LatestExecutedPayload.Number))) if err != nil { t.Fatalf("FAIL (%s): Error trying to get balance of token: %v, address: %v", t.TestName, err, addr.Hex()) @@ -1332,7 +1022,13 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { expectBalanceEqual := ws.WithdrawalsHistory.GetExpectedAccountBalance(addr, t.CLMock.LatestExecutedPayload.Number) if newLatestBalance.Cmp(expectBalanceEqual) != 0 { - t.Fatalf("FAIL (%s): Incorrect balance on account %s after withdrawals applied: want=%d, got=%d", t.TestName, addr, expectBalanceEqual, latestBalance) + t.Fatalf( + "FAIL (%s): Incorrect balance on account %s after withdrawals applied: want=%d, got=%d", + t.TestName, + addr, + expectBalanceEqual, + latestBalance, + ) } } } @@ -1340,6 +1036,7 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { }) t.CLMock.ProduceSingleBlock(clmock.BlockProcessCallbacks{ + OnPayloadProducerSelected: func() { // Get ExecuteWithdrawalsClaims addresses := make([]common.Address, 0) @@ -1366,16 +1063,14 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { globals.GnoVaultAccountAddress, ) if err != nil { - t.Fatalf("FAIL (%s): Error trying to send transaction: %v", t.TestName, err) + t.Fatalf("FAIL (%s): Error trying to send claim transaction: %v", t.TestName, err) } }, - //}) - //t.CLMock.ProduceSingleBlock(clmock.BlockProcessCallbacks{ + OnForkchoiceBroadcast: func() { if !ws.SkipBaseVerifications { for _, addr := range ws.WithdrawalsHistory.GetAddressesWithdrawnOnBlock(t.CLMock.LatestExecutedPayload.Number - 1) { - //Test balance at `latest`, which should have the - //withdrawal applied. + //Test balance at `latest`, which should have the withdrawal applied. latestBalance, err := getBalanceOfToken(client, addr, big.NewInt(int64(t.CLMock.LatestExecutedPayload.Number))) if err != nil { t.Fatalf("FAIL (%s): Error trying to get balance of token: %v, address: %v", t.TestName, err, addr.Hex()) @@ -1424,100 +1119,6 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { } } -func claimTokens(client *ethclient.Client, addresses []common.Address, chainID *big.Int) error { - //privateKey, err := crypto.HexToECDSA("fad9c8855b740a0b7ed4c221dbad0f33a83a49cad6b3fe8d5817ac83d38b6a19") - //if err != nil { - // - //} - //publicKey := privateKey.Public() - //publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) - //if !ok { - // return errors.New("error casting public key to ECDSA") - //} - // - //fromAddress := crypto.PubkeyToAddress(*publicKeyECDSA) - nonce, err := client.PendingNonceAt(context.Background(), globals.VaultAccountAddress) - if err != nil { - return err - } - - gasPrice, err := client.SuggestGasPrice(context.Background()) - if err != nil { - return err - } - - auth, err := bind.NewKeyedTransactorWithChainID(globals.VaultKey, chainID) - if err != nil { - return err - } - //auth.From = globals.VaultAccountAddress - auth.Nonce = big.NewInt(int64(nonce)) - auth.Value = big.NewInt(0) // in wei - //auth.GasLimit = uint64(300000) // in units - auth.GasPrice = gasPrice.Add(gasPrice, big.NewInt(1000)) - - //address := common.HexToAddress("0x147B8eb97fD247D06C4006D269c90C1908Fb5D54") - instance, err := libgno.NewLibgno(libgno.WithdrawalsContractAddress, client) - if err != nil { - return err - } - - tx, err := instance.ClaimWithdrawals(auth, addresses) - if err != nil { - return err - } - - tx.Hash() - - return nil -} - -func transferTokens(client *ethclient.Client, address common.Address, amount *big.Int, chainID *big.Int) (common.Hash, error) { - //privateKey, err := crypto.HexToECDSA("fad9c8855b740a0b7ed4c221dbad0f33a83a49cad6b3fe8d5817ac83d38b6a19") - //if err != nil { - // - //} - //publicKey := privateKey.Public() - //publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) - //if !ok { - // return errors.New("error casting public key to ECDSA") - //} - // - //fromAddress := crypto.PubkeyToAddress(*publicKeyECDSA) - nonce, err := client.PendingNonceAt(context.Background(), globals.VaultAccountAddress) - if err != nil { - return common.Hash{}, err - } - - gasPrice, err := client.SuggestGasPrice(context.Background()) - if err != nil { - return common.Hash{}, err - } - - auth, err := bind.NewKeyedTransactorWithChainID(globals.GnoVaultVaultKey, chainID) - if err != nil { - return common.Hash{}, err - } - //auth.From = globals.VaultAccountAddress - auth.Nonce = big.NewInt(int64(nonce)) - //auth.Value = big.NewInt(0) // in wei - //auth.GasLimit = uint64(300000) // in units - auth.GasPrice = gasPrice.Add(gasPrice, big.NewInt(1000)) - - //address := common.HexToAddress("0x147B8eb97fD247D06C4006D269c90C1908Fb5D54") - instance, err := libgno.NewGnoToken(libgno.GNOTokenAddress, client) - if err != nil { - return common.Hash{}, err - } - - tx, err := instance.Transfer(auth, address, amount) - if err != nil { - return common.Hash{}, err - } - - return tx.Hash(), nil -} - func getClient(t *test.Env) *ethclient.Client { url, _ := t.CLMock.EngineClients[0].Url() client, err := ethclient.Dial(url) @@ -1547,6 +1148,8 @@ func getBalanceOfToken(client *ethclient.Client, account common.Address, block * } return result[0].(*big.Int), nil } + +// getWithdrawableAmount returns withdrawableAmount for specific address from deposit contract func getWithdrawableAmount(client *ethclient.Client, account common.Address, block *big.Int) (*big.Int, error) { withdrawalsABI, err := libgno.GetWithdrawalsABI() if err != nil { @@ -1645,12 +1248,10 @@ func (ws *WithdrawalsSyncSpec) Execute(t *test.Env) { block1, err = t.CLMock.EngineClients[0].BlockByNumber(ctx, nil) if err != nil { panic("failed to get block by number") - return } block2, err := secondaryEngine.BlockByNumber(ctx, nil) if err != nil { panic("failed to get block by number") - return } // Latest block in both EngineClients should be the same if block1.Number().Uint64() != block2.Number().Uint64() { @@ -1938,7 +1539,13 @@ func (ws *WithdrawalsReorgSpec) Execute(t *test.Env) { } else { version = 1 } - t.Logf("INFO (%s): Sending sidechain payload %d, hash=%s, parent=%s", t.TestName, payloadNumber, payload.BlockHash, payload.ParentHash) + t.Logf( + "INFO (%s): Sending sidechain payload %d, hash=%s, parent=%s", + t.TestName, + payloadNumber, + payload.BlockHash, + payload.ParentHash, + ) r := t.TestEngine.TestEngineNewPayload(payload, version) r.ExpectStatusEither(test.Valid, test.Accepted) p := t.TestEngine.TestEngineForkchoiceUpdated( @@ -1975,356 +1582,3 @@ func (ws *WithdrawalsReorgSpec) Execute(t *test.Env) { }, nil) r.ExpectPayloadStatus(test.Valid) } - -//// EIP-3860 Shanghai Tests: -//// Send transactions overflowing the MAX_INITCODE_SIZE -//// limit set in EIP-3860, before and after the Shanghai -//// fork. -//type MaxInitcodeSizeSpec struct { -// *WithdrawalsBaseSpec -// OverflowMaxInitcodeTxCountBeforeFork uint64 -// OverflowMaxInitcodeTxCountAfterFork uint64 -//} -// -//func (s *MaxInitcodeSizeSpec) Execute(t *test.Env) { -// t.CLMock.WaitForTTD() -// -// invalidTxCreator := &helper.BigInitcodeTransactionCreator{ -// InitcodeLength: MAX_INITCODE_SIZE + 1, -// BaseTransactionCreator: helper.BaseTransactionCreator{ -// GasLimit: 2000000, -// }, -// } -// validTxCreator := &helper.BigInitcodeTransactionCreator{ -// InitcodeLength: MAX_INITCODE_SIZE, -// BaseTransactionCreator: helper.BaseTransactionCreator{ -// GasLimit: 2000000, -// }, -// } -// -// if s.OverflowMaxInitcodeTxCountBeforeFork > 0 { -// if s.GetPreWithdrawalsBlockCount() == 0 { -// panic("invalid test configuration") -// } -// -// for i := uint64(0); i < s.OverflowMaxInitcodeTxCountBeforeFork; i++ { -// tx, err := invalidTxCreator.MakeTransaction(i) -// if err != nil { -// t.Fatalf("FAIL: Error creating max initcode transaction: %v", err) -// } -// err = t.Engine.SendTransaction(t.TestContext, tx) -// if err != nil { -// t.Fatalf("FAIL: Error sending max initcode transaction before Shanghai: %v", err) -// } -// } -// } -// -// // Produce all blocks needed to reach Shanghai -// t.Logf("INFO: Blocks until Shanghai=%d", s.GetPreWithdrawalsBlockCount()) -// txIncluded := uint64(0) -// t.CLMock.ProduceBlocks(int(s.GetPreWithdrawalsBlockCount()), clmock.BlockProcessCallbacks{ -// OnGetPayload: func() { -// t.Logf("INFO: Got Pre-Shanghai block=%d", t.CLMock.LatestPayloadBuilt.Number) -// txIncluded += uint64(len(t.CLMock.LatestPayloadBuilt.Transactions)) -// }, -// }) -// -// // Check how many transactions were included -// if txIncluded == 0 && s.OverflowMaxInitcodeTxCountBeforeFork > 0 { -// t.Fatalf("FAIL: No max initcode txs included before Shanghai. Txs must have been included before the MAX_INITCODE_SIZE limit was enabled") -// } -// -// // Create a payload, no txs should be included -// t.CLMock.ProduceSingleBlock(clmock.BlockProcessCallbacks{ -// OnGetPayload: func() { -// if len(t.CLMock.LatestPayloadBuilt.Transactions) > 0 { -// t.Fatalf("FAIL: Client included tx exceeding the MAX_INITCODE_SIZE in payload") -// } -// }, -// }) -// -// // Send transactions after the fork -// for i := txIncluded; i < (txIncluded + s.OverflowMaxInitcodeTxCountAfterFork); i++ { -// tx, err := invalidTxCreator.MakeTransaction(i) -// if err != nil { -// t.Fatalf("FAIL: Error creating max initcode transaction: %v", err) -// } -// err = t.Engine.SendTransaction(t.TestContext, tx) -// if err == nil { -// t.Fatalf("FAIL: Client accepted tx exceeding the MAX_INITCODE_SIZE: %v", tx) -// } -// txBack, isPending, err := t.Engine.TransactionByHash(t.TestContext, tx.Hash()) -// if txBack != nil || isPending || err == nil { -// t.Fatalf("FAIL: Invalid tx was not unknown to the client: txBack=%v, isPending=%t, err=%v", txBack, isPending, err) -// } -// } -// -// // Try to include an invalid tx in new payload -// var ( -// validTx, _ = validTxCreator.MakeTransaction(txIncluded) -// invalidTx, _ = invalidTxCreator.MakeTransaction(txIncluded) -// ) -// t.CLMock.ProduceSingleBlock(clmock.BlockProcessCallbacks{ -// OnPayloadProducerSelected: func() { -// t.Engine.SendTransaction(t.TestContext, validTx) -// }, -// OnGetPayload: func() { -// validTxBytes, err := validTx.MarshalBinary() -// if err != nil { -// t.Fatalf("FAIL: Unable to marshal valid tx to binary: %v", err) -// } -// if len(t.CLMock.LatestPayloadBuilt.Transactions) != 1 || !bytes.Equal(validTxBytes, t.CLMock.LatestPayloadBuilt.Transactions[0]) { -// t.Fatalf("FAIL: Client did not include valid tx with MAX_INITCODE_SIZE") -// } -// // Customize the payload to include a tx with an invalid initcode -// customPayload, err := helper.CustomizePayloadTransactions(&t.CLMock.LatestPayloadBuilt, types.Transactions{invalidTx}) -// if err != nil { -// t.Fatalf("FAIL: Unable to customize payload: %v", err) -// } -// -// r := t.TestEngine.TestEngineNewPayloadV2(customPayload) -// r.ExpectStatus(test.Invalid) -// r.ExpectLatestValidHash(&t.CLMock.LatestPayloadBuilt.ParentHash) -// }, -// }) -//} -// -//// Withdrawals sync spec: -//// Specifies a withdrawals test where the withdrawals happen and then a -//// client needs to sync and apply the withdrawals. -//type GetPayloadBodiesSpec struct { -// *WithdrawalsBaseSpec -// GetPayloadBodiesRequests []GetPayloadBodyRequest -// GenerateSidechain bool -// AfterSync bool -//} -// -//type GetPayloadBodyRequest interface { -// Verify(*test.TestEngineClient, clmock.ExecutableDataHistory) -//} -// -//type GetPayloadBodyRequestByRange struct { -// Start uint64 -// Count uint64 -//} -// -//func (req GetPayloadBodyRequestByRange) Verify(testEngine *test.TestEngineClient, payloadHistory clmock.ExecutableDataHistory) { -// r := testEngine.TestEngineGetPayloadBodiesByRangeV1(req.Start, req.Count) -// if req.Start < 1 || req.Count < 1 { -// r.ExpectationDescription = fmt.Sprintf(` -// Sent start (%d) or count (%d) to engine_getPayloadBodiesByRangeV1 with a -// value less than 1, therefore error is expected. -// `, req.Start, req.Count) -// r.ExpectErrorCode(InvalidParamsError) -// return -// } -// latestPayloadNumber := payloadHistory.LatestPayloadNumber() -// if req.Start > latestPayloadNumber { -// r.ExpectationDescription = fmt.Sprintf(` -// Sent start=%d and count=%d to engine_getPayloadBodiesByRangeV1, latest known block is %d, hence an empty list is expected. -// `, req.Start, req.Count, latestPayloadNumber) -// r.ExpectPayloadBodiesCount(0) -// } else { -// var count = req.Count -// if req.Start+req.Count-1 > latestPayloadNumber { -// count = latestPayloadNumber - req.Start + 1 -// } -// r.ExpectationDescription = fmt.Sprintf("Sent engine_getPayloadBodiesByRange(start=%d, count=%d), latest payload number in canonical chain is %d", req.Start, req.Count, latestPayloadNumber) -// r.ExpectPayloadBodiesCount(count) -// for i := req.Start; i < req.Start+count; i++ { -// p := payloadHistory[i] -// -// r.ExpectPayloadBody(i-req.Start, &client_types.ExecutionPayloadBodyV1{ -// Transactions: p.Transactions, -// Withdrawals: p.Withdrawals, -// }) -// } -// } -//} -// -//type GetPayloadBodyRequestByHashIndex struct { -// BlockNumbers []uint64 -// Start uint64 -// End uint64 -//} -// -//func (req GetPayloadBodyRequestByHashIndex) Verify(testEngine *test.TestEngineClient, payloadHistory clmock.ExecutableDataHistory) { -// payloads := make([]*beacon.ExecutableData, 0) -// hashes := make([]common.Hash, 0) -// if len(req.BlockNumbers) > 0 { -// for _, n := range req.BlockNumbers { -// if p, ok := payloadHistory[n]; ok { -// payloads = append(payloads, p) -// hashes = append(hashes, p.BlockHash) -// } else { -// // signal to request an unknown hash (random) -// randHash := common.Hash{} -// rand.Read(randHash[:]) -// payloads = append(payloads, nil) -// hashes = append(hashes, randHash) -// } -// } -// } -// if req.Start > 0 && req.End > 0 { -// for n := req.Start; n <= req.End; n++ { -// if p, ok := payloadHistory[n]; ok { -// payloads = append(payloads, p) -// hashes = append(hashes, p.BlockHash) -// } else { -// // signal to request an unknown hash (random) -// randHash := common.Hash{} -// rand.Read(randHash[:]) -// payloads = append(payloads, nil) -// hashes = append(hashes, randHash) -// } -// } -// } -// if len(payloads) == 0 { -// panic("invalid test") -// } -// -// r := testEngine.TestEngineGetPayloadBodiesByHashV1(hashes) -// r.ExpectPayloadBodiesCount(uint64(len(payloads))) -// for i, p := range payloads { -// var expectedPayloadBody *client_types.ExecutionPayloadBodyV1 -// if p != nil { -// expectedPayloadBody = &client_types.ExecutionPayloadBodyV1{ -// Transactions: p.Transactions, -// Withdrawals: p.Withdrawals, -// } -// } -// r.ExpectPayloadBody(uint64(i), expectedPayloadBody) -// } -// -//} -// -//func (ws *GetPayloadBodiesSpec) Execute(t *test.Env) { -// // Do the base withdrawal test first, skipping base verifications -// ws.WithdrawalsBaseSpec.SkipBaseVerifications = true -// ws.WithdrawalsBaseSpec.Execute(t) -// -// payloadHistory := t.CLMock.ExecutedPayloadHistory -// -// testEngine := t.TestEngine -// -// if ws.GenerateSidechain { -// -// // First generate an extra payload on top of the canonical chain -// // Generate more withdrawals -// nextWithdrawals, _ := ws.GenerateWithdrawalsForBlock(payloadHistory.LatestWithdrawalsIndex(), ws.GetWithdrawalsStartAccount()) -// -// f := t.TestEngine.TestEngineForkchoiceUpdatedV2( -// &beacon.ForkchoiceStateV1{ -// HeadBlockHash: t.CLMock.LatestHeader.Hash(), -// }, -// &beacon.PayloadAttributes{ -// Timestamp: t.CLMock.LatestHeader.Time + ws.GetBlockTimeIncrements(), -// Withdrawals: nextWithdrawals, -// }, -// ) -// f.ExpectPayloadStatus(test.Valid) -// -// // Wait for payload to be built -// time.Sleep(time.Second) -// -// // Get the next canonical payload -// p := t.TestEngine.TestEngineGetPayloadV2(f.Response.PayloadID) -// p.ExpectNoError() -// nextCanonicalPayload := &p.Payload -// -// // Now we have an extra payload that follows the canonical chain, -// // but we need a side chain for the test. -// sidechainCurrent, err := helper.CustomizePayload(&t.CLMock.LatestExecutedPayload, &helper.CustomPayloadData{ -// Withdrawals: helper.RandomizeWithdrawalsOrder(t.CLMock.LatestExecutedPayload.Withdrawals), -// }) -// if err != nil { -// t.Fatalf("FAIL (%s): Error obtaining custom sidechain payload: %v", t.TestName, err) -// } -// -// sidechainHead, err := helper.CustomizePayload(nextCanonicalPayload, &helper.CustomPayloadData{ -// ParentHash: &sidechainCurrent.BlockHash, -// Withdrawals: helper.RandomizeWithdrawalsOrder(nextCanonicalPayload.Withdrawals), -// }) -// if err != nil { -// t.Fatalf("FAIL (%s): Error obtaining custom sidechain payload: %v", t.TestName, err) -// } -// -// // Send both sidechain payloads as engine_newPayloadV2 -// n1 := t.TestEngine.TestEngineNewPayloadV2(sidechainCurrent) -// n1.ExpectStatus(test.Valid) -// n2 := t.TestEngine.TestEngineNewPayloadV2(sidechainHead) -// n2.ExpectStatus(test.Valid) -// } else if ws.AfterSync { -// // Spawn a secondary client which will need to sync to the primary client -// secondaryEngine, err := hive_rpc.HiveRPCEngineStarter{}.StartClient(t.T, t.TestContext, t.Genesis, t.ClientParams, t.ClientFiles, t.Engine) -// if err != nil { -// t.Fatalf("FAIL (%s): Unable to spawn a secondary client: %v", t.TestName, err) -// } -// secondaryEngineTest := test.NewTestEngineClient(t, secondaryEngine) -// t.CLMock.AddEngineClient(secondaryEngine) -// -// loop: -// for { -// select { -// case <-t.TimeoutContext.Done(): -// t.Fatalf("FAIL (%s): Timeout while waiting for secondary client to sync", t.TestName) -// case <-time.After(time.Second): -// secondaryEngineTest.TestEngineNewPayloadV2( -// &t.CLMock.LatestExecutedPayload, -// ) -// r := secondaryEngineTest.TestEngineForkchoiceUpdatedV2( -// &t.CLMock.LatestForkchoice, -// nil, -// ) -// if r.Response.PayloadStatus.Status == test.Valid { -// break loop -// } -// if r.Response.PayloadStatus.Status == test.Invalid { -// t.Fatalf("FAIL (%s): Syncing client rejected valid chain: %s", t.TestName, r.Response) -// } -// } -// } -// -// // GetPayloadBodies will be sent to the secondary client -// testEngine = secondaryEngineTest -// } -// -// // Now send the range request, which should ignore any sidechain -// for _, req := range ws.GetPayloadBodiesRequests { -// req.Verify(testEngine, payloadHistory) -// } -//} -// -//type BlockValueSpec struct { -// *WithdrawalsBaseSpec -//} -// -//func (s *BlockValueSpec) Execute(t *test.Env) { -// s.WithdrawalsBaseSpec.SkipBaseVerifications = true -// s.WithdrawalsBaseSpec.Execute(t) -// -// // Get the latest block and the transactions included -// b := t.TestEngine.TestBlockByNumber(nil) -// b.ExpectNoError() -// -// totalValue := new(big.Int) -// txs := b.Block.Transactions() -// if len(txs) == 0 { -// t.Fatalf("FAIL (%s): No transactions included in latest block", t.TestName) -// } -// for _, tx := range txs { -// r := t.TestEngine.TestTransactionReceipt(tx.Hash()) -// r.ExpectNoError() -// -// receipt := r.Receipt -// -// gasUsed := new(big.Int).SetUint64(receipt.GasUsed) -// txTip, _ := tx.EffectiveGasTip(b.Block.Header().BaseFee) -// txTip.Mul(txTip, gasUsed) -// totalValue.Add(totalValue, txTip) -// } -// -// if totalValue.Cmp(t.CLMock.LatestBlockValue) != 0 { -// t.Fatalf("FAIL (%s): Unexpected block value returned on GetPayloadV2: want=%d, got=%d", t.TestName, totalValue, t.CLMock.LatestBlockValue) -// } -//} From c43b7523641c7f383cb602d492d5b09ca9f2e847 Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Sat, 1 Jul 2023 21:32:29 +0300 Subject: [PATCH 19/27] chore(libgno): rename function && remove unused code --- simulators/ethereum/engine/libgno/gno.go | 5 ++- .../engine/suites/withdrawals/tests.go | 32 ++++--------------- 2 files changed, 9 insertions(+), 28 deletions(-) diff --git a/simulators/ethereum/engine/libgno/gno.go b/simulators/ethereum/engine/libgno/gno.go index 13d90abcf0..6a40bdaf54 100644 --- a/simulators/ethereum/engine/libgno/gno.go +++ b/simulators/ethereum/engine/libgno/gno.go @@ -52,9 +52,8 @@ func ExecuteSystemWithdrawal(maxNumberOfFailedWithdrawalsToProcess uint64, amoun return dataBytes, nil } -// TODO: rename -// ExecuteWithdrawalsClaims gets the byte code to execute a withdrawals claims. -func ExecuteWithdrawalsClaims(addresses []common.Address) ([]byte, error) { +// CreateClaimWithdrawalsPayload creates the Tx payload for claimWithdrawals call. +func CreateClaimWithdrawalsPayload(addresses []common.Address) ([]byte, error) { withdrawalABI, err := abi.JSON(strings.NewReader(GNOWithdrawalContractABI)) if err != nil { return []byte{}, ErrorLoadingWithdrawalContract diff --git a/simulators/ethereum/engine/suites/withdrawals/tests.go b/simulators/ethereum/engine/suites/withdrawals/tests.go index 4d732ddc57..040142dc20 100644 --- a/simulators/ethereum/engine/suites/withdrawals/tests.go +++ b/simulators/ethereum/engine/suites/withdrawals/tests.go @@ -11,7 +11,6 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" beacon "github.com/ethereum/go-ethereum/beacon/engine" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" @@ -704,26 +703,6 @@ func (ws *WithdrawalsBaseSpec) GetWithdrawalsStartAccount() *big.Int { return big.NewInt(0x1000) } -// Adds bytecode that unconditionally sets an storage key to specified account range -func AddUnconditionalBytecode(g *core.Genesis, start *big.Int, end *big.Int) { - for ; start.Cmp(end) <= 0; start.Add(start, common.Big1) { - accountAddress := common.BigToAddress(start) - // Bytecode to unconditionally set a storage key - g.Alloc[accountAddress] = core.GenesisAccount{ - Code: []byte{ - 0x60, // PUSH1(0x01) - 0x01, - 0x60, // PUSH1(0x00) - 0x00, - 0x55, // SSTORE - 0x00, // STOP - }, // sstore(0, 1) - Nonce: 0, - Balance: common.Big0, - } - } -} - // Append the accounts we are going to withdraw to, which should also include // bytecode for testing purposes. func (ws *WithdrawalsBaseSpec) GetGenesisTest(base string) string { @@ -1044,9 +1023,9 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { addresses = append(addresses, w.Address) } // Send claim transaction - claims, err := libgno.ExecuteWithdrawalsClaims(addresses) + claims, err := libgno.CreateClaimWithdrawalsPayload(addresses) if err != nil { - t.Fatalf("Couldn't claim tokens") + t.Fatalf("FAIL (%s): Cant create claimWithdrawals transaction payload: %v", t.TestName, err) } _, err = helper.SendNextTransactionWithAccount( t.TestContext, @@ -1079,7 +1058,10 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { expectBalanceEqual := ws.WithdrawalsHistory.GetExpectedAccountBalance(addr, t.CLMock.LatestExecutedPayload.Number-1) if newLatestBalance.Cmp(expectBalanceEqual) != 0 { - t.Fatalf("FAIL (%s): Incorrect balance on account %s after withdrawals applied: want=%d, got=%d", t.TestName, addr, expectBalanceEqual, latestBalance) + t.Fatalf( + "FAIL (%s): Incorrect balance on account %s after withdrawals applied: want=%d, got=%d", + t.TestName, addr, expectBalanceEqual, latestBalance, + ) } } } @@ -1321,7 +1303,7 @@ func (ws *WithdrawalsReorgSpec) Execute(t *test.Env) { // t.CLMock.AddEngineClient(secondaryEngine) var ( - canonicalStartAccount = big.NewInt(0x1000) + canonicalStartAccount = ws.GetWithdrawalsStartAccount() canonicalNextIndex = uint64(0) sidechainStartAccount = new(big.Int).SetBit(common.Big0, 160, 1) sidechainNextIndex = uint64(0) From c8c52d6f6c9633603d8a4dd1402cb914fcfdfa5a Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Sun, 2 Jul 2023 00:05:27 +0300 Subject: [PATCH 20/27] feat(helper): add interface compliance checks --- simulators/ethereum/engine/helper/core.go | 37 +++++++++++++---------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/simulators/ethereum/engine/helper/core.go b/simulators/ethereum/engine/helper/core.go index b32d900537..6bb2b29c12 100644 --- a/simulators/ethereum/engine/helper/core.go +++ b/simulators/ethereum/engine/helper/core.go @@ -11,6 +11,11 @@ import ( "github.com/ethereum/go-ethereum/params" ) +var ( + _ GenesisAccount = (Account)(nil) + _ Genesis = (*NethermindChainSpec)(nil) +) + type GenesisAlloc interface { // representation of a map of address to GenesisAccount, is different from each client. @@ -21,10 +26,10 @@ type GenesisAccount interface { // Balance holds the balance of the account Balance() *big.Int SetBalance(balance *big.Int) - Code() []byte + Code() string SetCode(code []byte) SetConstructor(constructor []byte) - Constructor() []byte + Constructor() string } type Genesis interface { @@ -87,7 +92,7 @@ func NewAccount() Account { // GetCode returns theaccount balance if it was set, // otherwise returns common.Big0 -func (a Account) GetBalance() *big.Int { +func (a Account) Balance() *big.Int { hexBalance, ok := a["balance"] if !ok { return common.Big0 @@ -104,7 +109,7 @@ func (a Account) SetBalance(balance *big.Int) { // GetCode returns the hex representation of code if it was set, // otherwise returns "" -func (a Account) GetCode() string { +func (a Account) Code() string { code, ok := a["code"] if !ok { return "" @@ -118,7 +123,7 @@ func (a Account) SetCode(code []byte) { // GetConstructor returns the hex representation of constructor if it was set, // otherwise returns "" -func (a Account) GetConstructor() string { +func (a Account) Constructor() string { constructor, ok := a["constructor"] if !ok { return "" @@ -345,14 +350,14 @@ func (n *NethermindChainSpec) ToBlock() *types.Block { panic("implement me") } -//func (n *NethermindChainSpec) UnmarshalJSON(bytes []byte) error { -// return json.Unmarshal(bytes, &n) -//} -// -//func (n *NethermindChainSpec) MarshalJSON() ([]byte, error) { -// bytes, err := json.Marshal(n) -// if err != nil { -// return nil, err -// } -// return bytes, nil -//} +func (n *NethermindChainSpec) UnmarshalJSON(bytes []byte) error { + return json.Unmarshal(bytes, &n) +} + +func (n *NethermindChainSpec) MarshalJSON() ([]byte, error) { + bytes, err := json.Marshal(n) + if err != nil { + return nil, err + } + return bytes, nil +} From abd80e9f070582e560401d52b4e169da0c1ac11d Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Sun, 2 Jul 2023 00:25:53 +0300 Subject: [PATCH 21/27] deps(engine): go mod vendor (requirement after go work sync) --- simulators/ethereum/engine/helper/core.go | 22 +++++++++---------- .../github.com/golang-jwt/jwt/v4/token.go | 15 +++++++++++-- simulators/ethereum/engine/vendor/modules.txt | 6 ++--- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/simulators/ethereum/engine/helper/core.go b/simulators/ethereum/engine/helper/core.go index 6bb2b29c12..39e4c4b852 100644 --- a/simulators/ethereum/engine/helper/core.go +++ b/simulators/ethereum/engine/helper/core.go @@ -13,7 +13,7 @@ import ( var ( _ GenesisAccount = (Account)(nil) - _ Genesis = (*NethermindChainSpec)(nil) + // _ Genesis = (*NethermindChainSpec)(nil) ) type GenesisAlloc interface { @@ -350,14 +350,14 @@ func (n *NethermindChainSpec) ToBlock() *types.Block { panic("implement me") } -func (n *NethermindChainSpec) UnmarshalJSON(bytes []byte) error { - return json.Unmarshal(bytes, &n) -} +// func (n *NethermindChainSpec) UnmarshalJSON(bytes []byte) error { +// return json.Unmarshal(bytes, &n) +// } -func (n *NethermindChainSpec) MarshalJSON() ([]byte, error) { - bytes, err := json.Marshal(n) - if err != nil { - return nil, err - } - return bytes, nil -} +// func (n *NethermindChainSpec) MarshalJSON() ([]byte, error) { +// bytes, err := json.Marshal(n) +// if err != nil { +// return nil, err +// } +// return bytes, nil +// } diff --git a/simulators/ethereum/engine/vendor/github.com/golang-jwt/jwt/v4/token.go b/simulators/ethereum/engine/vendor/github.com/golang-jwt/jwt/v4/token.go index 71e909ea65..786b275ce0 100644 --- a/simulators/ethereum/engine/vendor/github.com/golang-jwt/jwt/v4/token.go +++ b/simulators/ethereum/engine/vendor/github.com/golang-jwt/jwt/v4/token.go @@ -14,6 +14,12 @@ import ( // To use the non-recommended decoding, set this boolean to `true` prior to using this package. var DecodePaddingAllowed bool +// DecodeStrict will switch the codec used for decoding JWTs into strict mode. +// In this mode, the decoder requires that trailing padding bits are zero, as described in RFC 4648 section 3.5. +// Note that this is a global variable, and updating it will change the behavior on a package level, and is also NOT go-routine safe. +// To use strict decoding, set this boolean to `true` prior to using this package. +var DecodeStrict bool + // TimeFunc provides the current time when parsing token to validate "exp" claim (expiration time). // You can override it to use another time value. This is useful for testing or if your // server uses a different time zone than your tokens. @@ -121,12 +127,17 @@ func EncodeSegment(seg []byte) string { // Deprecated: In a future release, we will demote this function to a non-exported function, since it // should only be used internally func DecodeSegment(seg string) ([]byte, error) { + encoding := base64.RawURLEncoding + if DecodePaddingAllowed { if l := len(seg) % 4; l > 0 { seg += strings.Repeat("=", 4-l) } - return base64.URLEncoding.DecodeString(seg) + encoding = base64.URLEncoding } - return base64.RawURLEncoding.DecodeString(seg) + if DecodeStrict { + encoding = encoding.Strict() + } + return encoding.DecodeString(seg) } diff --git a/simulators/ethereum/engine/vendor/modules.txt b/simulators/ethereum/engine/vendor/modules.txt index 586497bffd..a01d76dce9 100644 --- a/simulators/ethereum/engine/vendor/modules.txt +++ b/simulators/ethereum/engine/vendor/modules.txt @@ -14,6 +14,8 @@ github.com/beorn7/perks/quantile ## explicit; go 1.17 github.com/btcsuite/btcd/btcec/v2 github.com/btcsuite/btcd/btcec/v2/ecdsa +# github.com/cespare/cp v1.1.1 +## explicit # github.com/cespare/xxhash/v2 v2.2.0 ## explicit; go 1.11 github.com/cespare/xxhash/v2 @@ -217,8 +219,6 @@ github.com/ethereum/go-ethereum/trie ## explicit; go 1.18 github.com/ethereum/hive/hivesim github.com/ethereum/hive/internal/simapi -# github.com/ethereum/hive/simulators/ethereum/rpc v0.0.0-20230526161643-a5c0542ee4ac -## explicit; go 1.18 # github.com/fjl/memsize v0.0.1 ## explicit github.com/fjl/memsize @@ -253,7 +253,7 @@ github.com/gogo/protobuf/proto github.com/gogo/protobuf/protoc-gen-gogo/descriptor github.com/gogo/protobuf/sortkeys github.com/gogo/protobuf/types -# github.com/golang-jwt/jwt/v4 v4.4.3 +# github.com/golang-jwt/jwt/v4 v4.5.0 ## explicit; go 1.16 github.com/golang-jwt/jwt/v4 # github.com/golang/protobuf v1.5.2 From 0ee53de59a6bf229eacf0444ca1c87c7f15303c3 Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Sun, 2 Jul 2023 21:47:15 +0300 Subject: [PATCH 22/27] chore(helper): remove commented code --- simulators/ethereum/engine/helper/core.go | 26 --------------------- simulators/ethereum/engine/helper/helper.go | 10 -------- 2 files changed, 36 deletions(-) diff --git a/simulators/ethereum/engine/helper/core.go b/simulators/ethereum/engine/helper/core.go index 39e4c4b852..61c6ae64fb 100644 --- a/simulators/ethereum/engine/helper/core.go +++ b/simulators/ethereum/engine/helper/core.go @@ -54,7 +54,6 @@ type Genesis interface { UpdateTimestamp(timestamp string) // Used for testing - Number() uint64 GasUsed() uint64 ParentHash() common.Hash @@ -63,17 +62,10 @@ type Genesis interface { ToBlock() *types.Block // Marshalling and Unmarshalling interfaces - json.Unmarshaler json.Marshaler } -//type PricingStruct struct { -// Price map[string]map[string]uint64 `json:"price,omitempty"` -//} - -//type Pricing map[string]PricingStruct - type Builtin struct { Name string `json:"name,omitempty"` Pricing map[string]interface{} `json:"pricing,omitempty"` @@ -81,11 +73,6 @@ type Builtin struct { type Account map[string]interface{} -// struct { -// Balance string `json:"balance,omitempty"` -// Constructor string `json:"constructor,omitempty"` -// Builtin Builtin `json:"builtin,omitempty"` -// } func NewAccount() Account { return make(Account, 0) } @@ -236,7 +223,6 @@ func (n *NethermindChainSpec) Config() *params.ChainConfig { return nil } - //shangai := big.NewInt(0).SetBytes(common.Hex2Bytes(n.Params.Eip4895TransitionTimestamp)).Uint64() return ¶ms.ChainConfig{ ChainID: chainID, TerminalTotalDifficulty: big.NewInt(ttd), @@ -349,15 +335,3 @@ func (n *NethermindChainSpec) ToBlock() *types.Block { //TODO implement me panic("implement me") } - -// func (n *NethermindChainSpec) UnmarshalJSON(bytes []byte) error { -// return json.Unmarshal(bytes, &n) -// } - -// func (n *NethermindChainSpec) MarshalJSON() ([]byte, error) { -// bytes, err := json.Marshal(n) -// if err != nil { -// return nil, err -// } -// return bytes, nil -// } diff --git a/simulators/ethereum/engine/helper/helper.go b/simulators/ethereum/engine/helper/helper.go index a440db9dbd..0d4e7569dc 100644 --- a/simulators/ethereum/engine/helper/helper.go +++ b/simulators/ethereum/engine/helper/helper.go @@ -235,16 +235,6 @@ func LoadGenesisTest(path string) string { if err != nil { panic(fmt.Errorf("can't to read genesis file: %v", err)) } - - //var genesis NethermindChainSpec - //err = genesis.UnmarshalJSON(contents) - //if err != nil { - // return nil - //} - //if err := json.Unmarshal(contents, &genesis); err != nil { - // panic(fmt.Errorf("can't parse genesis JSON: %v", err)) - //} - //return Genesis(&genesis) return string(contents) } From 5d2fcf68a27c75f23d00e6c7b3ab39e66b7ecd7e Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Sun, 2 Jul 2023 21:50:17 +0300 Subject: [PATCH 23/27] chore(libgno): simplify declaration --- simulators/ethereum/engine/libgno/gno.go | 42 +++++++++++++----------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/simulators/ethereum/engine/libgno/gno.go b/simulators/ethereum/engine/libgno/gno.go index 6a40bdaf54..381f2be1de 100644 --- a/simulators/ethereum/engine/libgno/gno.go +++ b/simulators/ethereum/engine/libgno/gno.go @@ -10,30 +10,32 @@ import ( "github.com/ethereum/go-ethereum/common" ) -// MAX_FAILED_WITHDRAWALS_TO_PROCESS represents the maximum number of failed withdrawals to process. -const MAX_FAILED_WITHDRAWALS_TO_PROCESS = 4 - -const GAS_LIMIT = 1000000 +const ( + // MAX_FAILED_WITHDRAWALS_TO_PROCESS represents the maximum number of failed withdrawals to process. + MAX_FAILED_WITHDRAWALS_TO_PROCESS = 4 + GAS_LIMIT = 1000000 +) -// SYSTEM_SENDER represents the address of the system sender. -// var SYSTEM_SENDER = common.HexToAddress("0xfffffffffffffffffffffffffffffffffffffffe") -var GNOTokenAddress = common.HexToAddress("0xbabe2bed00000000000000000000000000000002") -var WithdrawalsContractAddress = common.HexToAddress("0xbabe2bed00000000000000000000000000000003") +var ( + // SYSTEM_SENDER represents the address of the system sender. + // var SYSTEM_SENDER = common.HexToAddress("0xfffffffffffffffffffffffffffffffffffffffe") + GNOTokenAddress = common.HexToAddress("0xbabe2bed00000000000000000000000000000002") + WithdrawalsContractAddress = common.HexToAddress("0xbabe2bed00000000000000000000000000000003") -// GNOWithdrawalContractABI represents the path to the GNO withdrawal contract ABI. -// -//go:embed withdrawals.json -var GNOWithdrawalContractABI string + // GNOWithdrawalContractABI represents the path to the GNO withdrawal contract ABI. + // + //go:embed withdrawals.json + GNOWithdrawalContractABI string -// GNOTokenContractABI represents the path to the GNO token contract ABI. -// -//go:embed sbctoken.json -var GNOTokenContractABI string + // GNOTokenContractABI represents the path to the GNO token contract ABI. + // + //go:embed sbctoken.json + GNOTokenContractABI string -var ErrorAmountAndAddressDifferentLength = fmt.Errorf("amount and addresses must be the same length") -var ErrorLoadingWithdrawalContract = fmt.Errorf("error loading withdrawal contract") -var ErrorLoadingGNOTokenContract = fmt.Errorf("error loading gno token contract") -var ErrorPackingArguments = fmt.Errorf("error packing arguments") + ErrorAmountAndAddressDifferentLength = fmt.Errorf("amount and addresses must be the same length") + ErrorLoadingWithdrawalContract = fmt.Errorf("error loading withdrawal contract") + ErrorLoadingGNOTokenContract = fmt.Errorf("error loading gno token contract") +) // ExecuteSystemWithdrawal gets the byte code to execute a system withdrawal. func ExecuteSystemWithdrawal(maxNumberOfFailedWithdrawalsToProcess uint64, amount []uint64, addresses []common.Address) ([]byte, error) { From d7906ef4ba2af4054bdf2418cb0521c33655d838 Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Sun, 2 Jul 2023 21:53:27 +0300 Subject: [PATCH 24/27] chore(helper): add interface compliance check --- simulators/ethereum/engine/helper/helper.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/simulators/ethereum/engine/helper/helper.go b/simulators/ethereum/engine/helper/helper.go index 0d4e7569dc..6bcc83c70f 100644 --- a/simulators/ethereum/engine/helper/helper.go +++ b/simulators/ethereum/engine/helper/helper.go @@ -387,6 +387,8 @@ const ( DynamicFeeTxOnly ) +var _ TransactionCreator = (*BaseTransactionCreator)(nil) + type TransactionCreator interface { MakeTransaction(nonce uint64) (*types.Transaction, error) } From 910ea3d1b5a59de1a5bb14bcb9192c8fe0c0b0cc Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Sun, 2 Jul 2023 21:57:42 +0300 Subject: [PATCH 25/27] fix(libgno): return accidently removed variable --- simulators/ethereum/engine/libgno/gno.go | 1 + 1 file changed, 1 insertion(+) diff --git a/simulators/ethereum/engine/libgno/gno.go b/simulators/ethereum/engine/libgno/gno.go index 381f2be1de..ad73db28ef 100644 --- a/simulators/ethereum/engine/libgno/gno.go +++ b/simulators/ethereum/engine/libgno/gno.go @@ -35,6 +35,7 @@ var ( ErrorAmountAndAddressDifferentLength = fmt.Errorf("amount and addresses must be the same length") ErrorLoadingWithdrawalContract = fmt.Errorf("error loading withdrawal contract") ErrorLoadingGNOTokenContract = fmt.Errorf("error loading gno token contract") + ErrorPackingArguments = fmt.Errorf("error packing arguments") ) // ExecuteSystemWithdrawal gets the byte code to execute a system withdrawal. From a57d8dfd2883744ada6e3e9702e872f203ccc9da Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Mon, 3 Jul 2023 17:54:27 +0300 Subject: [PATCH 26/27] refactor(libgno): simplifications and comments --- simulators/ethereum/engine/libgno/gno.go | 26 +- .../engine/suites/withdrawals/tests.go | 2 +- vendor/modules.txt | 478 ++++++++++++++++++ 3 files changed, 492 insertions(+), 14 deletions(-) create mode 100644 vendor/modules.txt diff --git a/simulators/ethereum/engine/libgno/gno.go b/simulators/ethereum/engine/libgno/gno.go index ad73db28ef..c0fea3682b 100644 --- a/simulators/ethereum/engine/libgno/gno.go +++ b/simulators/ethereum/engine/libgno/gno.go @@ -43,9 +43,9 @@ func ExecuteSystemWithdrawal(maxNumberOfFailedWithdrawalsToProcess uint64, amoun if len(amount) != len(addresses) { return []byte{}, ErrorAmountAndAddressDifferentLength } - withdrawalABI, err := abi.JSON(strings.NewReader(GNOWithdrawalContractABI)) + withdrawalABI, err := GetWithdrawalsABI() if err != nil { - return []byte{}, ErrorLoadingWithdrawalContract + return []byte{}, err } dataBytes, err := withdrawalABI.Pack("executeSystemWithdrawals", big.NewInt(int64(maxNumberOfFailedWithdrawalsToProcess)), amount, addresses) if err != nil { @@ -55,11 +55,11 @@ func ExecuteSystemWithdrawal(maxNumberOfFailedWithdrawalsToProcess uint64, amoun return dataBytes, nil } -// CreateClaimWithdrawalsPayload creates the Tx payload for claimWithdrawals call. -func CreateClaimWithdrawalsPayload(addresses []common.Address) ([]byte, error) { - withdrawalABI, err := abi.JSON(strings.NewReader(GNOWithdrawalContractABI)) +// ClaimWithdrawalsData return the Tx calldata for "claimWithdrawals" call. +func ClaimWithdrawalsData(addresses []common.Address) ([]byte, error) { + withdrawalABI, err := GetWithdrawalsABI() if err != nil { - return []byte{}, ErrorLoadingWithdrawalContract + return []byte{}, err } dataBytes, err := withdrawalABI.Pack("claimWithdrawals", addresses) if err != nil { @@ -69,11 +69,11 @@ func CreateClaimWithdrawalsPayload(addresses []common.Address) ([]byte, error) { return dataBytes, nil } -// BalanceOfAddressData return contract method to get the balance of a GNO token. +// BalanceOfAddressData return the Tx calldata for "balanceOf" call. func BalanceOfAddressData(account common.Address) ([]byte, error) { - gnoTokenABI, err := abi.JSON(strings.NewReader(GNOTokenContractABI)) + gnoTokenABI, err := GetGNOTokenABI() if err != nil { - return []byte{}, ErrorLoadingGNOTokenContract + return []byte{}, err } dataBytes, err := gnoTokenABI.Pack("balanceOf", account) if err != nil { @@ -82,11 +82,11 @@ func BalanceOfAddressData(account common.Address) ([]byte, error) { return dataBytes, nil } -// BalanceOfAddressData return contract method to get the balance of a GNO token. +// TransferData return the Tx calldata for "Transfer" call. func TransferData(recipient common.Address, amount *big.Int) ([]byte, error) { - gnoTokenABI, err := abi.JSON(strings.NewReader(GNOTokenContractABI)) + gnoTokenABI, err := GetGNOTokenABI() if err != nil { - return []byte{}, ErrorLoadingGNOTokenContract + return []byte{}, err } dataBytes, err := gnoTokenABI.Pack("transfer", recipient, amount) if err != nil { @@ -108,7 +108,7 @@ func GetGNOTokenABI() (*abi.ABI, error) { func GetWithdrawalsABI() (*abi.ABI, error) { withdrawalsABI, err := abi.JSON(strings.NewReader(GNOWithdrawalContractABI)) if err != nil { - return nil, ErrorLoadingWithdrawalContract + return nil, fmt.Errorf("%w: %w", ErrorLoadingWithdrawalContract, err) } return &withdrawalsABI, nil } diff --git a/simulators/ethereum/engine/suites/withdrawals/tests.go b/simulators/ethereum/engine/suites/withdrawals/tests.go index 040142dc20..ce260068b7 100644 --- a/simulators/ethereum/engine/suites/withdrawals/tests.go +++ b/simulators/ethereum/engine/suites/withdrawals/tests.go @@ -1023,7 +1023,7 @@ func (ws *WithdrawalsBaseSpec) Execute(t *test.Env) { addresses = append(addresses, w.Address) } // Send claim transaction - claims, err := libgno.CreateClaimWithdrawalsPayload(addresses) + claims, err := libgno.ClaimWithdrawalsData(addresses) if err != nil { t.Fatalf("FAIL (%s): Cant create claimWithdrawals transaction payload: %v", t.TestName, err) } diff --git a/vendor/modules.txt b/vendor/modules.txt new file mode 100644 index 0000000000..11f74ebf40 --- /dev/null +++ b/vendor/modules.txt @@ -0,0 +1,478 @@ +# github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 +## explicit; go 1.16 +github.com/Azure/go-ansiterm +github.com/Azure/go-ansiterm/winterm +# github.com/DataDog/zstd v1.5.2 +## explicit; go 1.14 +github.com/DataDog/zstd +# github.com/Microsoft/go-winio v0.5.2 +## explicit; go 1.13 +github.com/Microsoft/go-winio +github.com/Microsoft/go-winio/pkg/guid +github.com/Microsoft/go-winio/pkg/security +github.com/Microsoft/go-winio/vhd +# github.com/Microsoft/hcsshim v0.9.6 +## explicit; go 1.13 +github.com/Microsoft/hcsshim +github.com/Microsoft/hcsshim/computestorage +github.com/Microsoft/hcsshim/internal/cow +github.com/Microsoft/hcsshim/internal/hcs +github.com/Microsoft/hcsshim/internal/hcs/schema1 +github.com/Microsoft/hcsshim/internal/hcs/schema2 +github.com/Microsoft/hcsshim/internal/hcserror +github.com/Microsoft/hcsshim/internal/hns +github.com/Microsoft/hcsshim/internal/interop +github.com/Microsoft/hcsshim/internal/jobobject +github.com/Microsoft/hcsshim/internal/log +github.com/Microsoft/hcsshim/internal/logfields +github.com/Microsoft/hcsshim/internal/longpath +github.com/Microsoft/hcsshim/internal/mergemaps +github.com/Microsoft/hcsshim/internal/oc +github.com/Microsoft/hcsshim/internal/queue +github.com/Microsoft/hcsshim/internal/safefile +github.com/Microsoft/hcsshim/internal/timeout +github.com/Microsoft/hcsshim/internal/vmcompute +github.com/Microsoft/hcsshim/internal/wclayer +github.com/Microsoft/hcsshim/internal/winapi +github.com/Microsoft/hcsshim/osversion +# github.com/VictoriaMetrics/fastcache v1.12.0 +## explicit; go 1.13 +github.com/VictoriaMetrics/fastcache +# github.com/allegro/bigcache v1.2.1 +## explicit +# github.com/beorn7/perks v1.0.1 +## explicit; go 1.11 +github.com/beorn7/perks/quantile +# github.com/btcsuite/btcd/btcec/v2 v2.3.2 +## explicit; go 1.17 +github.com/btcsuite/btcd/btcec/v2 +github.com/btcsuite/btcd/btcec/v2/ecdsa +# github.com/cespare/xxhash/v2 v2.2.0 +## explicit; go 1.11 +github.com/cespare/xxhash/v2 +# github.com/cockroachdb/errors v1.9.1 +## explicit; go 1.13 +github.com/cockroachdb/errors +github.com/cockroachdb/errors/assert +github.com/cockroachdb/errors/barriers +github.com/cockroachdb/errors/contexttags +github.com/cockroachdb/errors/domains +github.com/cockroachdb/errors/errbase +github.com/cockroachdb/errors/errorspb +github.com/cockroachdb/errors/errutil +github.com/cockroachdb/errors/hintdetail +github.com/cockroachdb/errors/issuelink +github.com/cockroachdb/errors/markers +github.com/cockroachdb/errors/oserror +github.com/cockroachdb/errors/report +github.com/cockroachdb/errors/safedetails +github.com/cockroachdb/errors/secondary +github.com/cockroachdb/errors/stdstrings +github.com/cockroachdb/errors/telemetrykeys +github.com/cockroachdb/errors/withstack +# github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b +## explicit; go 1.16 +github.com/cockroachdb/logtags +# github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 +## explicit; go 1.19 +github.com/cockroachdb/pebble +github.com/cockroachdb/pebble/bloom +github.com/cockroachdb/pebble/internal/arenaskl +github.com/cockroachdb/pebble/internal/base +github.com/cockroachdb/pebble/internal/batchskl +github.com/cockroachdb/pebble/internal/bytealloc +github.com/cockroachdb/pebble/internal/cache +github.com/cockroachdb/pebble/internal/crc +github.com/cockroachdb/pebble/internal/fastrand +github.com/cockroachdb/pebble/internal/humanize +github.com/cockroachdb/pebble/internal/intern +github.com/cockroachdb/pebble/internal/invariants +github.com/cockroachdb/pebble/internal/keyspan +github.com/cockroachdb/pebble/internal/manifest +github.com/cockroachdb/pebble/internal/manual +github.com/cockroachdb/pebble/internal/private +github.com/cockroachdb/pebble/internal/rangedel +github.com/cockroachdb/pebble/internal/rangekey +github.com/cockroachdb/pebble/internal/rate +github.com/cockroachdb/pebble/internal/rawalloc +github.com/cockroachdb/pebble/internal/testkeys +github.com/cockroachdb/pebble/objstorage +github.com/cockroachdb/pebble/objstorage/shared +github.com/cockroachdb/pebble/record +github.com/cockroachdb/pebble/sstable +github.com/cockroachdb/pebble/vfs +github.com/cockroachdb/pebble/vfs/atomicfs +# github.com/cockroachdb/redact v1.1.3 +## explicit; go 1.14 +github.com/cockroachdb/redact +github.com/cockroachdb/redact/builder +github.com/cockroachdb/redact/interfaces +github.com/cockroachdb/redact/internal/buffer +github.com/cockroachdb/redact/internal/escape +github.com/cockroachdb/redact/internal/fmtforward +github.com/cockroachdb/redact/internal/markers +github.com/cockroachdb/redact/internal/redact +github.com/cockroachdb/redact/internal/rfmt +github.com/cockroachdb/redact/internal/rfmt/fmtsort +# github.com/containerd/cgroups v1.0.4 +## explicit; go 1.17 +github.com/containerd/cgroups/stats/v1 +# github.com/containerd/containerd v1.6.18 +## explicit; go 1.17 +github.com/containerd/containerd/pkg/userns +github.com/containerd/containerd/sys +# github.com/davecgh/go-spew v1.1.1 +## explicit +github.com/davecgh/go-spew/spew +# github.com/deckarep/golang-set/v2 v2.1.0 +## explicit; go 1.18 +github.com/deckarep/golang-set/v2 +# github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 +## explicit; go 1.17 +github.com/decred/dcrd/dcrec/secp256k1/v4 +github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa +# github.com/docker/docker v20.10.17+incompatible +## explicit +github.com/docker/docker/api/types/blkiodev +github.com/docker/docker/api/types/container +github.com/docker/docker/api/types/filters +github.com/docker/docker/api/types/mount +github.com/docker/docker/api/types/network +github.com/docker/docker/api/types/registry +github.com/docker/docker/api/types/strslice +github.com/docker/docker/api/types/swarm +github.com/docker/docker/api/types/swarm/runtime +github.com/docker/docker/api/types/versions +github.com/docker/docker/pkg/archive +github.com/docker/docker/pkg/fileutils +github.com/docker/docker/pkg/homedir +github.com/docker/docker/pkg/idtools +github.com/docker/docker/pkg/ioutils +github.com/docker/docker/pkg/jsonmessage +github.com/docker/docker/pkg/longpath +github.com/docker/docker/pkg/pools +github.com/docker/docker/pkg/stdcopy +github.com/docker/docker/pkg/system +# github.com/docker/go-connections v0.4.0 +## explicit +github.com/docker/go-connections/nat +# github.com/docker/go-units v0.4.0 +## explicit +github.com/docker/go-units +# github.com/edsrzf/mmap-go v1.1.0 +## explicit; go 1.17 +github.com/edsrzf/mmap-go +# github.com/ethereum/go-ethereum v1.11.4 +## explicit; go 1.19 +github.com/ethereum/go-ethereum/common +github.com/ethereum/go-ethereum/common/bitutil +github.com/ethereum/go-ethereum/common/hexutil +github.com/ethereum/go-ethereum/common/lru +github.com/ethereum/go-ethereum/common/math +github.com/ethereum/go-ethereum/common/mclock +github.com/ethereum/go-ethereum/common/prque +github.com/ethereum/go-ethereum/consensus +github.com/ethereum/go-ethereum/consensus/beacon +github.com/ethereum/go-ethereum/consensus/ethash +github.com/ethereum/go-ethereum/consensus/misc +github.com/ethereum/go-ethereum/core +github.com/ethereum/go-ethereum/core/bloombits +github.com/ethereum/go-ethereum/core/rawdb +github.com/ethereum/go-ethereum/core/state +github.com/ethereum/go-ethereum/core/state/snapshot +github.com/ethereum/go-ethereum/core/types +github.com/ethereum/go-ethereum/core/vm +github.com/ethereum/go-ethereum/crypto +github.com/ethereum/go-ethereum/crypto/blake2b +github.com/ethereum/go-ethereum/crypto/bls12381 +github.com/ethereum/go-ethereum/crypto/bn256 +github.com/ethereum/go-ethereum/crypto/bn256/cloudflare +github.com/ethereum/go-ethereum/crypto/bn256/google +github.com/ethereum/go-ethereum/crypto/secp256k1 +github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/include +github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src +github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/modules/recovery +github.com/ethereum/go-ethereum/ethdb +github.com/ethereum/go-ethereum/ethdb/leveldb +github.com/ethereum/go-ethereum/ethdb/memorydb +github.com/ethereum/go-ethereum/ethdb/pebble +github.com/ethereum/go-ethereum/event +github.com/ethereum/go-ethereum/internal/syncx +github.com/ethereum/go-ethereum/internal/version +github.com/ethereum/go-ethereum/log +github.com/ethereum/go-ethereum/metrics +github.com/ethereum/go-ethereum/p2p/enode +github.com/ethereum/go-ethereum/p2p/enr +github.com/ethereum/go-ethereum/p2p/netutil +github.com/ethereum/go-ethereum/params +github.com/ethereum/go-ethereum/rlp +github.com/ethereum/go-ethereum/rlp/internal/rlpstruct +github.com/ethereum/go-ethereum/rpc +github.com/ethereum/go-ethereum/trie +# github.com/ethereum/hive/hiveproxy v0.0.0-20230313101845-c7dfe88c8138 => ./hiveproxy +## explicit; go 1.18 +github.com/ethereum/hive/hiveproxy +# github.com/evanw/esbuild v0.17.6 +## explicit; go 1.13 +github.com/evanw/esbuild/internal/api_helpers +github.com/evanw/esbuild/internal/ast +github.com/evanw/esbuild/internal/bundler +github.com/evanw/esbuild/internal/cache +github.com/evanw/esbuild/internal/compat +github.com/evanw/esbuild/internal/config +github.com/evanw/esbuild/internal/css_ast +github.com/evanw/esbuild/internal/css_lexer +github.com/evanw/esbuild/internal/css_parser +github.com/evanw/esbuild/internal/css_printer +github.com/evanw/esbuild/internal/fs +github.com/evanw/esbuild/internal/graph +github.com/evanw/esbuild/internal/helpers +github.com/evanw/esbuild/internal/js_ast +github.com/evanw/esbuild/internal/js_lexer +github.com/evanw/esbuild/internal/js_parser +github.com/evanw/esbuild/internal/js_printer +github.com/evanw/esbuild/internal/linker +github.com/evanw/esbuild/internal/logger +github.com/evanw/esbuild/internal/renamer +github.com/evanw/esbuild/internal/resolver +github.com/evanw/esbuild/internal/runtime +github.com/evanw/esbuild/internal/sourcemap +github.com/evanw/esbuild/internal/xxhash +github.com/evanw/esbuild/pkg/api +# github.com/fsouza/go-dockerclient v1.8.1 +## explicit; go 1.17 +github.com/fsouza/go-dockerclient +# github.com/getsentry/sentry-go v0.18.0 +## explicit; go 1.19 +github.com/getsentry/sentry-go +github.com/getsentry/sentry-go/internal/debug +github.com/getsentry/sentry-go/internal/otel/baggage +github.com/getsentry/sentry-go/internal/otel/baggage/internal/baggage +github.com/getsentry/sentry-go/internal/ratelimit +# github.com/go-ole/go-ole v1.2.6 +## explicit; go 1.12 +github.com/go-ole/go-ole +github.com/go-ole/go-ole/oleutil +# github.com/go-stack/stack v1.8.1 +## explicit; go 1.17 +github.com/go-stack/stack +# github.com/gofrs/flock v0.8.1 +## explicit +github.com/gofrs/flock +# github.com/gogo/protobuf v1.3.2 +## explicit; go 1.15 +github.com/gogo/protobuf/gogoproto +github.com/gogo/protobuf/proto +github.com/gogo/protobuf/protoc-gen-gogo/descriptor +github.com/gogo/protobuf/sortkeys +github.com/gogo/protobuf/types +# github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da +## explicit +github.com/golang/groupcache/lru +# github.com/golang/protobuf v1.5.2 +## explicit; go 1.9 +github.com/golang/protobuf/proto +github.com/golang/protobuf/ptypes/timestamp +# github.com/golang/snappy v0.0.4 +## explicit +github.com/golang/snappy +# github.com/gorilla/mux v1.8.0 +## explicit; go 1.12 +github.com/gorilla/mux +# github.com/gorilla/websocket v1.5.0 +## explicit; go 1.12 +github.com/gorilla/websocket +# github.com/hashicorp/yamux v0.1.1 +## explicit; go 1.15 +github.com/hashicorp/yamux +# github.com/holiman/bloomfilter/v2 v2.0.3 +## explicit; go 1.15 +github.com/holiman/bloomfilter/v2 +# github.com/holiman/uint256 v1.2.1 +## explicit; go 1.13 +github.com/holiman/uint256 +# github.com/klauspost/compress v1.15.15 +## explicit; go 1.17 +github.com/klauspost/compress +github.com/klauspost/compress/fse +github.com/klauspost/compress/huff0 +github.com/klauspost/compress/internal/cpuinfo +github.com/klauspost/compress/internal/snapref +github.com/klauspost/compress/zstd +github.com/klauspost/compress/zstd/internal/xxhash +# github.com/kr/pretty v0.3.1 +## explicit; go 1.12 +github.com/kr/pretty +# github.com/kr/text v0.2.0 +## explicit +github.com/kr/text +# github.com/mattn/go-colorable v0.1.13 +## explicit; go 1.15 +github.com/mattn/go-colorable +# github.com/mattn/go-isatty v0.0.16 +## explicit; go 1.15 +github.com/mattn/go-isatty +# github.com/mattn/go-runewidth v0.0.14 +## explicit; go 1.9 +github.com/mattn/go-runewidth +# github.com/matttproud/golang_protobuf_extensions v1.0.4 +## explicit; go 1.9 +github.com/matttproud/golang_protobuf_extensions/pbutil +# github.com/moby/sys/mount v0.3.3 +## explicit; go 1.16 +github.com/moby/sys/mount +# github.com/moby/sys/mountinfo v0.6.2 +## explicit; go 1.16 +github.com/moby/sys/mountinfo +# github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 +## explicit; go 1.13 +github.com/moby/term +github.com/moby/term/windows +# github.com/morikuni/aec v1.0.0 +## explicit +github.com/morikuni/aec +# github.com/olekukonko/tablewriter v0.0.5 +## explicit; go 1.12 +github.com/olekukonko/tablewriter +# github.com/opencontainers/go-digest v1.0.0 +## explicit; go 1.13 +github.com/opencontainers/go-digest +# github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 +## explicit +github.com/opencontainers/image-spec/specs-go +github.com/opencontainers/image-spec/specs-go/v1 +# github.com/opencontainers/runc v1.1.5 +## explicit; go 1.16 +github.com/opencontainers/runc/libcontainer/user +# github.com/pkg/errors v0.9.1 +## explicit +github.com/pkg/errors +# github.com/prometheus/client_golang v1.14.0 +## explicit; go 1.17 +github.com/prometheus/client_golang/prometheus +github.com/prometheus/client_golang/prometheus/internal +# github.com/prometheus/client_model v0.3.0 +## explicit; go 1.9 +github.com/prometheus/client_model/go +# github.com/prometheus/common v0.39.0 +## explicit; go 1.17 +github.com/prometheus/common/expfmt +github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg +github.com/prometheus/common/model +# github.com/prometheus/procfs v0.9.0 +## explicit; go 1.18 +github.com/prometheus/procfs +github.com/prometheus/procfs/internal/fs +github.com/prometheus/procfs/internal/util +# github.com/rivo/uniseg v0.4.3 +## explicit; go 1.18 +github.com/rivo/uniseg +# github.com/rogpeppe/go-internal v1.9.0 +## explicit; go 1.17 +github.com/rogpeppe/go-internal/fmtsort +# github.com/shirou/gopsutil v3.21.11+incompatible +## explicit +github.com/shirou/gopsutil/cpu +github.com/shirou/gopsutil/internal/common +# github.com/sirupsen/logrus v1.9.0 +## explicit; go 1.13 +github.com/sirupsen/logrus +# github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a +## explicit; go 1.14 +github.com/syndtr/goleveldb/leveldb +github.com/syndtr/goleveldb/leveldb/cache +github.com/syndtr/goleveldb/leveldb/comparer +github.com/syndtr/goleveldb/leveldb/errors +github.com/syndtr/goleveldb/leveldb/filter +github.com/syndtr/goleveldb/leveldb/iterator +github.com/syndtr/goleveldb/leveldb/journal +github.com/syndtr/goleveldb/leveldb/memdb +github.com/syndtr/goleveldb/leveldb/opt +github.com/syndtr/goleveldb/leveldb/storage +github.com/syndtr/goleveldb/leveldb/table +github.com/syndtr/goleveldb/leveldb/util +# github.com/tklauser/go-sysconf v0.3.11 +## explicit; go 1.13 +github.com/tklauser/go-sysconf +# github.com/tklauser/numcpus v0.6.0 +## explicit; go 1.13 +github.com/tklauser/numcpus +# github.com/yusufpapurcu/wmi v1.2.2 +## explicit; go 1.16 +github.com/yusufpapurcu/wmi +# go.opencensus.io v0.23.0 +## explicit; go 1.13 +go.opencensus.io +go.opencensus.io/internal +go.opencensus.io/trace +go.opencensus.io/trace/internal +go.opencensus.io/trace/tracestate +# golang.org/x/crypto v0.4.0 +## explicit; go 1.17 +golang.org/x/crypto/ripemd160 +golang.org/x/crypto/sha3 +# golang.org/x/exp v0.0.0-20230206171751-46f607a40771 +## explicit; go 1.18 +golang.org/x/exp/constraints +golang.org/x/exp/rand +# golang.org/x/net v0.7.0 +## explicit; go 1.17 +golang.org/x/net/html +golang.org/x/net/html/atom +# golang.org/x/sys v0.5.0 +## explicit; go 1.17 +golang.org/x/sys/cpu +golang.org/x/sys/execabs +golang.org/x/sys/internal/unsafeheader +golang.org/x/sys/unix +golang.org/x/sys/windows +# golang.org/x/text v0.7.0 +## explicit; go 1.17 +golang.org/x/text/cases +golang.org/x/text/internal +golang.org/x/text/internal/language +golang.org/x/text/internal/language/compact +golang.org/x/text/internal/tag +golang.org/x/text/language +golang.org/x/text/transform +golang.org/x/text/unicode/norm +# google.golang.org/protobuf v1.28.1 +## explicit; go 1.11 +google.golang.org/protobuf/encoding/prototext +google.golang.org/protobuf/encoding/protowire +google.golang.org/protobuf/internal/descfmt +google.golang.org/protobuf/internal/descopts +google.golang.org/protobuf/internal/detrand +google.golang.org/protobuf/internal/encoding/defval +google.golang.org/protobuf/internal/encoding/messageset +google.golang.org/protobuf/internal/encoding/tag +google.golang.org/protobuf/internal/encoding/text +google.golang.org/protobuf/internal/errors +google.golang.org/protobuf/internal/filedesc +google.golang.org/protobuf/internal/filetype +google.golang.org/protobuf/internal/flags +google.golang.org/protobuf/internal/genid +google.golang.org/protobuf/internal/impl +google.golang.org/protobuf/internal/order +google.golang.org/protobuf/internal/pragma +google.golang.org/protobuf/internal/set +google.golang.org/protobuf/internal/strs +google.golang.org/protobuf/internal/version +google.golang.org/protobuf/proto +google.golang.org/protobuf/reflect/protodesc +google.golang.org/protobuf/reflect/protoreflect +google.golang.org/protobuf/reflect/protoregistry +google.golang.org/protobuf/runtime/protoiface +google.golang.org/protobuf/runtime/protoimpl +google.golang.org/protobuf/types/descriptorpb +google.golang.org/protobuf/types/known/timestamppb +# gopkg.in/inconshreveable/log15.v2 v2.0.0-20200109203555-b30bc20e4fd1 +## explicit +gopkg.in/inconshreveable/log15.v2 +# gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce +## explicit +gopkg.in/natefinch/npipe.v2 +# gopkg.in/yaml.v3 v3.0.1 +## explicit +gopkg.in/yaml.v3 +# github.com/ethereum/hive/hiveproxy => ./hiveproxy From c07b4de869f6c261d24ef49fdd78e22a687e7b87 Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Mon, 3 Jul 2023 18:44:10 +0300 Subject: [PATCH 27/27] chore: removed root lvl vendor --- vendor/modules.txt | 478 --------------------------------------------- 1 file changed, 478 deletions(-) delete mode 100644 vendor/modules.txt diff --git a/vendor/modules.txt b/vendor/modules.txt deleted file mode 100644 index 11f74ebf40..0000000000 --- a/vendor/modules.txt +++ /dev/null @@ -1,478 +0,0 @@ -# github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 -## explicit; go 1.16 -github.com/Azure/go-ansiterm -github.com/Azure/go-ansiterm/winterm -# github.com/DataDog/zstd v1.5.2 -## explicit; go 1.14 -github.com/DataDog/zstd -# github.com/Microsoft/go-winio v0.5.2 -## explicit; go 1.13 -github.com/Microsoft/go-winio -github.com/Microsoft/go-winio/pkg/guid -github.com/Microsoft/go-winio/pkg/security -github.com/Microsoft/go-winio/vhd -# github.com/Microsoft/hcsshim v0.9.6 -## explicit; go 1.13 -github.com/Microsoft/hcsshim -github.com/Microsoft/hcsshim/computestorage -github.com/Microsoft/hcsshim/internal/cow -github.com/Microsoft/hcsshim/internal/hcs -github.com/Microsoft/hcsshim/internal/hcs/schema1 -github.com/Microsoft/hcsshim/internal/hcs/schema2 -github.com/Microsoft/hcsshim/internal/hcserror -github.com/Microsoft/hcsshim/internal/hns -github.com/Microsoft/hcsshim/internal/interop -github.com/Microsoft/hcsshim/internal/jobobject -github.com/Microsoft/hcsshim/internal/log -github.com/Microsoft/hcsshim/internal/logfields -github.com/Microsoft/hcsshim/internal/longpath -github.com/Microsoft/hcsshim/internal/mergemaps -github.com/Microsoft/hcsshim/internal/oc -github.com/Microsoft/hcsshim/internal/queue -github.com/Microsoft/hcsshim/internal/safefile -github.com/Microsoft/hcsshim/internal/timeout -github.com/Microsoft/hcsshim/internal/vmcompute -github.com/Microsoft/hcsshim/internal/wclayer -github.com/Microsoft/hcsshim/internal/winapi -github.com/Microsoft/hcsshim/osversion -# github.com/VictoriaMetrics/fastcache v1.12.0 -## explicit; go 1.13 -github.com/VictoriaMetrics/fastcache -# github.com/allegro/bigcache v1.2.1 -## explicit -# github.com/beorn7/perks v1.0.1 -## explicit; go 1.11 -github.com/beorn7/perks/quantile -# github.com/btcsuite/btcd/btcec/v2 v2.3.2 -## explicit; go 1.17 -github.com/btcsuite/btcd/btcec/v2 -github.com/btcsuite/btcd/btcec/v2/ecdsa -# github.com/cespare/xxhash/v2 v2.2.0 -## explicit; go 1.11 -github.com/cespare/xxhash/v2 -# github.com/cockroachdb/errors v1.9.1 -## explicit; go 1.13 -github.com/cockroachdb/errors -github.com/cockroachdb/errors/assert -github.com/cockroachdb/errors/barriers -github.com/cockroachdb/errors/contexttags -github.com/cockroachdb/errors/domains -github.com/cockroachdb/errors/errbase -github.com/cockroachdb/errors/errorspb -github.com/cockroachdb/errors/errutil -github.com/cockroachdb/errors/hintdetail -github.com/cockroachdb/errors/issuelink -github.com/cockroachdb/errors/markers -github.com/cockroachdb/errors/oserror -github.com/cockroachdb/errors/report -github.com/cockroachdb/errors/safedetails -github.com/cockroachdb/errors/secondary -github.com/cockroachdb/errors/stdstrings -github.com/cockroachdb/errors/telemetrykeys -github.com/cockroachdb/errors/withstack -# github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b -## explicit; go 1.16 -github.com/cockroachdb/logtags -# github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 -## explicit; go 1.19 -github.com/cockroachdb/pebble -github.com/cockroachdb/pebble/bloom -github.com/cockroachdb/pebble/internal/arenaskl -github.com/cockroachdb/pebble/internal/base -github.com/cockroachdb/pebble/internal/batchskl -github.com/cockroachdb/pebble/internal/bytealloc -github.com/cockroachdb/pebble/internal/cache -github.com/cockroachdb/pebble/internal/crc -github.com/cockroachdb/pebble/internal/fastrand -github.com/cockroachdb/pebble/internal/humanize -github.com/cockroachdb/pebble/internal/intern -github.com/cockroachdb/pebble/internal/invariants -github.com/cockroachdb/pebble/internal/keyspan -github.com/cockroachdb/pebble/internal/manifest -github.com/cockroachdb/pebble/internal/manual -github.com/cockroachdb/pebble/internal/private -github.com/cockroachdb/pebble/internal/rangedel -github.com/cockroachdb/pebble/internal/rangekey -github.com/cockroachdb/pebble/internal/rate -github.com/cockroachdb/pebble/internal/rawalloc -github.com/cockroachdb/pebble/internal/testkeys -github.com/cockroachdb/pebble/objstorage -github.com/cockroachdb/pebble/objstorage/shared -github.com/cockroachdb/pebble/record -github.com/cockroachdb/pebble/sstable -github.com/cockroachdb/pebble/vfs -github.com/cockroachdb/pebble/vfs/atomicfs -# github.com/cockroachdb/redact v1.1.3 -## explicit; go 1.14 -github.com/cockroachdb/redact -github.com/cockroachdb/redact/builder -github.com/cockroachdb/redact/interfaces -github.com/cockroachdb/redact/internal/buffer -github.com/cockroachdb/redact/internal/escape -github.com/cockroachdb/redact/internal/fmtforward -github.com/cockroachdb/redact/internal/markers -github.com/cockroachdb/redact/internal/redact -github.com/cockroachdb/redact/internal/rfmt -github.com/cockroachdb/redact/internal/rfmt/fmtsort -# github.com/containerd/cgroups v1.0.4 -## explicit; go 1.17 -github.com/containerd/cgroups/stats/v1 -# github.com/containerd/containerd v1.6.18 -## explicit; go 1.17 -github.com/containerd/containerd/pkg/userns -github.com/containerd/containerd/sys -# github.com/davecgh/go-spew v1.1.1 -## explicit -github.com/davecgh/go-spew/spew -# github.com/deckarep/golang-set/v2 v2.1.0 -## explicit; go 1.18 -github.com/deckarep/golang-set/v2 -# github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 -## explicit; go 1.17 -github.com/decred/dcrd/dcrec/secp256k1/v4 -github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa -# github.com/docker/docker v20.10.17+incompatible -## explicit -github.com/docker/docker/api/types/blkiodev -github.com/docker/docker/api/types/container -github.com/docker/docker/api/types/filters -github.com/docker/docker/api/types/mount -github.com/docker/docker/api/types/network -github.com/docker/docker/api/types/registry -github.com/docker/docker/api/types/strslice -github.com/docker/docker/api/types/swarm -github.com/docker/docker/api/types/swarm/runtime -github.com/docker/docker/api/types/versions -github.com/docker/docker/pkg/archive -github.com/docker/docker/pkg/fileutils -github.com/docker/docker/pkg/homedir -github.com/docker/docker/pkg/idtools -github.com/docker/docker/pkg/ioutils -github.com/docker/docker/pkg/jsonmessage -github.com/docker/docker/pkg/longpath -github.com/docker/docker/pkg/pools -github.com/docker/docker/pkg/stdcopy -github.com/docker/docker/pkg/system -# github.com/docker/go-connections v0.4.0 -## explicit -github.com/docker/go-connections/nat -# github.com/docker/go-units v0.4.0 -## explicit -github.com/docker/go-units -# github.com/edsrzf/mmap-go v1.1.0 -## explicit; go 1.17 -github.com/edsrzf/mmap-go -# github.com/ethereum/go-ethereum v1.11.4 -## explicit; go 1.19 -github.com/ethereum/go-ethereum/common -github.com/ethereum/go-ethereum/common/bitutil -github.com/ethereum/go-ethereum/common/hexutil -github.com/ethereum/go-ethereum/common/lru -github.com/ethereum/go-ethereum/common/math -github.com/ethereum/go-ethereum/common/mclock -github.com/ethereum/go-ethereum/common/prque -github.com/ethereum/go-ethereum/consensus -github.com/ethereum/go-ethereum/consensus/beacon -github.com/ethereum/go-ethereum/consensus/ethash -github.com/ethereum/go-ethereum/consensus/misc -github.com/ethereum/go-ethereum/core -github.com/ethereum/go-ethereum/core/bloombits -github.com/ethereum/go-ethereum/core/rawdb -github.com/ethereum/go-ethereum/core/state -github.com/ethereum/go-ethereum/core/state/snapshot -github.com/ethereum/go-ethereum/core/types -github.com/ethereum/go-ethereum/core/vm -github.com/ethereum/go-ethereum/crypto -github.com/ethereum/go-ethereum/crypto/blake2b -github.com/ethereum/go-ethereum/crypto/bls12381 -github.com/ethereum/go-ethereum/crypto/bn256 -github.com/ethereum/go-ethereum/crypto/bn256/cloudflare -github.com/ethereum/go-ethereum/crypto/bn256/google -github.com/ethereum/go-ethereum/crypto/secp256k1 -github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/include -github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src -github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/modules/recovery -github.com/ethereum/go-ethereum/ethdb -github.com/ethereum/go-ethereum/ethdb/leveldb -github.com/ethereum/go-ethereum/ethdb/memorydb -github.com/ethereum/go-ethereum/ethdb/pebble -github.com/ethereum/go-ethereum/event -github.com/ethereum/go-ethereum/internal/syncx -github.com/ethereum/go-ethereum/internal/version -github.com/ethereum/go-ethereum/log -github.com/ethereum/go-ethereum/metrics -github.com/ethereum/go-ethereum/p2p/enode -github.com/ethereum/go-ethereum/p2p/enr -github.com/ethereum/go-ethereum/p2p/netutil -github.com/ethereum/go-ethereum/params -github.com/ethereum/go-ethereum/rlp -github.com/ethereum/go-ethereum/rlp/internal/rlpstruct -github.com/ethereum/go-ethereum/rpc -github.com/ethereum/go-ethereum/trie -# github.com/ethereum/hive/hiveproxy v0.0.0-20230313101845-c7dfe88c8138 => ./hiveproxy -## explicit; go 1.18 -github.com/ethereum/hive/hiveproxy -# github.com/evanw/esbuild v0.17.6 -## explicit; go 1.13 -github.com/evanw/esbuild/internal/api_helpers -github.com/evanw/esbuild/internal/ast -github.com/evanw/esbuild/internal/bundler -github.com/evanw/esbuild/internal/cache -github.com/evanw/esbuild/internal/compat -github.com/evanw/esbuild/internal/config -github.com/evanw/esbuild/internal/css_ast -github.com/evanw/esbuild/internal/css_lexer -github.com/evanw/esbuild/internal/css_parser -github.com/evanw/esbuild/internal/css_printer -github.com/evanw/esbuild/internal/fs -github.com/evanw/esbuild/internal/graph -github.com/evanw/esbuild/internal/helpers -github.com/evanw/esbuild/internal/js_ast -github.com/evanw/esbuild/internal/js_lexer -github.com/evanw/esbuild/internal/js_parser -github.com/evanw/esbuild/internal/js_printer -github.com/evanw/esbuild/internal/linker -github.com/evanw/esbuild/internal/logger -github.com/evanw/esbuild/internal/renamer -github.com/evanw/esbuild/internal/resolver -github.com/evanw/esbuild/internal/runtime -github.com/evanw/esbuild/internal/sourcemap -github.com/evanw/esbuild/internal/xxhash -github.com/evanw/esbuild/pkg/api -# github.com/fsouza/go-dockerclient v1.8.1 -## explicit; go 1.17 -github.com/fsouza/go-dockerclient -# github.com/getsentry/sentry-go v0.18.0 -## explicit; go 1.19 -github.com/getsentry/sentry-go -github.com/getsentry/sentry-go/internal/debug -github.com/getsentry/sentry-go/internal/otel/baggage -github.com/getsentry/sentry-go/internal/otel/baggage/internal/baggage -github.com/getsentry/sentry-go/internal/ratelimit -# github.com/go-ole/go-ole v1.2.6 -## explicit; go 1.12 -github.com/go-ole/go-ole -github.com/go-ole/go-ole/oleutil -# github.com/go-stack/stack v1.8.1 -## explicit; go 1.17 -github.com/go-stack/stack -# github.com/gofrs/flock v0.8.1 -## explicit -github.com/gofrs/flock -# github.com/gogo/protobuf v1.3.2 -## explicit; go 1.15 -github.com/gogo/protobuf/gogoproto -github.com/gogo/protobuf/proto -github.com/gogo/protobuf/protoc-gen-gogo/descriptor -github.com/gogo/protobuf/sortkeys -github.com/gogo/protobuf/types -# github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da -## explicit -github.com/golang/groupcache/lru -# github.com/golang/protobuf v1.5.2 -## explicit; go 1.9 -github.com/golang/protobuf/proto -github.com/golang/protobuf/ptypes/timestamp -# github.com/golang/snappy v0.0.4 -## explicit -github.com/golang/snappy -# github.com/gorilla/mux v1.8.0 -## explicit; go 1.12 -github.com/gorilla/mux -# github.com/gorilla/websocket v1.5.0 -## explicit; go 1.12 -github.com/gorilla/websocket -# github.com/hashicorp/yamux v0.1.1 -## explicit; go 1.15 -github.com/hashicorp/yamux -# github.com/holiman/bloomfilter/v2 v2.0.3 -## explicit; go 1.15 -github.com/holiman/bloomfilter/v2 -# github.com/holiman/uint256 v1.2.1 -## explicit; go 1.13 -github.com/holiman/uint256 -# github.com/klauspost/compress v1.15.15 -## explicit; go 1.17 -github.com/klauspost/compress -github.com/klauspost/compress/fse -github.com/klauspost/compress/huff0 -github.com/klauspost/compress/internal/cpuinfo -github.com/klauspost/compress/internal/snapref -github.com/klauspost/compress/zstd -github.com/klauspost/compress/zstd/internal/xxhash -# github.com/kr/pretty v0.3.1 -## explicit; go 1.12 -github.com/kr/pretty -# github.com/kr/text v0.2.0 -## explicit -github.com/kr/text -# github.com/mattn/go-colorable v0.1.13 -## explicit; go 1.15 -github.com/mattn/go-colorable -# github.com/mattn/go-isatty v0.0.16 -## explicit; go 1.15 -github.com/mattn/go-isatty -# github.com/mattn/go-runewidth v0.0.14 -## explicit; go 1.9 -github.com/mattn/go-runewidth -# github.com/matttproud/golang_protobuf_extensions v1.0.4 -## explicit; go 1.9 -github.com/matttproud/golang_protobuf_extensions/pbutil -# github.com/moby/sys/mount v0.3.3 -## explicit; go 1.16 -github.com/moby/sys/mount -# github.com/moby/sys/mountinfo v0.6.2 -## explicit; go 1.16 -github.com/moby/sys/mountinfo -# github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 -## explicit; go 1.13 -github.com/moby/term -github.com/moby/term/windows -# github.com/morikuni/aec v1.0.0 -## explicit -github.com/morikuni/aec -# github.com/olekukonko/tablewriter v0.0.5 -## explicit; go 1.12 -github.com/olekukonko/tablewriter -# github.com/opencontainers/go-digest v1.0.0 -## explicit; go 1.13 -github.com/opencontainers/go-digest -# github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 -## explicit -github.com/opencontainers/image-spec/specs-go -github.com/opencontainers/image-spec/specs-go/v1 -# github.com/opencontainers/runc v1.1.5 -## explicit; go 1.16 -github.com/opencontainers/runc/libcontainer/user -# github.com/pkg/errors v0.9.1 -## explicit -github.com/pkg/errors -# github.com/prometheus/client_golang v1.14.0 -## explicit; go 1.17 -github.com/prometheus/client_golang/prometheus -github.com/prometheus/client_golang/prometheus/internal -# github.com/prometheus/client_model v0.3.0 -## explicit; go 1.9 -github.com/prometheus/client_model/go -# github.com/prometheus/common v0.39.0 -## explicit; go 1.17 -github.com/prometheus/common/expfmt -github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg -github.com/prometheus/common/model -# github.com/prometheus/procfs v0.9.0 -## explicit; go 1.18 -github.com/prometheus/procfs -github.com/prometheus/procfs/internal/fs -github.com/prometheus/procfs/internal/util -# github.com/rivo/uniseg v0.4.3 -## explicit; go 1.18 -github.com/rivo/uniseg -# github.com/rogpeppe/go-internal v1.9.0 -## explicit; go 1.17 -github.com/rogpeppe/go-internal/fmtsort -# github.com/shirou/gopsutil v3.21.11+incompatible -## explicit -github.com/shirou/gopsutil/cpu -github.com/shirou/gopsutil/internal/common -# github.com/sirupsen/logrus v1.9.0 -## explicit; go 1.13 -github.com/sirupsen/logrus -# github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a -## explicit; go 1.14 -github.com/syndtr/goleveldb/leveldb -github.com/syndtr/goleveldb/leveldb/cache -github.com/syndtr/goleveldb/leveldb/comparer -github.com/syndtr/goleveldb/leveldb/errors -github.com/syndtr/goleveldb/leveldb/filter -github.com/syndtr/goleveldb/leveldb/iterator -github.com/syndtr/goleveldb/leveldb/journal -github.com/syndtr/goleveldb/leveldb/memdb -github.com/syndtr/goleveldb/leveldb/opt -github.com/syndtr/goleveldb/leveldb/storage -github.com/syndtr/goleveldb/leveldb/table -github.com/syndtr/goleveldb/leveldb/util -# github.com/tklauser/go-sysconf v0.3.11 -## explicit; go 1.13 -github.com/tklauser/go-sysconf -# github.com/tklauser/numcpus v0.6.0 -## explicit; go 1.13 -github.com/tklauser/numcpus -# github.com/yusufpapurcu/wmi v1.2.2 -## explicit; go 1.16 -github.com/yusufpapurcu/wmi -# go.opencensus.io v0.23.0 -## explicit; go 1.13 -go.opencensus.io -go.opencensus.io/internal -go.opencensus.io/trace -go.opencensus.io/trace/internal -go.opencensus.io/trace/tracestate -# golang.org/x/crypto v0.4.0 -## explicit; go 1.17 -golang.org/x/crypto/ripemd160 -golang.org/x/crypto/sha3 -# golang.org/x/exp v0.0.0-20230206171751-46f607a40771 -## explicit; go 1.18 -golang.org/x/exp/constraints -golang.org/x/exp/rand -# golang.org/x/net v0.7.0 -## explicit; go 1.17 -golang.org/x/net/html -golang.org/x/net/html/atom -# golang.org/x/sys v0.5.0 -## explicit; go 1.17 -golang.org/x/sys/cpu -golang.org/x/sys/execabs -golang.org/x/sys/internal/unsafeheader -golang.org/x/sys/unix -golang.org/x/sys/windows -# golang.org/x/text v0.7.0 -## explicit; go 1.17 -golang.org/x/text/cases -golang.org/x/text/internal -golang.org/x/text/internal/language -golang.org/x/text/internal/language/compact -golang.org/x/text/internal/tag -golang.org/x/text/language -golang.org/x/text/transform -golang.org/x/text/unicode/norm -# google.golang.org/protobuf v1.28.1 -## explicit; go 1.11 -google.golang.org/protobuf/encoding/prototext -google.golang.org/protobuf/encoding/protowire -google.golang.org/protobuf/internal/descfmt -google.golang.org/protobuf/internal/descopts -google.golang.org/protobuf/internal/detrand -google.golang.org/protobuf/internal/encoding/defval -google.golang.org/protobuf/internal/encoding/messageset -google.golang.org/protobuf/internal/encoding/tag -google.golang.org/protobuf/internal/encoding/text -google.golang.org/protobuf/internal/errors -google.golang.org/protobuf/internal/filedesc -google.golang.org/protobuf/internal/filetype -google.golang.org/protobuf/internal/flags -google.golang.org/protobuf/internal/genid -google.golang.org/protobuf/internal/impl -google.golang.org/protobuf/internal/order -google.golang.org/protobuf/internal/pragma -google.golang.org/protobuf/internal/set -google.golang.org/protobuf/internal/strs -google.golang.org/protobuf/internal/version -google.golang.org/protobuf/proto -google.golang.org/protobuf/reflect/protodesc -google.golang.org/protobuf/reflect/protoreflect -google.golang.org/protobuf/reflect/protoregistry -google.golang.org/protobuf/runtime/protoiface -google.golang.org/protobuf/runtime/protoimpl -google.golang.org/protobuf/types/descriptorpb -google.golang.org/protobuf/types/known/timestamppb -# gopkg.in/inconshreveable/log15.v2 v2.0.0-20200109203555-b30bc20e4fd1 -## explicit -gopkg.in/inconshreveable/log15.v2 -# gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce -## explicit -gopkg.in/natefinch/npipe.v2 -# gopkg.in/yaml.v3 v3.0.1 -## explicit -gopkg.in/yaml.v3 -# github.com/ethereum/hive/hiveproxy => ./hiveproxy