diff --git a/contracts/starknet/Interfaces/IVotingStrategy.cairo b/contracts/starknet/Interfaces/IVotingStrategy.cairo index 45536032..e3fcb0f6 100644 --- a/contracts/starknet/Interfaces/IVotingStrategy.cairo +++ b/contracts/starknet/Interfaces/IVotingStrategy.cairo @@ -6,7 +6,7 @@ from starkware.cairo.common.uint256 import Uint256 @contract_interface namespace IVotingStrategy: func get_voting_power( - block : felt, + timestamp : felt, voter_address : Address, params_len : felt, params : felt*, diff --git a/contracts/starknet/Space.cairo b/contracts/starknet/Space.cairo index e86b3651..b32cadf8 100644 --- a/contracts/starknet/Space.cairo +++ b/contracts/starknet/Space.cairo @@ -428,7 +428,7 @@ func get_cumulative_voting_power{syscall_ptr : felt*, pedersen_ptr : HashBuiltin let (user_voting_power) = IVotingStrategy.get_voting_power( contract_address=voting_strategy, - block=current_timestamp, + timestamp=current_timestamp, voter_address=voter_address, params_len=voting_strategy_params_len, params=voting_strategy_params, @@ -680,8 +680,11 @@ func vote{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr : fe end let (proposal) = proposal_registry_store.read(proposal_id) - let (current_timestamp) = get_block_timestamp() + # The snapshot timestamp at which voting power will be taken + let snapshot_timestamp = proposal.snapshot_timestamp + + let (current_timestamp) = get_block_timestamp() # Make sure proposal is still open for voting with_attr error_message("Voting period has ended"): assert_lt(current_timestamp, proposal.max_end_timestamp) @@ -713,7 +716,7 @@ func vote{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr : fe ) let (user_voting_power) = get_cumulative_voting_power( - current_timestamp, + snapshot_timestamp, voter_address, used_voting_strategies_len, used_voting_strategies, @@ -748,7 +751,6 @@ func propose{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr : execution_hash : Uint256, metadata_uri_len : felt, metadata_uri : felt*, - ethereum_block_number : felt, executor : felt, used_voting_strategies_len : felt, used_voting_strategies : felt*, @@ -759,26 +761,23 @@ func propose{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr : ) -> (): alloc_locals - # We cannot have `0` as the `ethereum_block_number` because we rely on checking - # if it's different than 0 in `finalize_proposal`. - with_attr error_message("Invalid block number"): - assert_not_zero(ethereum_block_number) - end - # Verify that the caller is the authenticator contract. assert_valid_authenticator() # Verify that the executor address is one of the whitelisted addresses assert_valid_executor(executor) - let (current_timestamp) = get_block_timestamp() + # The snapshot for the proposal is the current timestamp at proposal creation + # We use a timestamp instead of a block number to define a snapshot so that the system can generalize to multi-chain + # TODO: Need to consider what sort of guarantees we have on the timestamp returned being correct. + let (snapshot_timestamp) = get_block_timestamp() let (delay) = voting_delay_store.read() let (_min_voting_duration) = min_voting_duration_store.read() let (_max_voting_duration) = max_voting_duration_store.read() # Define start_timestamp, min_end and max_end - let start_timestamp = current_timestamp + delay + let start_timestamp = snapshot_timestamp + delay let min_end_timestamp = start_timestamp + _min_voting_duration let max_end_timestamp = start_timestamp + _max_voting_duration @@ -788,7 +787,7 @@ func propose{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr : ) let (voting_power) = get_cumulative_voting_power( - start_timestamp, + snapshot_timestamp, proposer_address, used_voting_strategies_len, used_voting_strategies, @@ -815,10 +814,10 @@ func propose{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr : let proposal = Proposal( execution_hash, _quorum, + snapshot_timestamp, start_timestamp, min_end_timestamp, max_end_timestamp, - ethereum_block_number, hash, executor, ) @@ -862,16 +861,15 @@ func finalize_proposal{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_c let (proposal) = proposal_registry_store.read(proposal_id) with_attr error_message("Invalid proposal id"): # Checks that the proposal id exists. If it doesn't exist, then the whole `Proposal` struct will - # be set to 0, hence `ethereum_block_number` will be set to 0 too. - assert_not_zero(proposal.ethereum_block_number) + # be set to 0, hence the snapshot timestamp will be set to 0 too. + assert_not_zero(proposal.snapshot_timestamp) end # Make sure proposal period has ended - # NOTE: commented out the `with_attr` block because it needs 0.8.1 to work - # with_attr error_message("Min voting period has not elapsed"): let (current_timestamp) = get_block_timestamp() - assert_le(proposal.min_end_timestamp, current_timestamp) - # end + with_attr error_message("Min voting period has not elapsed"): + assert_le(proposal.min_end_timestamp, current_timestamp) + end # Make sure execution params match the stored hash let (recovered_hash) = hash_array(execution_params_len, execution_params) @@ -958,8 +956,8 @@ func cancel_proposal{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_che let (proposal) = proposal_registry_store.read(proposal_id) with_attr error_message("Invalid proposal id"): # Checks that the proposal id exists. If it doesn't exist, then the whole `Proposal` struct will - # be set to 0, hence `ethereum_block_number` will be set to 0 too. - assert_not_zero(proposal.ethereum_block_number) + # be set to 0, hence the snapshot timestamp will be set to 0 too. + assert_not_zero(proposal.snapshot_timestamp) end let proposal_outcome = ProposalOutcome.CANCELLED diff --git a/contracts/starknet/VotingStrategies/SingleSlotProof.cairo b/contracts/starknet/VotingStrategies/SingleSlotProof.cairo index 3f8aba1f..29599c45 100644 --- a/contracts/starknet/VotingStrategies/SingleSlotProof.cairo +++ b/contracts/starknet/VotingStrategies/SingleSlotProof.cairo @@ -8,6 +8,7 @@ from contracts.starknet.fossil.contracts.starknet.types import StorageSlot from contracts.starknet.lib.general_address import Address from contracts.starknet.lib.slot_key import get_slot_key from contracts.starknet.lib.words import words_to_uint256 +from contracts.starknet.lib.timestamp import get_eth_block_number, l1_headers_store # FactRegistry simplified interface @contract_interface @@ -33,9 +34,10 @@ end @constructor func constructor{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr}( - fact_registry : felt + fact_registry_address : felt, l1_headers_store_address : felt ): - fact_registry_store.write(value=fact_registry) + fact_registry_store.write(value=fact_registry_address) + l1_headers_store.write(value=l1_headers_store_address) return () end @@ -43,7 +45,7 @@ end func get_voting_power{ syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr, bitwise_ptr : BitwiseBuiltin* }( - block : felt, + timestamp : felt, voter_address : Address, params_len : felt, params : felt*, @@ -52,7 +54,10 @@ func get_voting_power{ ) -> (voting_power : Uint256): alloc_locals - let (local fact_registry_addr) = fact_registry_store.read() + let (fact_registry_addr) = fact_registry_store.read() + + let (eth_block_number) = get_eth_block_number(timestamp) + let eth_block_number = eth_block_number - 1 # temp shift - waiting for Fossil fix # Decoding voting strategy parameters let ( @@ -70,7 +75,11 @@ func get_voting_power{ # contract address where the desired slot resides, and the section element is the index of the slot in that contract. assert params_len = 2 let contract_address = params[0] - let slot_index = params[1] + + # In the current implementation, we cant store arrays with a zero as the last element because the read function would just treat + # the array is 1 element shorter. Hence, we offset the slot_index by 1 so that it is never zero. + # Probably worth changing our array handling so this is not necessary. + let slot_index = params[1] - 1 # Checking slot proof is for the correct slot let (valid_slot) = get_slot_key(slot_index, voter_address.value) @@ -83,7 +92,7 @@ func get_voting_power{ let (voting_power) = IFactsRegistry.get_storage_uint( fact_registry_addr, - block, + eth_block_number, contract_address, slot, proof_sizes_bytes_len, @@ -93,6 +102,7 @@ func get_voting_power{ proofs_concat_len, proofs_concat, ) + # If any part of the voting strategy calculation is invalid, the voting power returned should be zero return (voting_power) end diff --git a/contracts/starknet/VotingStrategies/Vanilla.cairo b/contracts/starknet/VotingStrategies/Vanilla.cairo index c2a97299..0dfbdd01 100644 --- a/contracts/starknet/VotingStrategies/Vanilla.cairo +++ b/contracts/starknet/VotingStrategies/Vanilla.cairo @@ -6,7 +6,7 @@ from contracts.starknet.lib.general_address import Address # Returns a voting power of 1 for every address it is queried with. @view func get_voting_power{range_check_ptr}( - block : felt, + timestamp : felt, voter_address : Address, params_len : felt, params : felt*, diff --git a/contracts/starknet/VotingStrategies/Whitelist.cairo b/contracts/starknet/VotingStrategies/Whitelist.cairo index de8a3732..7b4026b7 100644 --- a/contracts/starknet/VotingStrategies/Whitelist.cairo +++ b/contracts/starknet/VotingStrategies/Whitelist.cairo @@ -46,7 +46,7 @@ end @view func get_voting_power{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr : felt}( - block : felt, + timestamp : felt, voter_address : Address, params_len : felt, params : felt*, diff --git a/contracts/starknet/fossil b/contracts/starknet/fossil index 58ba112f..50a2a9cd 160000 --- a/contracts/starknet/fossil +++ b/contracts/starknet/fossil @@ -1 +1 @@ -Subproject commit 58ba112fe657d414910982c13ed296f87754c32a +Subproject commit 50a2a9cd11d7d1650b8411930ad3cdcf92328009 diff --git a/contracts/starknet/lib/proposal.cairo b/contracts/starknet/lib/proposal.cairo index 5a61c4f1..eb89a17d 100644 --- a/contracts/starknet/lib/proposal.cairo +++ b/contracts/starknet/lib/proposal.cairo @@ -3,10 +3,10 @@ from starkware.cairo.common.uint256 import Uint256 struct Proposal: member execution_hash : Uint256 member quorum : Uint256 + member snapshot_timestamp : felt member start_timestamp : felt member min_end_timestamp : felt member max_end_timestamp : felt - member ethereum_block_number : felt member execution_params_hash : felt member executor : felt end diff --git a/contracts/starknet/lib/timestamp.cairo b/contracts/starknet/lib/timestamp.cairo new file mode 100644 index 00000000..88d3601b --- /dev/null +++ b/contracts/starknet/lib/timestamp.cairo @@ -0,0 +1,37 @@ +%lang starknet + +from starkware.cairo.common.cairo_builtins import HashBuiltin + +@contract_interface +namespace IL1HeadersStore: + func get_latest_l1_block() -> (number : felt): + end +end + +@storage_var +func l1_headers_store() -> (res : felt): +end + +@storage_var +func timestamp_to_eth_block_number(timestamp : felt) -> (number : felt): +end + +func get_eth_block_number{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr}( + timestamp : felt +) -> (number : felt): + let (number) = timestamp_to_eth_block_number.read(timestamp) + if number != 0: + # The timestamp has already be queried in fossil and stored. Therefore we can just return the stored value + # This branch will be taken whenever a vote is cast as the mapping value would be set at proposal creation. + return (number) + else: + # The timestamp has not yet been queried in fossil. Therefore we must query Fossil for the latest eth block + # number stored there and store it here in the mapping indexed by the timestamp provided. + # This branch will be taken whenever a proposal is created, except for the (rare) case of multiple proposals + # being created in the same block. + let (l1_headers_store_address) = l1_headers_store.read() + let (number) = IL1HeadersStore.get_latest_l1_block(l1_headers_store_address) + timestamp_to_eth_block_number.write(timestamp, number) + return (number) + end +end diff --git a/scripts/deployTestSpace.ts b/scripts/deployTestSpace.ts index 51fdc67c..bd036d6a 100644 --- a/scripts/deployTestSpace.ts +++ b/scripts/deployTestSpace.ts @@ -1,16 +1,5 @@ import fs from 'fs'; -import { - Contract, - Account, - defaultProvider, - ec, - encode, - hash, - json, - number, - stark, - RawCalldata, -} from 'starknet'; +import { defaultProvider, json } from 'starknet'; import { SplitUint256 } from '../test/shared/types'; import { flatten2DArray } from '../test/shared/helpers'; diff --git a/test/crosschain/EthTxAuth.test.ts b/test/crosschain/EthTxAuth.test.ts index f884c690..2b2d258f 100644 --- a/test/crosschain/EthTxAuth.test.ts +++ b/test/crosschain/EthTxAuth.test.ts @@ -6,7 +6,7 @@ import { StarknetContract, Account, HttpNetworkConfig } from 'hardhat/types'; import { strToShortStringArr } from '@snapshot-labs/sx'; import { createExecutionHash, getCommit, getProposeCalldata } from '../shared/helpers'; import { ethTxAuthSetup } from '../shared/setup'; -import { PROPOSE_SELECTOR, VOTE_SELECTOR } from '../shared/constants'; +import { PROPOSE_SELECTOR } from '../shared/constants'; // Dummy tx const tx1 = { @@ -49,7 +49,6 @@ describe('L1 interaction with Snapshot X', function () { let userVotingParamsAll: bigint[][]; let executionStrategy: bigint; let executionParams: bigint[]; - let ethBlockNumber: bigint; let proposeCalldata: bigint[]; before(async function () { @@ -71,7 +70,6 @@ describe('L1 interaction with Snapshot X', function () { 'Hello and welcome to Snapshot X. This is the future of governance.' ); proposerEthAddress = signer.address; - ethBlockNumber = BigInt(1337); spaceAddress = BigInt(space.address); usedVotingStrategies = [BigInt(vanillaVotingStrategy.address)]; userVotingParamsAll = [[]]; @@ -81,7 +79,6 @@ describe('L1 interaction with Snapshot X', function () { proposerEthAddress, executionHash, metadataUri, - ethBlockNumber, executionStrategy, usedVotingStrategies, userVotingParamsAll, @@ -94,12 +91,12 @@ describe('L1 interaction with Snapshot X', function () { // Committing the hash of the payload to the StarkNet Commit L1 contract await starknetCommit .connect(signer) - .commit(getCommit(BigInt(space.address), PROPOSE_SELECTOR, proposeCalldata)); + .commit(getCommit(spaceAddress, PROPOSE_SELECTOR, proposeCalldata)); // Checking that the L1 -> L2 message has been propogated expect((await starknet.devnet.flush()).consumed_messages.from_l1).to.have.a.lengthOf(1); // Creating proposal await ethTxAuthenticator.invoke('authenticate', { - target: BigInt(space.address), + target: spaceAddress, function_selector: PROPOSE_SELECTOR, calldata: proposeCalldata, }); @@ -109,17 +106,17 @@ describe('L1 interaction with Snapshot X', function () { await starknet.devnet.loadL1MessagingContract(networkUrl, mockStarknetMessaging.address); await starknetCommit .connect(signer) - .commit(getCommit(BigInt(space.address), PROPOSE_SELECTOR, proposeCalldata)); + .commit(getCommit(spaceAddress, PROPOSE_SELECTOR, proposeCalldata)); await starknet.devnet.flush(); await ethTxAuthenticator.invoke('authenticate', { - target: BigInt(space.address), + target: spaceAddress, function_selector: PROPOSE_SELECTOR, calldata: proposeCalldata, }); // Second attempt at calling authenticate should fail try { await ethTxAuthenticator.invoke('authenticate', { - target: BigInt(space.address), + target: spaceAddress, function_selector: PROPOSE_SELECTOR, calldata: proposeCalldata, }); @@ -132,11 +129,11 @@ describe('L1 interaction with Snapshot X', function () { await starknet.devnet.loadL1MessagingContract(networkUrl, mockStarknetMessaging.address); await starknetCommit .connect(signer) - .commit(getCommit(BigInt(space.address), PROPOSE_SELECTOR, proposeCalldata)); // Wrong selector + .commit(getCommit(spaceAddress, PROPOSE_SELECTOR, proposeCalldata)); // Wrong selector await starknet.devnet.flush(); try { await ethTxAuthenticator.invoke('authenticate', { - target: BigInt(space.address), + target: spaceAddress, function_selector: PROPOSE_SELECTOR, calldata: proposeCalldata, }); @@ -150,11 +147,11 @@ describe('L1 interaction with Snapshot X', function () { proposeCalldata[0] = BigInt(ethers.Wallet.createRandom().address); // Random l1 address in the calldata await starknetCommit .connect(signer) - .commit(getCommit(BigInt(space.address), PROPOSE_SELECTOR, proposeCalldata)); + .commit(getCommit(spaceAddress, PROPOSE_SELECTOR, proposeCalldata)); await starknet.devnet.flush(); try { await ethTxAuthenticator.invoke('authenticate', { - target: BigInt(space.address), + target: spaceAddress, function_selector: PROPOSE_SELECTOR, calldata: proposeCalldata, }); diff --git a/test/crosschain/ZodiacExecution.test.ts b/test/crosschain/ZodiacExecution.test.ts index e8ee8c26..0bf26944 100644 --- a/test/crosschain/ZodiacExecution.test.ts +++ b/test/crosschain/ZodiacExecution.test.ts @@ -57,7 +57,6 @@ describe('Create proposal, cast vote, and send execution to l1', function () { let userVotingParamsAll1: bigint[][]; let executionStrategy: bigint; let executionParams: bigint[]; - let ethBlockNumber: bigint; let proposeCalldata: bigint[]; // Additional parameters for voting @@ -91,7 +90,6 @@ describe('Create proposal, cast vote, and send execution to l1', function () { ({ executionHash, txHashes } = createExecutionHash(zodiacModule.address, tx1, tx2)); proposerEthAddress = signer.address; - ethBlockNumber = BigInt(1337); spaceAddress = BigInt(space.address); usedVotingStrategies1 = [BigInt(vanillaVotingStrategy.address)]; userVotingParamsAll1 = [[]]; @@ -102,7 +100,6 @@ describe('Create proposal, cast vote, and send execution to l1', function () { proposerEthAddress, executionHash, metadataUri, - ethBlockNumber, executionStrategy, usedVotingStrategies1, userVotingParamsAll1, @@ -129,14 +126,14 @@ describe('Create proposal, cast vote, and send execution to l1', function () { // -- Creates a proposal -- await vanillaAuthenticator.invoke('authenticate', { - target: BigInt(space.address), + target: spaceAddress, function_selector: PROPOSE_SELECTOR, calldata: proposeCalldata, }); // -- Casts a vote FOR -- await vanillaAuthenticator.invoke('authenticate', { - target: BigInt(space.address), + target: spaceAddress, function_selector: VOTE_SELECTOR, calldata: voteCalldata, }); diff --git a/test/data/block.json b/test/data/block.json new file mode 100644 index 00000000..4d8bf323 --- /dev/null +++ b/test/data/block.json @@ -0,0 +1,415 @@ +{ + "baseFeePerGas": 99460906499, + "difficulty": "15259886720693604", + "extraData": "0x706f6f6c696e2e636f6d22bc6ba4c48c70fcc2", + "gasLimit": 29999971, + "gasUsed": 29144268, + "hash": "0x387856cf90d498fec80532ae4df987ee2eb32b9ad28bc32eb568f5e51b425d1b", + "logsBloom": "0xdfe64b874dcb398ffe319554fa75df74a1dcdcdffcf7f6e76fbffefffeecf97bdbfd317ffabefffa4efcfbfdda1dfbf75f918a0efe9bfcedfe3feb785fffff7c7f537bef7ef2d7efff7f7789efed6be27ffb25a2affa9bcfbff0be6feb6f59fd1f591fcd5ffef70effddddb2cee4ffedfbabd67b957d5c7f523ff7f7ef9d217cfb8dd71b2e65b3b7fded677fbf0fa3f77cfffdd975aaf8de69efcffef8fdcd2f7fefedbfd9ea6f3fdee3ff9ffd8fbdbb899c4bf9dee6d81fbcbf6a9ebc2b9ff95fdbfc7a6e3961ffbf8efd3bffffdd5fefebef9ff33afe7ef727f5fed6fd6ed3feffe9efbc3678d4f743bfea7df68df3eeebdc577bb3fa767fef9f7fe3b7f6ff", + "miner": "0x8F03f1a3f10c05E7CCcF75C1Fd10168e06659Be7", + "mixHash": "0x73e56d1f7d4eeddaee9dccf301504193af452a510cb4882cf58cb4c450a1ad7c", + "nonce": "0x1212ebf710999805", + "number": 14939489, + "parentHash": "0x128cd36a0f7fbecb082e0301197c0c04311063e5af90fe26f6305aff9ff0c651", + "receiptsRoot": "0x8728ef14b00e7cbdde7c110061b2724afaa73dac2f3afaf7f3154e91c236e3d6", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "size": 154460, + "stateRoot": "0xa6fc0ca57ec7ce9627695e82d806adc246879018c16079f97e59a3ef034de6a8", + "timestamp": 1654878896, + "totalDifficulty": "51354570627425815849450", + "transactions": [ + "0x68e7ffcfd85c94987a81420b37be17d1d4fd9752ce3d8fe0c2403a1acf371df6", + "0x4de237a880b8df0ee864990168b542afe5088a197d0d42a347292ba820a5045c", + "0x8ae613c6cc267b90cb47f3ed2520c9ea223a43a94fcfb8bfe77662111ce9b8df", + "0xb4c842544456627aa6b6fa3ff8e10d2a8b17918f14fe980ef3c0414087e73da2", + "0xba537af2f1768f4aa18e832a4bad92f6d0dfdb558b74a7b22e73c8d6105ce504", + "0xbdc36000e2896acb0429bfcf8caec3d0102cdb6a020c15d3cabdf1b349ef3988", + "0x4c86dea3fe0e29460010a3dcfa0a69223a94793813211785789388f634327da2", + "0x79e5a3ee037aa757bee0d78734ed3495e0256005ecfc1874e5fdbe6af770575c", + "0x9506a6f0f3380766d374d5e19b249dea52722804348ec1a1efcc782e3e3119ec", + "0xd9786cf114d566ecde50e1d44e62526fcb8e599fda8d7e1e146fb19332bf2135", + "0x217767be180ab6cbc881ae9fb88f1e20f92d6b59943147da1494e92a39122bce", + "0xbc18d277927b110a74751ea5b689d7873a363bd1b39be20690bcb2e32c3aa04a", + "0xabb525988618c99da5f822b5f23790c735e906806d71d15e5624a238f3f61804", + "0x8ea01f09345cd3aeb1ddb48d5fe6dfa0e86e9988074b8d79c9aa968d51b11571", + "0x33f5a9a551affd13eda43a031416ca65fd22cf175832cc0eb1dded967a7fff85", + "0x1e675dc10cc7251ea08abe1490da81c73395b7cc567561a08363fa855b7e0e32", + "0x2c469f9a5853141aaef1734476897899b7c5dd51c6b7ef00641c89ee7877b31e", + "0x1d871f95843754187f289edf0677a1190f4c41681517078e4352e92d5614560e", + "0x188856573490ac7819a4467a0a62fe7c152a775823a23492543e451a6af40ae1", + "0xdab86758d9b6d45d1c7f9e9c6247b92ddcdc998bd7ec557cc3af0c115b5f0b21", + "0x90e22b10e530e2e8e2ea9e533c1ae9400f99a244b8ed72cf80980517c343558f", + "0xd171a5516b1d0b1c8f2de29f2b9c0fabee1f9c3e1c25130b5bfb87ddc6e58dfb", + "0xc37f378dfd0f40966e6a91925957676c3932769412029ae7bb0992cbd9d8b317", + "0x9bf71dbf8475d9753bf0bbed0c7ce00a2f4cbe36f1bb243b5918bbc5a28dac27", + "0x55ff8c3d1918c130843016b9f84c2d2057d23bdaf2f3378a2a18d3c4a6a57b9d", + "0x77e105f99067c8d9e8a485e5258ba94da8aa59e48febab11c6532dfda86590bb", + "0x8e5acd0678d0cb198fdac1851b8e6e6ff9a81e5cd2a748ae8ec536e608d4abac", + "0xedc5bd3a2214315136aa46ab698ee90ca2a0c70f7d86799894cba218c6ab5afc", + "0x195bed424f1144f6da04d48b5dc8cf1f3332a3f7fa25e9b7dafd45b9f4c8d4bb", + "0x3c1b06feb22e3c6182410722596e985855fc2310925f69f78b6ece78e6e5b0ba", + "0xaba419028c801adb3c207bf597bfab8dd30313686536adce51e4c2050901fe13", + "0x986af88e1671268f6bf694f3cb19bd5ab07c908142788387ebb40173c7a796cf", + "0x0e2b839bde7d8d7f6c15c81e381097e2261f94497dd8653a789f45f8d3c1284e", + "0x43a9bc0ef2c6d4fffecdbe949d57a67f5a0233c52190b79251db9264e542efcf", + "0xa4699350d4ca48ea95fd6fac5c7f90d007b56d379ba0d0354b751faaac53223c", + "0xe39d11fa0cfe2777b1efb6e144e9c4264ae0272e837fb425f429aec9cc8f4da3", + "0x76fa7de15779f4eca9623c7d4c42a290407e2725d8588dfe8ac7e7d41e43fbdf", + "0x779cf4c4f0a91ea777df3fe4cad8881772813434b812ddca60423bf8011c08f6", + "0xcf319b0da79b1e651d2f3ffbd0d27cd8222f860e7b11754dce1baf51565985d4", + "0x012fb5604533e257782ee0392837bc718153da0ae266e2e32e4f199660fde02b", + "0x8ad798a655d45d490d9caf78df7833ea324c7f1b49729a36bcda9e151d7e1d43", + "0xeb03216d9d7b1fb5dca8a97a4412a46cb2253e54c4b12a25502f0a2aacc713ed", + "0x19d931713813ca116ab5c2e46ec280089964a71ae1468e227591de04d5b97a34", + "0xebfe6ec1bf4c3e70a05611f27e58b5fcc38c927ea4724562806737eb6ead3096", + "0xf818d433be8bdfa24fdb71b87501073f35247b4e33981ebb49e0f56c24c15ec3", + "0xcaeb9fcf515c4493c7caf451c44744b4b6e15f6c207b01883cf4602bc4372d3b", + "0xfcc7253a228988250a1d7a251d12fc7a0ad8f73b00ac15275e0b05966ce78140", + "0x886ef7496f33c82fe4aad07949735f86dc30ef1fd091f90c178e418492e3bc68", + "0x09feebee898c7ca65a76867e15cf3de54801279e102980ae561d8acf066881fa", + "0x578d83d3eb46a6f84fb2058014c957d2fa8045b0b9657e01d025c8bcb8e70bce", + "0x31904f4d2bfe60213213325334c6b57bdf22f96b7a3b76325624e62b9ea83ae6", + "0xd28d01da6c7171a6f15bb06a13012513ff8829725a88bb1f4f7f840962e05201", + "0xaaa00e1ad29813e01f1d3973459a80e6b2cfe5211c94c64af5623fce48cba92a", + "0x80d111c117cf57b8a149c85ca6771a751bf6e3961255c975c6cabf245c14b65d", + "0x22746085931311fc8b5d618792bee289756a4a9964e541ee5118bbd81d367868", + "0xb16d9677e6b7c333b89f11d1d6c5d9df17f975d96381ad31b06ac052e77b1b02", + "0x45be4e3e828f7fce70d3a4771516754a3b3cfc87311eab8a195df2a00109564d", + "0x7c0f3f8a47e163d2604a5401162e70e79e42fa859bd876a1c0dca5368a5f60d2", + "0x7813a42a3c2330d9b6bc4afd9ae0812792d1ef88f84932848dcc1d8092e3551a", + "0x3de2f720fbae2f529c7bdd691de5a811c39b9fe3e2dafec417537e95966fa0af", + "0x55efb037c4e26d6611286b164a3282014fe691f41ceaacae35bf1136827ed444", + "0xff625b5922ef5111ee423df107c5a1647ff2a7aac0111f9317395c90465c7681", + "0xd1e65fbdf421f4452fab0a0ffc83092bfdd2c3ac567b98a32a8bb8d51e5fb1ff", + "0x9e3b7c9ab367e039c60e5512fa98e92358c7e01da4c3ee728de6b6826596dac4", + "0x71d604fada824a0ccb67235d6eb7ed61c1292bca8905be445f0aa3abc1273bb1", + "0x4cb481c5182d85fb2e2a4fdf76266f6854e02fb7216eda32e6461e889e68bd6f", + "0x6cc38563150affde8ba6ed7efae8d187e2b77dcac845eed51459d9cfd03fb5d1", + "0xb6577007a83aba2b64e532538da8b8338b2ea24974b4cd3cabc5cce294685d6f", + "0xcb30f0f4cb6d5fd481a9bef882e4e3d960393c3c6d0ad606019bf105bdc20e0c", + "0x76880db19973cdaece9dceee9901d5a19fe1ebc4146613abfa531fa726ea3881", + "0x182de9aac53fb0fffc73c18f4ad4487727b562b0a2985a38fcf90de27ee8eef0", + "0x46a108c6f3061498c1257b00e5ed3f825dc05fd274bf0ed25822951c21b064ea", + "0xd65db3141f59cf176fa1b76e3690b55c6fadf8bd2410f417006ff4f41f849ebb", + "0xbdbf0773456c3ea3c97ad7359ae648b12c3c07db89da50f4a7ef9e1d56891d6c", + "0xaf2105846778400b34c112e22f3948c592951d47736ea7aca055604894001587", + "0x935d525c2a0b0f7ca3ef15e58f9be7f1f4259f0a3fc1d773f5a6326e3da93afd", + "0x83763f2d101e8b18f5c8bfe6ee81598e8f0bfa9fbc878968c9a1f5930445497f", + "0xcfe7bb4af2cb5b96811910be98abf174bd6d5a91da46d5f29a9cddea014f723a", + "0x134b09a1dec7c38a1411adfa45ffed5fa0f1d2e8103ff5f3878348be3510523c", + "0x5abbb746178d37400c3558b45a656b299762610e42e9cee9b77e48648c5fdace", + "0x74562fd04f41728b5cc73324db46b0165dc9cc81128cc613c8dcc368523bb6c7", + "0x306c3e125872b6434a1a2d584ed5cd89bdfb1b5ca25e53cf977ce3dfd3778bdb", + "0x65a2c1f8794ab5c5e955460aaddb3ba63369369c3631fcf84994c5079b3ca834", + "0xa2b1592e2fe826856beb50666f0938a8385ed865f7c2a675e0df5946a84a66fa", + "0x4bf50fcf5e0be8c251ff34f01f9fd2da8bf1454dd75132c5eba584d49c927f51", + "0x86ea917312169b653e3112653e7d7c1736f1eeaea0b4f16c42427a103a0cc26d", + "0xaeac1a6eeb4a77232702838686ca55e54f301c28be846fe2b79b69850375a335", + "0x16c16ea041d615de2369c322577bbf62fdedf33c305238c5dfae2515ccb97e00", + "0x9eec282d6278f0863add56acfdb616f76028cff03a77cda5956c8bd7c5f7b372", + "0xfb7b988e90471ac4ddae8f2da2639a7afc3641834c6c34ec9a2ef3c08b2275a1", + "0x034e621da0951ebb51ad1337f4a40233f2b574f64955ae7d9333e794ca850bde", + "0xfbd0332d8482d6ab9d005f6cef7588f336c9d63619b125c556195acd964635a2", + "0xdcf6ebe9ca3d3066138578f1c9f19d537b7f497fa6c562a5bec86aea51f2c93a", + "0xa117490b74370cb722e71e87c8d4fc3f12c46a231b3f559f111baffb0fe6b134", + "0x523a2aebc4c66bf66af240e3ed605af8c6520422f02eba3a73597223c999a414", + "0x83c2864b86aab31d69b0e6e15f73159543fb5fd26f1ee60922a1ea901192ccd7", + "0x8a5dfc053dfb5f5a726fb672fa80d22b89073ab47f4968a528ca834b217f647e", + "0x48c1d631cdfd595d77aa2cba5ea676f356dab60628f3d93ebc26f60b394736ac", + "0x2c833267eb7d93a21cdfabac4f46bc72c0ba65ec934deef4b0e33002503a6078", + "0x31933e29d19391948996f59990459c62cbb669688ec69e70d44a65916f9ae47b", + "0x170d7264d87dffaade22154e3b6cab3ed4239ac2fb85d96b2bcb01b716f1c212", + "0xbeb014795a36303c7cf8ebebea00285297fecb19628e881668bd4df6763eb649", + "0xcf818c58ae7815e13e516326a9ac5aa50bd2250d1d3dd060faffb71246016c18", + "0xd7ba7c1b02fdbd76a222cd976e727328cea4381379f85a73ec0521945c287f21", + "0xa09615e4cbc1a81f957e776943340d04afd088896c03b59607907e01ccc16e55", + "0xc8afc57004a9be086bcf7b06655bc9318c4f20af9eaad6dc4650b49f35614ff7", + "0xbe0c23209d2b025f42674a70acd88ca3dc339016fe9347f28bacae6e6782219a", + "0x5e2c798a67190b3ab48b55fffd2c30a66fe3114686fe18b231d77c08af11a3d2", + "0xc51e9fc7ba94584d3f1fff9eec1302bb3aeff4a34767f14a67ec2c452810b188", + "0x5a45b4eb3d31f18178a5a194ec29b6834cc5e4243c604a57e9aa3577d62f387c", + "0x2b020918f942f0832c0eae4b727c9b9712ee76b46076ef9841f5eb5385763cd6", + "0xdabb0174b257bc17b4c7320904c9cb8597f3f5483fa3188ae73a2d2288e349ba", + "0x6a8cb6b9bf8c478482bab73595f01befc430ce0ed275c505c7f1a56591b1876d", + "0xd8ce5a0db56354ad2cf58f44f70307f4be99533dd437a3d6719264cf9a1a3a4a", + "0x0a84a77ed81dfcad4c89efca0ea607b5773c96a3c1dea20924b0815b71dafff4", + "0xb5072ab7275303b8dcb9a5ccd4e50df408352d5d52200afcbc3b9814004aedd1", + "0x5381115a2144b75cf31e121d745746f4196c9a1e7ec28f41a59071d55837c541", + "0x11d272aad35eb4a1985b4f42bcd11f4c74dd58aa4166b4d6a4fc0e9edf54f6cb", + "0x73d6e9591d76da750f689d7c98c79f2393f119b64c8fef3a91fecbc321f496f5", + "0xc05dd1476e3fb089fb3912823e14f79a8ac5cc2cb6d9ae89f50208a9cf74abc3", + "0xd1be3500205b5ae15981a77fe3817a1c54fd8ef4b753f53c7c6722389b2c911c", + "0xb7291d9cd6d0356673731de0f87541999594286554e89b5ade7773360f95adb8", + "0xb3fc7a4d3638ea6623f47585299108de190769a2469afd1ff9a7300727c0fa01", + "0x8e2bdb0c79434fd9fef9eda4086c8f200e797f7dff401bf09a746346229bae7a", + "0xd18bedebc15d6a3b92fc1407c728d17ae7dbec6fe64634ec64397495f77a4164", + "0xb2cb332e58828fbf0926f94f2b504be49b84328ed934252f8fb5d2c5bae8da27", + "0x207171327e8fde3e56a75c7f935b7c087ff69c91cadf2c0fb407300829cbd5da", + "0x0b4878b92d3c27e85d846b62209afdb6ea3bb98d5240ee9a84bebf4eed94e1f5", + "0x8040670aa5d237812a01c91ee83487cba05133d52519e1370694ceaddaa3b9b7", + "0x2e22bde8c1ae59291b11084c28361f3cfd808a2ad09ac9c697ace6120acee38b", + "0xa112dbe1e9e6003c0655af97474fe097eae3c568afa579cf16ff78473a49f36d", + "0xe7c614af845b9820ef57d8e4fb1c5c75b7eec5e79ab036fed97f0373c113c047", + "0x6febb0c0ecad49584fcd443145c6de3c5fef62ed530ecb4228f5bb9e7f0e03b6", + "0x093845d18821c28477956e87c6f3af8329dc81c861c87a0a79208dc8d14e5e42", + "0xf473df83aea84f1b5a110e053ada68f3cb575c300b0e1ce4ea5e2aee71403336", + "0x762cd05997e8cd549654a2b52670bfc25f48be7ef1cc6acf3607912e8eb834b4", + "0x1b9b4999411bbe7e4b319ddc86581c0f22f72f6786b053ff1cd997fa84746923", + "0x2121d719fe122cf5fd5c2a83d1a120d287cd54e6e9e7aac7e663a0cbfc811a6c", + "0x150cf7552192de57c39c0cd29903993623989dc1b9abbeae56c76c2013229e63", + "0x49e208b85d17820b7e254a71461de9852bf8b551aed23941d863280352165631", + "0xd7b99e7d06821d8e583cadd4e7e8f47590ff04429c1fa104d67c39c6e6415b23", + "0x1a8fd54c490c7d7047d23f06a84b09485a4b582707dfd0bf9b6ae578a7eaf9c5", + "0x89e97ceccd1f997973d39f35afde69e44d47c846e54e7c1736389ac61a1bbfd3", + "0xffac71fde15bce3711277e04a536227b8888272cd0cfd46f56de825828472ce7", + "0xcaa626f3b5ea0e5a0b37011addb03ffc3ccd55d6148d12fdba639d2ac3645c63", + "0xad14e4e2bbedd763420af1bd803a4f9f2e40d9d73b944c009088691b0f5966a7", + "0x9b60a038c60fdd4281547293432279472fcb582d782699ab6d10b5a35c524807", + "0xf8adc5528d6a68b2d06a6194acaf03ca7d36daf62d981844611b6b3a11460b69", + "0xbf591da03a249710d0b1f2d5503fdeede65f26b03968103c1925a9f3847f55ab", + "0x08e44f64585856ef9fa8ccfceb8212965cc78d0d46eaf6f0c62d7e8f4d8e5e14", + "0x5a0e2d169bbec417562c1dc45dc3e484d89d7eac1a9ab176b8fe865e145478fe", + "0xeb6b50508e332a884281c7c91160d72516bbb184b997e839fe864bde095c3dd2", + "0x34702a7eb2be1e00c238541ee43e34b36db72efed86fb31c2095429beb07b8c5", + "0x95480730629792f61cf38cdbdb7569d794e4f43f04ee7c13d3ff15a8f7bb020f", + "0x93d763ba163e951b560f8f6a9540889f9a99b60a360dcb4881613cc107ea0d8b", + "0xdb72af86d9806e25744118caba029e55184478f3cb12ed1b9290fd6253b1c067", + "0xf1003e048ffe39806fc3d13cd78344fae1a63ebe098da8da13414bd650e0a731", + "0x653fcb2d648011a043e3e2f0c57e058193bcebad6d5f1d3b6366ea843a6b8475", + "0xe0fda3d624baf185e3c8fcf7fb619bcb7f2fdff1d427de79c28b076073e24da4", + "0x6ec249f0fa7d0885a8d05c1ca2bd7152717e7c51ab1d40f18c9f8562dc3659e8", + "0xd18893a23358c31ae3c3627d4fd001a48bf701da1fa606cdbe9d7580e6cb5c6f", + "0x38f37bc17efc28a0e6a79f77147e8ea6fa444e306a253df45b5234edcec7cde1", + "0xb08601effb9f32b3b2689b645d4fce79bdec7a8f77a7d7370fd91a3ba09af27f", + "0xd963ca4352bddc0e1089cf4f9d4f0f03a195485b830f61c771fb9ddb4013ea74", + "0x2b22b03a20e3f626a0ceb483a0a1baf371ab0031eea1a7f3a26fe3e1e989caa1", + "0x61df103f63327ee9f1b1e95788772f12dd494f125960939e1a48f5c22f2f9b84", + "0xb71cb5ac7d37752121ecb8786ade81b7898a6d3c1e09fd8e7adbeb92b7754055", + "0x189a572f192a4fa96282da37b5b81f483727d0306baaf9a22fcdaa62142b1814", + "0x612baf7f6483bb54fd1f15af6b69101c06b00f17581045268ccfef69b5792eb9", + "0x4bd8680363d48c2e85d61237de0d8d065243527429ec77572879b44ec3ee9fd4", + "0x0ba30d89a3fa968aea1a2ad0732375cf2608ff31c4e8ab3df2ff4bd09c2d44f1", + "0x1bea96df00e36f9be781ececba0767f481c8d8f7738520d8c69d02e6392ee288", + "0x120336a63cf00125b5852d119639c2ce18c6620520019e4ce90a40383251bf2a", + "0x8d633d0b9521128750f85e4f52cd794f8fc2efef85ba17ccef5f64b3f6a73f5e", + "0x1a260ed25384c200b2517fd8fdbddc4ba725caa3fc9a45ad59b856bfbab5877a", + "0x94a538c77a7f40a3687140490cad7cb48dae90ee6eea70305ff0566c09a06541", + "0x1fd0d5235e7feacf94a551c6142910223fe698647679d8afb18832d4ffd65e8e", + "0x5a276e68d9889b5ab9d1192c4ee08a05ad4fb36caea7d53d10c9c0e647be0cd9", + "0xa6221080fbc3cf570d225dcf95c481a938df44a33728fed20b3dc1574a0557e5", + "0xf44c47e3561b22b51e92e949091c1de0d9d2309369922c211831cdb1c12e2c79", + "0x9583aa856f6ea15eca78a2627a15e2aa7881014d06871ac4d8e69d4583ceca48", + "0x808b7934bda34bceccc4bcbb254ce6ef381f229852c7d44bfb9992c744f65475", + "0x79c6bd652ed782a50d9a4d1ec47c526c94609f23ed26916106fc993420635e0f", + "0x07feea5b62d92065bd15ac625bf531bc1a0a39469de628f25f3a8133927befce", + "0x7a8cb37c0ca56795ad4f31ddeb7d9d000709994b6677dae403df1f293139779d", + "0xaf887f62f585bdb0cab7d9015fd19408f2859b029ea38147b7df2f88ec832e4b", + "0x7556ba215dac3866df9a353b29738bb665f2a6a2d779b2fbda0a0773e559c1bb", + "0x4ebe4c7eabc27975504aa4deb393c6ac235b3069cad3d151a92c0d106a872348", + "0x6ddac551cb250e4e97dff6dfd638f86b48593014f80700cbc93b34e3453d61e5", + "0x75b07a5480ec4250da8b2ad5497c52e7c60ac012cb77f3a90208f95aaabbcd2e", + "0xbc36a949345d158ca7e1e26a09a5a46b7fc85f3aa0ad63db58892f55a990806e", + "0x1946610eb6d750477e54b66c283f6ff3a38face360a844f1a58254dbd80d8860", + "0x8e23e97ba1f9f6d792b1cd60269bab4a5343a5fcf35b795caf373ac4d8b693eb", + "0xbad7599bcae5c8c559ac01db8c8da33c5087c7ce50bae20c149628822eb35b62", + "0xc7c4d22fee568b2508f660592345dc5c398840182834d59df377751d6a8938cb", + "0xae08b23cd37bce380ca4c783ae6a8d9a434a8d63b8e961149cdca06e373afd67", + "0x9553e75d1d4138261a750354a1843c4e5107fa89dc9bb2a05a03c528280f5b7d", + "0xbb0a9178b896653e4f9d2bda39f89f9728c781413542f7c93f5329f5b849b407", + "0xf3d0cdef4df8d19edcc08ebea1905ba31a1acb2e351205a7694d84571bd63045", + "0xc577e452c2fd8d35ab7903bccf973f025b85c23b339de93014c570ded8505ed1", + "0x89847464ec531f1ab16c039f0debb06fb1f49589736fcd34ab8875a877056510", + "0xc06691f5bebc0eaae54bdd491205959ed4b5601facc3b1be91777b158341eb1e", + "0xbb48731e2ff3f08205d734ecc2d5ce33f0b2f5bd1078bccc63b7157be577a41e", + "0xd9af788902806c57288ed11f24c642b0e0d01124bc76d69e8c7a0b36fba2aeaf", + "0xcc3c6c96f78338f25553b70b4acbef5be368dbaf7195423ee64f2380acaf7822", + "0x61b51d5d9ce1ac14d8ff86f12e9c941b6118ba0a41e33105d24d6551e54dab14", + "0xd833432bccf8881b4ee4fa1d40a4ba7003bb08c3e3a727a45a75b14a400426a8", + "0x4f3d17473d065d3e13e1d491dfac7e33a67cf30c3bf8b36f9e3655419dbf65e4", + "0x0b8cee59daf69d65e507a2e2ccb710ec1e094f5c72d240f3f2dff52a02307bff", + "0xb0cb900354770c620020c9834ef5702ad426df023819775a76dc6e740bb387af", + "0xc441350660c8b3e312644b2911a00ac27b2d58a3ef6214f8a87b2c678e6fb270", + "0xb7733befe140d8a816cf7c4f95153dd9d3e12dd0947b7f2789517b99da1c97cb", + "0xa6c90f92203cf9c379987d39a94cb80148e261068b356789216048dfebd7c720", + "0x4da63375a192c967467168b5a040cd263e0905ab63c33b888c78e994cffe3b92", + "0x822579b4311f05b1a492b3fedcfa974a98ab21244fbe5daac2aa5aed175f4a45", + "0xddba80955a36f7723125cef57886105dd852fdd9c759361410236b575b947865", + "0x8cc0db90c6d9d2eca3333f4f03d40caa63e14ad7e41a020675be78bf5056f449", + "0x09368e50b354f5e23dbdf71078051eba215bdca26f2f77a282db697503426230", + "0xfafb8ccc8213c03f2267a28dbf945ce5ca5b5d3f3f6ed8c75091cba1bab6fbdd", + "0xb8db0956df7d47b3ba62718ebfc004fef54c5238034524ba826bdc131222abc4", + "0x3ea3c2905bcd93c153448a9ed7c2c3e2fc1aae31ebbd4c179fcf12adf3567482", + "0xb6307d4241a8d3532c5704dac37c9133453ed98449296b39e12ceabe5cf69179", + "0xcf7b4da5bd4ec575dc5b006486716940622f3900239dcacec7fade7a2ec14956", + "0xf6efe194d285263caa679935cdbae28d55edb60a2435aa23c4b299e82e5431fc", + "0xc11066d05386059f8367045dd2cfe8e8990a5948a2c3c9791a9c085736367c6b", + "0x75e018adeabaa3fe2bd9e801893cf9215f55f1059e1f0292187e95af7cc176c5", + "0x03a89af7f3267d8f154e220356d5788ae79ecfc503070e78a8e6a72b1c22303e", + "0x8b23c79f0d8fd307fd5c7cebde3c0dbb38d0efb7481db3fd1a6c0d9d53c963a9", + "0x3a355b52fd356b119b49ca98a954d55d851d4d50b83e69d7b9d53a0b53c7b633", + "0xf766c0b4e96a2addb73f61f72130166c470a0419df50d9aa17f43ffc9d765cc1", + "0xa003528c62838f5f407ac206d48a0f6b22553b0d5f196ce7d373fdea295d524b", + "0x1a11af1d664c22ca80a26ab7b7345bf73aad92e09877b738fc67c2aa3fe4033c", + "0xfdd4ba320421df4dd65d8ea3d85ceda0d8c8567569e688ca9740781a1c4aa96d", + "0xa2f4aa791b9dc69e53b28287a659d176cda1596dc6e70b94913e1366b09eb69f", + "0x8e1f46217bccb2b018cf306b2e49e11bb9d64e181487115eb444115cfc8220ee", + "0x9585f040c66b126190b91499dd5a16bb4b666fe72e11914212448d015e358478", + "0x15219369268cfbeaf951ea565038c8d78b34ac48dc1124e41314ba9977c8f5a8", + "0x090dfd4e611e3656d1f8070d6b903d04457a4a684026c76e628cd04aedc24d00", + "0x66f76c46b03605e611b7bab76f7a1555f90890858d4d7e43f1ff97d9c1d5b98f", + "0xb400aa1dc748313adca3687265a01c1bb09df2efb8bc5cd8d531024a429831b9", + "0x194a9272c3bc231ccf320b428e536b1b25d4a903deffb0a15c49127aa72dd9e1", + "0xc07e2b7c520d038b39c1d32f31f8362c5139557c979887649e5b06434d9159b4", + "0x5dc11cdecce92120caa7f0bd1564bde1c9e9803d814633728b6adfaee0e8f572", + "0x261113e1c662bc3d25f03e791d1fc5f09c080732bf758ac153cce113e82cfcf8", + "0xb10724c45513d4056a13c81326ff99e7b45145b7c90ebcef6f80a07daf3c4106", + "0x0f1e58db1df68ef420e16b514572c87a7317814c22dbe3671f2741675acc4fdd", + "0x2ca91e8f09ffd5c121f84cc01f71870f3bcd7b1029295b4886a427d7c7dfc333", + "0xc5e9a3d27c3a0c156d849fb2a16cc77643dfef2b82975f2e148f7dba1017c704", + "0xba12f486e957ffda08eb2ea9f0902fa6a3a24c9dcc40239aa580b5473a5824a9", + "0x4e4fa1309548065908493fd868825921fe0e6ee88cdbb3f678f6c13f7f2a6c42", + "0x469e8f44467b149325a8e62ad717b71b3a608bf10042a49e3c7297849efa16b2", + "0x9bf153a656d1d3693b33bcd450261461398491d957186220735f45c0110d3ab6", + "0xdd5d0bce2aa049fefe87f213d8ec7729a033c4371cc0850492c697a5e7c0826e", + "0x90cd0913677e1a2cc84d3a1d34530296a268e1500278112aa2901499b317d7ca", + "0x3330b6ad42834be1b58de1d01e4f304690e7bd3bb6f1262a52097239ca66936e", + "0x0efeb564bdbce9b07f45553e5bb24f212e36687a98ae9390ece573944bea31e3", + "0x4957e4935333b7d04e3613f8306e4a9ea10456dee49b39886368a2bf3630e51b", + "0x4c9eba197ed7fd1a153f8b9438bee045ff2fb9c67fc2e1d9e4934869c176ab9e", + "0xc64df1ccb7fc5e15e133851f6f513b4e276cf2c3b1cea27cae381a9c8e59e1fe", + "0x87c51acfe452981d3c7b96635ec25b2490a9d15691b33d9bb7fae1f91dc4db7b", + "0xab34b65f5f56319a90d87e4dd9264e013870e854e285781580936eaea1bd9a08", + "0x399866d0d1ac3f1f05a6252d5020b86ca3ee23e80708f3931a62911e45ed2ba9", + "0xf18b8000e553e6c54c154e86cc0da034f6f2a8b5c75bf1faa3a5a5d1d5d40f1f", + "0xe1a43e7b6344a7fdf5f4d148dce50f797296500a681a10537bfb824666b7f76f", + "0x440dd3de93f670929e40fbd25a20a3c86e2bef78c36462cee4be897cbd541b52", + "0xa06674c7ac7a5132301a7311c64067b211bb8ed7d61356aae81c74c1aaf7c6fc", + "0x1dc2bddedcf585f84716857da29874efd6443db844edd6315b58420a9c7febf6", + "0x7f2acab45894030ebba5a68f38b1f79fa1abb5b82ed43f7a6ea81bd246f8666b", + "0x8862f59c921f4b23a593eebcb9d70f6e12748dbf7fbecd01a3841c7b5dc0cba6", + "0x0b1194cf562d9ddfe1adbd86ce3f2bc46011583241ca3ba62804da37952801fa", + "0xd059d100dc906dbb32d2551b68da9200d63e399ad547c0e5b94d1facec932111", + "0xe69e34a9c850ba52439cf269b27a9b9d6d4da423d34d85e0fadabb7274d97076", + "0x567692d6578ac5f33a5583e7442ccc8c5d567829889c8eb2e3da3283240e495c", + "0x462ab3132d22665402ace97dbd3070d17cec45e45719c94f01613c67b380afa8", + "0x9a664e8f260e83066481bc2cc38ad61ebac872f198dc2c5c3435c8c3d54fa095", + "0x559ba180cdd0c53c4795bb7ae5c746e7f581de9eb300fe44e1a3cf06b42192b1", + "0xfbb83a5349d87e56f3fd9054e45d0343cadc5f173c900a66a45de3be7478899d", + "0xe0eb470001bab2a471dbbfb28b3760eee2fddbba658bb6929fe8cb9a22e4fcd9", + "0x99d092cd2fcae600d4d1c3327e4d15c32b43aa55fc22386af91465ffae860dba", + "0x966a66405588fd9ff7571b0ee7754f674b2c9edd7fba03f9360752ba89f8727b", + "0xd505d43a1523242cdf16737626345cfd431825c2c3068c9535ee0afeddde8e95", + "0xccdd372ad0dca5e220c9655efdbc3ab2eae668ee39235245144d349af48a5284", + "0xc26c7c7664308f31af814a3b1172f2e45c6771d19601e99c8fcb83398beeea5d", + "0x848feb143da06d08e4b25a42902642f79244a0aa431256031839e0a6e79abfe5", + "0x30cff20ec2043a942cb6a7b0124cc6e3d912f1e5aa5524318fd538c81ee2ba4b", + "0x6e568639af171b5534fb5b841a4abd62c8031b1fcaa9a47b7ff695b4da382b1a", + "0xcc454bd041e697a9309e0ac1c65887fcad438f25b728c2d80d59a2f1cfc3ff0e", + "0x82c691646d92237eacc4026b69774cf4c60481683c6086eff9aedd4d230125c6", + "0x745c6180e255351896db986d8b31ac017b05290039cf31228a5c9626ed8f0a15", + "0x855d33b9e5f84b0f2358b124633eb6476525803909110c02cb49fb22c307d76f", + "0x4a9a5636ccbed86cee2e9071aa047d009268065d84c33e790ee952921b59170f", + "0xd61451db974698d65b620399d06fbcef36317e222e378555f673512f46aa10db", + "0x331a6290365a421c5135006c9db4c8ff9ed1c6feca0f7e48ac87e8db37060228", + "0x96d3d76f14ac82239146bcd9ca85216df8d642979166c4a04581f4cca320cf21", + "0xc137b17b47de4e72b1a652eb53c30dce3cd16c2e43cc0fc5ac67b722f2fd5394", + "0x356bcf32c4fa162b4d21b92ef6f3b6a73c02f9e0864033d074b3854bd742d723", + "0xd79a0c3214c9bccec5551297bd8311c9c761b6d8b36ca6c25e47834f0370f8ee", + "0xbf33829228caead3c9b3693a4613dab9f257b71f8a6c3e1a7fbb4febdeb4bc25", + "0x049ce1ff603ecffdeed537cc8f5780b9c5e19751da69c22f0aa697467be227ea", + "0xce2a2505eaa6eb6d400954265f8b137970b3fe54a65d50ea9690e97ef14f2367", + "0x90243fc5b9968f02f2ab3420570d1c408db20dd9ba327162ecd17f9f412279e0", + "0x02fc0c97dc8a610e25ac9c6bd95acfe1abad5c4ec5fc65e8083a066decb534d4", + "0x1d01981047c18915174a9360dea68cc4a9ddfae5be7f50093398b333526e886c", + "0xad136b136a8949b3e21d70c0b37d4e4c90e29d93e90787b0e7938b5c4686b25a", + "0xb2a6b2f1cf71492cdc4cfac20220a5d4270661e5e7823be297fa4db44dfa8be4", + "0xd540f62125e3f980d906d3ca62bbea85b75df635b639c45d00054420853da55e", + "0x7f8b0e8d2371a1e26a610d809cfb021d4cae8d1ee48f4c720ff7337c6f81f85f", + "0xd2ac9267c818bbd4506cc717e571f63e51bb2871513dcf2bc1350d3f9919f653", + "0x4b149ddbd7d3fe68b36e6cff1824022d78eee93e55828ef31830bd21a62f3d49", + "0x007ad77b3867b3bc35914547af0bee1ce0d015498676f0a49dba3e99608c54c2", + "0x28b558cd14b2cbe6859d851aa228b7613472089d190a2c8514d6ed832e52147f", + "0xabf1e8c1d1f66eca5ebf21fa48210413055d53794e1fff6188e8113b5a48a7b1", + "0xca2ba366af4ebe0e849d8faf86c03f21677f84a9640ef29b7fa190935bfd56fc", + "0x15b14544eaca23ea3c4d384df57687ffef06ac7e3e75fe060a4005c8620203cf", + "0x0e824e5f0d6b60288069df07aa1f4f33ebd3a5e717ad33924a9682450aae8818", + "0xe3e238def36923171223899eb8d6c02d8c0daf1dd4573d00f1aa962ef0b8f9dc", + "0xa34c0ae261e980ce4b8df185e1dc2a0f93140f43d859540dee9c618a0b17af9d", + "0xc79513b85a0d7d889f5870164089aa8647cf6440ffed4ffc0bbcea9702ef9d14", + "0x7a9e89b64db22884c588cf021be9f9ab105828fe51014fe06741749ac6ac0e93", + "0xfab801f6a3d9b0f5fe6dc7b34cf60f88c2b85805935ceb1196188bf8fc5bb7c1", + "0x586d2b4d131ea129ca193dcffbcab1a8d5f0ee0c68e703821b2a4b55dc1977dc", + "0xec1fe197a30e23ad678d8798a9bb11402bb7a06ee7bc87ffd8b609e5afec3190", + "0xf0565f526a0d920891df06bdba1dc225aec52065012e92709086b7902b380006", + "0x9d2f547ed5c57b5b5d27b3fde8690432a122441b499cba8536190990e48df97c", + "0x5082ed2771a11fe7609951aa2f25bb6f6e1744b17b41a2a6ba03eca7d0d2036c", + "0x8cb7bcca414537fb63818ab8e34574827739864aed82cbf462c4b0b8ec5fef2a", + "0xc2e20ae12a03889003091152a4f638ca31ba7900a024f032ab7ff600003d2792", + "0x4896139e7e329de8dbebcf3875800603ca2c60d128c33232c2672a8c94756163", + "0x9d2ebdb20ec6a53846e7a7aa3f0c29ba0c7cb48c4e7002e5e7f956ae54d9b191", + "0x0c23a7db29c7708d7be36a79cd5e898db1fcec4a702664bd789d734c7c267ab3", + "0xb5b1e18c90ebb7fae5f12fd5c5a88f2eeefce25ab573fc3fb60a180328bef3a1", + "0x2a6689ecf84f2c653361f8c3416aabbe31024ffe220110e16c4b25349a161b48", + "0x89f058792447a0c3c63897a8e031ae92c92325540dafbc9e2775f1e6d7ac6779", + "0xa9c1b7123368f7a3722af5e996282c3404ae5783049bcd8e34a9c8173f149ad9", + "0x51576a3173d2b8fb4ba2faaf25324b9f0c0adcd575215c25c18e175af79b8b6f", + "0x46466bce788d4e29fe8c87e6b0cb639619c99334c03b4e34bb4ddba7fb237715", + "0x0d2d73ab6b5faf91fcc926f08a7d0b70ecaa000fdaac19386b11279884380c26", + "0xb3d722562230fbbe574f054762075c568c5b6afd1587006cd5ee7bf1ca193a21", + "0xc4af79f13088b31867326f9e4b20dce56ac4df4f96a1d4f9643348c8288f4a9d", + "0x273d0bf659bb780cb3c445f9bcdf08adf88508528790f6f7367e5fb4afbf58e8", + "0x315b356ee0ce21c48d02db8676b4f9bc7116429da3755d1eb4f305271ecbf210", + "0xf60ce550d21f637e1938deb6dc83d592a8d7bf8572d6f3dc67d0c708a8ffc2d8", + "0x2a89411e61a49c94bb65e5aa802d8fca5b8daf23fd07c6a8c1b32e108d417526", + "0xdec02eb84e1f9025f5579f857aef11a53d73c603423a71d900ce9c74a5d9a586", + "0x941d29949cf6203b1e1a73384659df5feec442df4e38a7cb6cde3e7a21b69cbb", + "0x90df183b2320567ad0dd80d6190700a7f0bae987db4dd5980ffffba7649f5953", + "0xc6b242f3e18380abdba3fd0e5d2c6f00cc7b8fdb3a440c4088696a0aefe02d0c", + "0xf1e32cacb5afff2af3af4e870a9dc92bc08e7bed82ae77f1f4c800ec907bb8b9", + "0xb3c8b915648587a7de69e37a935c5ee69582abde275386596bb725a7050e496d", + "0x71d7332c58e8a8aa96ec654a2884ce07afe6cb701159dd9d9d1e84f1294776d8", + "0xd7c1da28223cfe629e88d3871e2a406a6073f12c13621b7c6c3ffd98fdbfef8a", + "0xa258425bb503eb36e56cbd62e621b2c4f177b851a11903a2d7fec345d99efb8e", + "0xb11de25622ca3fc51c83a371376574889558d667c92ecd42af75282f2fe0eff1", + "0x8ad27e253c8cd21cf64fb5e57cc9f48c9171287a2f5bed11d3ed6d521b707969", + "0x6fd33958a755b5846b7731a90b484b0ec508297b93d13ec135e6762b22f0ec49", + "0x30e2e3c6047f75e74969c0780437734f4a8159b34c1fd5d3a7640f3eaa933cc4", + "0x4a22ae54fa94c26e3f19cba69fd3a85c514005973026dd1f45f508c89172c93f", + "0x80de5f103f85b0e1b7af2334903993cd195c8dafaab83958c399576f2861e085", + "0xd7f9f9d3ca1d89c70b02c1263c113bcff81715ea6dae73b17ecd91fd1670c4ae", + "0x71479f49175676ec48adb5cc0a41c910f63221bca88e7693f10c4644294199e2", + "0x7a0cc5d77e610303a7b379d338b357f114e83afdcd2352a19752b2b535fe0b72", + "0xd9f2d874a00c0565a3be9c023c1cedcfe3ade11747cdc49f44802f9d14756b99", + "0x8ad9ff366a638fc15fa6fe9f8a46d029173eab059fb40fc793fb720471f2b215", + "0x35e5f00655bfee1b6a8b58366a43745d19376280c3ccd2e003626961a48f7251", + "0x8ad2d295b82dfa9fe00da9b55366ae4ed73601ce5cf291512a2fa4fc721e3031", + "0xe31f3d5fe46a320f301cab0052dbdc55b83160837bdaa93a50f97b96e243a568", + "0x549fd73c5e8024c77b52cd30a7f8ab2811301c37d9a2552d0571851818a6491e", + "0x7a186a961bd184b58b751bc2a0835a680dee016e75f7e460242d8a1cce036367", + "0x8b87e86ee0113399b1907feb362010fff7743f67d5bf291f8e94c189c51009cb", + "0xe29349467d592e4ace23b1cad27cf426784a72805afb95eb2725bd4013701f81", + "0x494c37a8fb7a0203f55e9bc8ab0915588bdee574f142d662ba5aa1edf45cc9ce", + "0x644c81df9495468742421c69de7a3d331f6bb1bbeff30a8bc4f9620df47fb6c5", + "0x91fe8a5883801595ac1b43f6998508ce49440668d8e90e4057422f0e558f4361", + "0x1ebb1b61dc05e3c43be86797a951309e238195986d7817f003a819fd628968de", + "0x5944d23451babf035db698946fe745cd0fed2f0c040460481eb962db69e4c805", + "0xcb8b752b17b5ff14a04af2d3cd6934926614f7c7967238d07509834edf2bac24", + "0xc4978f7aeb87243b7ba375c62633482958249dde89365b5a0ef60083d94fd201", + "0x99640d682108795b628552a1a5592be832b328131e33d2205b9e6112d6305a0a", + "0x86967c0069f9b9cecc02504df4260661153ad0774fb69c96948e788cd79ebcc7", + "0x7cc2e6562c88378aef4dbb812a67aca06c8fc05cebc5772c52b5312b57d6b998", + "0x015db34fd966e7d975cc43dd843f9ecc81b79c75e26f60df3cf85890fb57b43e", + "0x99a5aefb175d287f8c33c144dab4258fdf0dfea37661ca3c12f493cb33b67ed2", + "0x38110d13f63435e75a19836464cf290c753d2a7ff4f154f4e56da924b8a09ecb", + "0x5ddf40046810bb44acb0493d28ab93e3efcd60d2124c0868aca9e5fcca1bb143", + "0x5f898d53c512930272b4c8f3dddd72448c9e0044b53a56cb55862c043fdc2a4b", + "0x808f8eed11e59475f40cf57b5f005ddaf3e253e3ec212cbc200d0b6323b657fb", + "0x5300e38e3d31da934bb9c0bb459cbd1511f636906773f7b3880239b59f3a1c70", + "0xd8db79f0cb0ef64984f9b2f4dbbde05a73c8ac7b08f80a09072baae3c08fc404", + "0xac1621e36d2eff527c6bcd27219456744307aafe1205741edf6139205b105303", + "0x39285ef3a8ad274b4e2d79d96f2ba6f51335a9a9d9f27291a964aec39e4aae03" + ], + "transactionsRoot": "0x62ad54755231bdd2ef0b0b5ad9b7e0dbc8f38c66ccf6260ce70fc6288550368d", + "uncles": [ + ] +} \ No newline at end of file diff --git a/test/data/blocks.ts b/test/data/blocks.ts deleted file mode 100644 index 2bb7d898..00000000 --- a/test/data/blocks.ts +++ /dev/null @@ -1,125 +0,0 @@ -export const block = { - number: 14354583, - baseFeePerGas: 32130132934, - difficulty: '0x2C1FDD053C1C33', - extraData: '0x486976656f6e20686b', - gasLimit: 30000000, - gasUsed: 29998059, - hash: '0x62cdc4ccafdd6f631465929e04831566a3ab0fea81c3800b26579dc284dd99d1', - logsBloom: - '0xffeefbb23f69fedf9afed3deebb7fbbf6cc7e6c9cf3ed68d0f9b546bbff7f9bfbebf6f7f65b36b2afa997cfe6f7fffff7e68fb07ffc7fba0efbf8cb7d7f6bf9feedc73f7f0d53dbdeb934eafd3757befb8ffbe6fcfd71e75fe71f55dffffcc72ffb7b1ffbaedfbeec3fefcb3bffc7dfbf77ed358ff2b97f5df2c5d925fcede76fda6b7dfc6f6b9702f7ebe8479de8fdefdb1ddc5eb3e379fefe64ede49bfadf92fee695b9fa3bd3fff9de1ffffbfa4f7fec6bffa779fdef8fbe1dfffd7ebfe7af39a7cffef694f7f37364f1e5e4fcdffadfdab2fff5fed9f7fd9bdfbd79a78ffe8fbf7ebedf10bb5acc657b8d9ef3f9ee97bfc57f5a63ffd0b6bdfbadafbfdff', - miner: '0x1aD91ee08f21bE3dE0BA2ba6918E714dA6B45836', - mixHash: '0x912ea662aac9d054ef5173da69723b88a5582cae2349f891998b6040cf9c2653', - nonce: '0x77d46f00c8c1cebe', - parentHash: '0xf36ce88a09e7de3082caaee756e0d1f8e50ab4efe518919c60d2d1a3fe7fbaeb', - receiptsRoot: '0x7c127a3bdb6bd3533490bfd4f97e6608d587419e7497eedf9578fa5344e8e2cc', - sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', - size: 141405, - stateRoot: '0x38138478f6da63acb548d7c8f933d327ddf6344fd3a1d32d0ada1699645e3c84', - timestamp: 1646855716, - totalDifficulty: 43371646203223075763541, - transactions: [ - '0xd1211b10a6a23cf1d68ee8382b9eba583abbed2344ddbce53828e479b59ed69c', - '0x60a2f9dd758c03b56cfed3b6164db8b92287832e7f392b9aee2e1eef74a71765', - '0xa166c2cd1b7ecfc5c093a8b4e91c61ab4bcd5bdb24f855b3aff45630da188574', - '0x40b624e0108b2705107834eaf586e09b07201e0d12afe419d25d04011aca1a4c', - '0x0c53737bf80cfb41f4373f9da7e54c5a53a287c6e50bf0b5451c491c2d5e35bc', - '0x12a4400e0c57c35f28201095b27e2f015715a9379537dacf51d7a2792ba919b8', - '0x6d91280c0f02fce0dc8b533b9a662784e6623cff29fd08ba6674386d289eb167', - '0xcf6cca93f88eccb1eb300524b534afa28164c0d070f05206086852271efd7733', - '0xc7bcb3807b214c95e18c5c9a356585df168ddba2d3fd0503f65f18365196fc17', - '0xb9a0254af1192c0a957f0bb5e752bd437245eac532aac750c65347a8d9a8b65d', - '0xe304b664890364a98fb8ab59746afd1c9911149100ddecf39aca473df081ca8f', - '0x414ac600d6c2e5026df9e31877490e635e2ebf202d7214dc9a115830fd79c6a4', - '0x8ecc924e696633d0422f8e49d033aecaed6534b1b348f1276da47427a42bf140', - '0xd0bbbcfe8afb55893c4da2865c0c5a6a9ec15ae3f12fd17afd22a2b8ed2c8718', - '0x9e4b811520b5eabdb8eee1e3cba1cd741da7dc8311917b590144df19394dc0fa', - '0xf7440b89a0e59c48c68f6a698c93f41d540a8e020cb957e13764dac937aeb435', - '0x1c1603ae31a196938395120ab01b4810eb6e432efd60a92eb15dcff27cbe408d', - '0xce07b41150b4e6dcc21a321e1049356a63cf9294f3cc511f4645b294c04e4660', - '0x09b68f27a9e361c662d451e9528641b2c21e8adb07676a4c9bf695e4a7b3ce18', - '0xe6820e59d1906679c388ea26e0a0e43da2aaa20c06cc07586580436b837274ee', - '0xf34dc9929f18fe627ab191a8e1081d5ae2506c313900bca25ae0f539473fd42a', - '0xbdbae019358b6049b5eab0045c2230c666a41129e266e86a83402f94654e1efc', - '0x4b41fec1dec302fddd7a71eba38bff0011ceb5629cc7ab7e1da62cc1569b096a', - '0x9d3bdca1564b7aabf9dca5c441e9833e2985826ee5e1d48c6d9201b3a5620051', - '0xfb916697df653cdef8b58a85d8406b6dbcb4404f557d525923a6be058820a682', - '0x5aa9adf86bbf407d13688c0aba1fcc7b85ca5d47102708b0e28a3d4ad849fb96', - '0xe8a75db53a705e13f349fedecd19518c5bb723ae0091ba9961fc1a7aebc4c999', - '0x29a1e754a852cad808b5473a46f3d16d470424a001565706e30c01c4b68dbcb5', - '0xcdeb6608206c0c17bb6667234738f1b397926a01356d8407fb017ec93d4c1e26', - '0x39cc4219f7402163b3d62eac8ef03ef4b199ba40f19b30145a13dac8e930fa14', - '0xf0a24a910a417e1a1d95433a760cdefca5c575aa8e0a61c4ea6708ee0ce59a2a', - '0x09a988a812757465f02b9937d2c1b12bac773e2d9b720d3e199e0ba898123dad', - '0x946b26310560efae367fa8f5b10fbfe9c5146df964f4bfa88acaa86e26081b8f', - '0x9f90432b7e98ea3c61ad154adcb981a20f48cc1fc00b179106250173dee745d2', - '0x275738ac7b901524a7cbf6baf3224f7d519c7ff5f091c6a103c2b37378c557fc', - '0x54c179dd492db12f5f3da658bf9a541d3f5f8ff7291c1df323b82fc2e60ef07a', - '0xd03bb12855ef3c8e806b034ae4793fa3b5f6dacd793de4c32e1b52a7f6519953', - '0x00f79450e7e2abac4e984cc7ef8bba87d420e38c201731190fa6b848079d60be', - '0xd81e482b52396eaf06684b16eab22fdf92ba1185369f4cde6ba36cabb3d7d42e', - '0xac7ab1135fdc4e7457dc77bdd37c6f03cb25fbbb8a3f87e4566d5ab2377c597f', - '0x1496af1af6d2fd19a27134900e51ed229cda066dc0d6a707d5b634795f79d09e', - '0xff0ebf59a649be9fb6032d1513e01b0b6192a0d72bbbbdb1079c0b1997e3eb61', - '0x289b19875122d45414226f869d042e47d6842f968b532e0407b7beb4e0a69716', - '0x4ceaff10f50ac957e22f825a44fad965eab074b543d9fde4fd14f3849c0e2270', - '0xb540d5a006ce5f8cf3bfbf2917ec042bdc31b7a869beb6050ee79208cbefc918', - '0xf97014d68c35855a5233dc867391228ea5468149c1d1fddc4bae1f8216ac3d44', - '0x5f84320eecaf50609cb1e54646bdd942fe3b6d897b738b0c18daaab0b2a25444', - '0xf2aae99992285b85abccbb107439baee8021fe17af4939cbad67c0f188601ad9', - '0xe333c93b24aa8d750630dd2c6487f53811efc09d40b0ef27845aa7dca271cfc9', - '0x5fb679baaf96d9ad042c393fa4379e36d4590c3b9d9f1e61b4e66f9eb64c89f0', - '0xfd485992fb71830ab62e51fc6441a35fbd6c2812ccc2c1901bb798185de9de05', - '0x3b59540050121b1daa18b266d45dcf2f0a18a1164b990497bba036eb1e4c64ea', - '0x9e6cbddd521974dbbca8cba47e522a182610fc7a66170f237f47c38f0f852230', - '0xd7712b3e6be5d6eda1fd16c31b6a44a4cc18bf5850298f0be07a76555b012e48', - '0x220fc2215de707966f095e10e0f2311f401889a50d10272d3cbd185a3ee48728', - '0xcfb77d46bca64b8d27a203d7348a678941b73ceb3f04fa9f61a355a1bd7f5f21', - '0x963e12e1dc89fa83d43ba13c30c0d3e51f3c555906cebf185d54c278a5d4347a', - '0x8700851ccc02a5a8bb604cc5ec5f4d80f2af1fd1cc6890e9141050e85913b6e7', - '0x4a3aa3000a1dadd414110fd13c74030a758e85715247e5266218bca65f8d4f45', - '0x260e23449b34789abd9fb5c389faf5e0e3da838f29e7aa6dfab1e4723d785ea4', - '0xa93edc019e772556375f6c96947a24ba909aff7e926132f65b7c046b8efad053', - '0xe7dc31f5934ca33c4d03adec23b0e0694df261d9cae16ca6112fc237d941e91b', - '0x34d11c25c1f9513f8d678dea02af23f0862c644b59e36e172dd62b6f7c090e52', - '0x8366bb07e0dd718858874292d7d360f91c9c1c77bdc1c3a0979de4e458a65777', - '0x4967c4ddf29a26acba787fd804ddf642bc29b847dbefaa3422f960f8a216abec', - '0xcc7c9872f1471bc087b06d0be53425020acb39ac3ae4bea696bcd02d0517ff9c', - '0xc3ed3a8d046cfabda14b3e437837d566aed902cd4075630a1f228578ae880625', - '0xa832412e4370b885a94f1ab2db0c6b91121b9c2ebc6e34e53b89ea6d080bcc0a', - '0x30eee9ee65f890552a3f7cc2e9385f655b75033834a93a132e81ec8d56c1a5cf', - '0xa40219b9511e4cd9aeefecf732fecca9c5e452e902857818a6cef0429acfa6af', - '0x8c8f6169638e8fcb57198a7b381dbea0f6fdc4f590f084b005bcb7aa1ed8b546', - '0x8bfc289662b1ee13bf21a3f83a3dd0a5d6ef0b5ebe0952e71d85aee0093b731c', - '0x4cf716e665d1f6db9d352827c99ac2194ffa430f23a54a31e5ddf47c9366babf', - '0x65b11da9110f8863131018e2968cdc743163b960507092230821e5bf2285de88', - '0x2ec8a425b30697588d73644839ba7c81bff21298939489dc9b99d40368ee373c', - '0xfc0b039b45cb4f503142d56a6cf991a81e4e95b374bbe5e4b73ea9a9855d1a10', - '0xbf8fe44a365922439b8fc07c309723d5f03a60d1aa5ad9b4b442f99bd7f883b6', - '0xa18acb1a94e71c9761fab71ad2c4cd181f61e01b6370a388f59a247967e3b578', - '0x7e3794da024a60146348c188b3289811788deb0b8229c143d2dd06bbd8b4e9b0', - '0x2a5a59c9fbaa2cfd258a630621242dd97dc396ddfbf4612f630b0251cd9f478d', - '0x552837682157ee7e9db952d71fda31cf8170cc349b41f537a30dd2819a8a367d', - '0x43b98fbd02662feb6209dc96de19ea391c9a48c12b23332643d1ec198aa3a05c', - '0xccc6435dff1aca314ecd36383983f3763c7cd795de8a9ec70a8c11f0713a2a38', - '0x690ce5588f2321e848e1c8e58f71f4d55f9cc8cb9dd288989f5cf68cba503bcf', - '0x18920e7ae1abec6e43e978c07dd1e3c2597f0d71281af208f376ca68ec72b067', - '0x3e5e783ca254f7afa4731aba79a32829db56c4a562f383f4b7f0fdd230a67c3a', - '0x4d22d48a9e32ff3c1a0098cffef33a6d33f77dc5d5add58cbbc1354340b9d832', - '0x995aa5f2dbce313f0295d6974370b0aabd0b595e4b470c922ff8fbcf4dd9a5df', - '0x7a9da9a8ff182ce13b0a0c741ff10f815d0dfb3d89b76376f5580dab19b521a6', - '0x7ce0ce6d9cbfe92ba9ede6abc8b3d01e698c1028f52bb618b5d583a04e6b4814', - '0x28d450a08f53c7515b528b6509ffe089f869d0c66df48cb7285ce4ad6de36345', - '0x63f1f808a3ca103f1c18c96e668e1befa1628333f1ce681e72951648e5a330a2', - '0xea9d3831ad2a3bb23c34ac08160b645ee2a0ada490b5a65e84249f1cc56f9233', - '0x01fb2c887231553935d2ac1b9dc3a6fcf94d37e3cb7891dd82fcd752da2d545a', - '0x848635d03ce3ba750fbad7948deb9ad88ad54690fd36586c27cc0460357cb376', - '0xdd8b7acd7786c431e22e4ca239a57e34ee146f6294e9c211f4714f5c1374b4ee', - '0x854950f2678d0fff0cbcb1ee2185062d9aefbe9dab7143b42fbcd436f0155972', - '0x50a197813945a826194bec13305cbdb52e54d8b78479959c2e5cd26d6fe6650c', - '0x93537e5ef73b404e586cbdd2388c9f77a57637418d66e307000f1e36f6fd43d7', - '0x1d45ddd2ecb747d1e646310f921c4fe7929cbba04caa2fef4d6ddc6ac8508aad', - ], - transactionsRoot: '0xb8c8b30535ed30d3f18f37e4f1f68d5b25dea5826999f2c6ac8b145f0ca44441', - uncles: [], -}; diff --git a/test/data/proofs.json b/test/data/proofs.json new file mode 100644 index 00000000..cf2ce2b5 --- /dev/null +++ b/test/data/proofs.json @@ -0,0 +1,45 @@ +{ + "accountProof": [ + "0xf90211a0dd3f099161c53aa0cd689b12ee7e11b1dfe12204e97fa476836a6d167cc32e0da0eeb437ceb650bf77279e8fc66e3e15be047a990608d80fb69ae96b534d685671a01338fff0cc003512b537e21e839fe6e3cae10d2b27198b84094fa209dfc198cba0b01bec031c9d2459e7648baa02a716dc4bf0f724ad5a92edcddf43a88baa2f0aa0e8cc796d55b6b1e67d22e774d284bc90ff52269d3bc0e8ac76fe4f2166a28fa9a02ced83121498a4f3259516332e130eab5b8f464f9ecf3d0f26217d49588ff5fea03dd15cce7d973420a1bd83e6a85e3b2e10eb9bf87654f5dc2578158b66d13e2aa0ddcdb368cfc7ded3f5b0b9c55ec9ba22029568411f7132a52c887049fa4eda71a0301518eebb04b9626515e3bb9502cd62ca7db330fef0718d27e100cf3e414c08a020a688e05a68661efd9e2f14fc0729cb8d9416fbd6c071a7537b8ff9a3bf1949a02ce28407b1d8807603af6085c3f0353cec7139229769b3628a6d923a0680f82aa08f7daa83af5243cb221d830cb7d5933a97732411140f23ee2aab199e07fd5ff5a06169d54da16289af0d45d06a27db565e55d629ff3da95e9c0a460af6b96795e7a086166bd5eb714baa95061432bf5e355d6411c69b5e5b2d2f12dc90bc3c9fe6eda036818a4f4ef0cf2a4ca4338a684bab5b48e873ff36809d9d7788c9399ee6468ea05ffa3a3ae6684853f8fa0a9c241549b05fdfd710d34bea8e4bddc240dd88634380", + "0xf90211a087acf18160d47f489209e9a8174ab38ff69ae1745dc9ac63afed8a3f985c9019a04f254f51675587978b298ccc401fcf10b51e553ce86992a8cdf8ccc70b8c1a4ba0c024b0c85ea363e229ba934410f30efbf89eab3ab4f2dfca888e374799c2542fa09d42de50a2f7327f411b186ef97558530dd44c7a7c7c9d85a213cb0cc5646813a02304e4ec150ef312c94b4153491cf9d9cce4267f8ab7409e1e26b7112f3d37a3a0d3be1b965111eb8ab8e5f82ff149ed54b4a3c0542b72486fe987daae7fb38451a091c8e4004c4d85915857a467eeb5896cab37324e6557ef786c8329ebd41ee6f3a08b75de581b9b06a5b29cbe24470e175986caaccaf0b290e51cabd37398ebad0aa0524fcf012296f9f1791ecab5b33bcabfa5655092db76354ba9afc09b04f20705a0cf9550e981c1c581e93fba9fc49296ba3a6b4584940fccf1c0127a85a9ea9713a0151665297a9ea63fb1e0a0d9599984ce82fcf708cebad8003bca4526a2defea8a052ee288fa7b6f07b6446b38b842ef4d386f551a4f5074d1a1618af3a4427aba0a08f77ba8f52cfc1674b47786e166c6e8c59c35bd31b99a89dec9e8aa26f20e6b0a03bd8c2a4eded49402bceb3b7cf63da2897457d3659aadeba813033323efb37c3a0a0e9039ef5596876108d3251f182a0f2ca3288e0d2c8108f549f75c2a6e34cf4a0c298c390d2ebc5371e48bd002a9567179f04aaad41b12150c887f6484b8c06e180", + "0xf90211a05dfa02fd24b0bd161535c3011f719512dca49757539de9de8cc7c0f59b8d5868a05c062f675251f7a9069fe599edc1db7651a33215f75d15ef22e1238bb15d8648a09cfce618fcb7c40586d01d34effa6b3921ed748a19de29731888cf3c14080808a0fc02d94adbc75669014887f16c4e38f47b7bce155778eea3186b267c66bf3ae1a03998487a8b65abcad9c14307fddbcc88a4c9fcd73d53de9cf2134ec25b142fc0a026de5439f5e348b16450844777927fae5284a68a7076bdf0950c0c2efff61e5ca0b51399a2b5e14dab8706cf6a3c0bc4e2687e2387ad37868b90f43059ff4f521da0cc1043a2795a97c393b1031868739005d8d2f827d26b8fac93d4c35458419bf9a008c4c6e1bd855a77fd614bebf1e9f2236288f0e75c09517fa8efb05cc2c17ac5a05b467e89268bb8993a172649e7600c2cdc01740b6bcdef1fe8a20e6a68441856a033bc256c79b9c2ac53e8e663d767144071b798f79329387c0c4c57f52ec5d87ba07d347c889cdf8dd8ced9816e04331e35bd23969ccb2a142e6625b3f46bea1328a03e7653696419067c67903436c19169064cb1e7ba9d0e7911c7c272d3e68981f5a0c5973351e783080a30c62ec1dd41e93d15ef655f4eecc1d64eeb6292e1a28eb5a065eee159c5503ecc88603d156bda3155b09d9c8d37e07a2f7652d6e9a7eb1784a0e22e20a47e88810aab266a15b0ac9fb4504b26c5f4bcec01b7f4e837a1688d9880", + "0xf90211a02ab9d7255c75ac40b80ad8c63c0e60d0445a982d9c8e168f73eb0ca6af850e2ba0356adb007f7eef536a1f3b3121d3916351bb7a863b1f974e2509c3ecd7f6c2a1a04ec5c9e5f8078119092e812edeef6aa27b39ab69c7440931d0753f050f784463a030c219849b97f0f3e53c727724f8a536111b119ec71b464612048cb2ff9122b6a05a7b0077149a03e0a92e9eef0726fe44c05316c94d0cc9e2974bf3d8d3f113eca078c0f80ec0925387367b80575e0fe5ef796c9ede12e98bceb7a9503d0146bf00a00691651fb6d765ad7d7eae17c4123706e38df9fe3b460cc5f36e7bf3c1bd4822a0fcabebb8507355012521ca5fec04ccc7c55ff147a78b5c5abaac9e1eb27cc0b5a0ab9fdd40bc981deae623127085c6c0e3d64eefe4e3fe159faaf026018e8bf44ca04ce55450e92f18db964bcada371dbec3c81297542e066aa008c15aa5d1445147a0a4bf8d5a192da5975511ad2296cd196fa68dfd3af83e4a1536ae07da428a4994a02653f7b77f012cdc8242f1f9e10bbab30d73a90edefdbf1c344ed6ea493e5379a00d7a1ca3ecb1b14748cf9e7cc7112a63acb36addc63e9728f30945c2ea69d214a0568ea2251d7fe03070f23f65d96a3a30a148d045078486e04ffe8a76c76f1912a0b7b6bbc897b196ecc6a76ebdbf43586ff30ff83e82253215f36b56f9a5af2951a08655fcdbf58b1ef1f04b8b2f4cf7c36bf10cd2fa8cbfa3e66373fe1bf5d7c10680", + "0xf90211a01fa205fc0ba5a07ac02dcacd29f3129d9c7d38900babe2ef202337f6b7b29b7ca07a2954105c8501b4ab591db1741f24f13374c0f86e936cf6e87a8f722c26d267a093d502ecf1b33c2757a6e02aa9c559e09778e1fdebd1dbdb4f2ec2836ad7f1d4a01a7d59ed637dbbc4ff6a66b3fd024eac342d4e72cfd39b315bc4aae0b39aee47a097227eb69769c263beeaeebed78d6175b7b7b6e5e2afe208972270f70d7cf5aaa04a8f26d74bd9e4df4b4d2af22a3557b01cc02c1468ee4296268d3a799953a847a0d3354c8d533d3453df3f05c5e896d676ad21ea261749e56be5b299d6db23b912a000ef7ba1189889cb1389a5fc7ec33959c92612a742b1fc2bb2afb6486d095826a0d18a2b97353dfec583670aae4c77c30f5257a7dc88de04edd8d746c5365795baa07da7dc2983191bfee9fc3931a4061a7187d053dd6d8a25a96f1e8f8811903905a0cc595228be38e47cf832367aa1a599845bc5fb8954905ee6b2f6a5785072e0a4a0ec487d8323ec9844813e04f85ec1f958eb0b4b6d4c1d236421b0e69448887828a03d4546c0904a191642c93cf7f47f29a8f405ca119dfcd68f6ac12e5e234c1e3ca06a1fa0da9c76130df45eb289eb42083231d0abc70b948e2421452130ad401a87a0f4dc7e3504bafa391477d8fe07a5ba9c930e6f05f042b6731b420d0f06ba73c4a04505202b85df9849c8d07ee736385c7450563ebbb1438ffac034870eeb938c4780", + "0xf90211a040cfc901650fc1db877002d346058643cf5758da3b8b04359fa3ed9b44ddb1cfa02d937ab7ea9acc0b049eb118ce273245be275bd179cd8c7f811fd84919abd454a0c2791cebd7cadfe99b839bf00720e6f76e2a845bdbdecbe08a74b5323d282455a037f5a4b75e2a74d9f15e703632872c6e6d4b6c16a343ae5eb983846187adf204a07faa46ab593a3effc0d8e76ba18f970d308f5368b132e1f79353c8e8cf1a42aba0fd1d93da6dcedddf74d2c894a281b2e73ca0cc62ba71fa939b30c602d3538e16a083ae30605a766490a1baa8c69d0af3cf0771ac8fd607a18c0e076a0fb29b0424a08b50a09c727cfaea7b5ac46095336f1dfd143f1cb0b472f272f1f7aab9f99484a051675d3e7a412d7c023d0b6c1c4d9ff1d320b5f34ca0686cdae26597f9d606aca075309ace68591645600028ce2807ccf3dea29014793579229862df9dfc8b1698a0d5f44755135d9a2446371d79b3a109c44b17587c380715ef28f288885790d1c2a0fbc7471d3920af36443ca0ef90e72faad59e9ba755618287c4e96ab3eb1b4cf2a01e80ea9c117ae952d6148f656f5724151439495b658fdb5e02bb06bfb6cdbb6fa08b9b7b0dfbb4667f1234a1d7349e86488fc9d48403d8a7285c6b07c86215f802a0fcf6b5021e242d4ba7f92b3806481060e316645617839d9089617671cf4cf979a0e275ded79ee8af4dc01800cec4097fe5597fbb8882883782e8ff29e174d62ee180", + "0xf8d1a0f0989e4db735b50a7f576838749e58d2806393a5d5f25ecf95e48eceda733ae580808080a048b559e96c592c2acb2ff8b026f0c835ecd314b6498f9d3b6449fae75af1cc508080a0a09681024d1ef7fac54af891ce57555bff8d7faae8fc40247fa5c1306032cc628080a060451391141f4b9e3739e5d5c229203a81cdac925d672f610deb2f6d4b91e13880a0e3a8b7d32183fc12b277d9de0e33ca2605abc2c596511ec1c2d9774eab3118f180a0ec8af58ee14b94fe0c95bbd446f57ed92857015df60f7bf4511f2dd24cc71de080", + "0xf8669d3ddc872580ed3146e0b639b103935d2a6c3ab3c4d5a4aebe058aebbe07b846f8440180a073cdc9a13c5a0a165b5ccb7f33df070facd1b2f5da53a6c4c951eb34ec61478aa098a3150c9759d754a4b31f6fb3f4828371c60c2c07fb0754cfa2b230cb601001" + ], + "address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", + "balance": "0", + "codeHash": "0x98a3150c9759d754a4b31f6fb3f4828371c60c2c07fb0754cfa2b230cb601001", + "nonce": "1", + "storageHash": "0x73cdc9a13c5a0a165b5ccb7f33df070facd1b2f5da53a6c4c951eb34ec61478a", + "storageProof": [ + { + "key": "0x1f209fa834e9c9c92b83d1bd04d8d1914bd212e440f88fdda8a5879962bda665", + "proof": [ + "0xf90211a0e37c64a088151b1bbdf0c8c6f9a87e7266c2883da61470d2cd829fec55ab71b5a099b9b3ab83b1892c0edb5e52a2dbefe095b610a6a167bb60fd674ad554bc272aa09cc2817c21c12dc38f0a263f7c062d55c73175273a0604c3c81d26b136b071afa052005f77adf11694ad5b3eb54284bbbf447585c6cd9d5c4925e97bbc8fd13055a0229b27fb717e110ae1ea3df3cf4bcc0768f8f6f2c030355ad28a66f0258b43c1a0bf8b6f79b25512acf14e66e63b9f7bd8d413054d3a1a134608fbf8d361edafe6a08fa149eb9392fb2d36adda5dc147efedbb8c29154fbcc20b361003896c1ca0cea0c13b0c610aa108ce9b33d06f737016951cdb29b93dd60968b2fe64c1cc9ff7dfa030bfe11e8fbc4e770e7b00acba8210fce677f2347c852a8a82b633d295cd6467a0d154cc0afe45358d551d9c2b3d600ed7e7c5ddd24a4603674a166c55b21b42a8a097391d419a060372ec93cc92df9daa012f737e3c036a52e5bcf3edaa4497787ea0034c5b40f2d150b18ad61ca5810b92c0a4eb63b15a6608997915fb8fba1da062a02668d317f71efa78cd60a7425e6b8e45ab4d6538f9e23454dd5f4f502139496ea02445be229ddc2be9925ebf500b039c759fb939e757c101dec7db5ea3709b0870a0194cd8d074c7903098cc09b7721d471768d8dfb7fa3151682c06dcad2aee7614a06be75261063f4ca900359fb78f82b385b0cec9f4270f87f4b44a7df9182c261580", + "0xf90211a0b2b751f72cfc1631f6d60802a8811331766cd5657511fcf1fe98697c5c8029d3a0d8d8938945acd21c55f42528931b9e3b33034a15d2132a949e06b96c32ed4a05a02140cdcbf65d647398570f78139f04c563f9219396ac90522480d3a5317bf733a0613628434fbf2ec21c41bc14d89abaea91bc8296306241da1d6d2ae29ce6cbe3a09322f2b64d1253446a7ccc5f8d0f0d49ec44ce7ab8c03db47320a0f3d58e3faea078c5693aafcd7fa8511f021966c5a58988483f0535aacc772b0928d45a3b64caa05e1a2b39e9a896c21fa0bf85cffe9b3624c1fe6c15f448d76a5e3980325e9173a07b209c21d691744b8b230d21beaf9a82ad356ec1ca431bfa2677c976872bac50a0eed3b53bafe6b6287c3e3b6d55c3507c528aa4fe0e71d2dcd9c591c53cd69298a0e774abe2e5187acb4f2f463a4d2777f31a28c9425010da67a06cffaefd08aa05a0d04a53cdb67b1d37b31c6112753a9ab423f5b87155308b0cf71e59ec157efa96a0961c2c520dfd79bfa32900a8dfb602dcc73bdf6587469485fb81b73dae92aacca0c0f1804205caef2db35d8e0ba4b6edef99db83eb96e04d55afe2076872d7d69da0c85e863ad7a0401c9550cf550a885026c8db2fd0d93c9b79c89db9d3b5bc5c3ca0bad53e548cb46afb689ce1d67c7864a6e4199ea00a42f2bee8170ab918b78712a015760061242068c8b50253867b552aa5272593c85ba7e717a26788eb9c3b024780", + "0xf90211a04b26d92829ba2d3f7a1ce979ae9bbfe7dc49aa5a543feb7a9aa776d0cbb3e507a0e705caebb6626e6c48698cf745d7a74d1d3123d7969ed08454c83282f9398e13a060490d80cbe55f1a0c00b78026e380a4b29178ebbe0f5a53590367cb89b13ddda0a2721b8b6c84ab1e2782a64785bb010259edfe64f92ba553c6983dc434bdcea0a0139cddce330e5243ecb41277cef25964b61f6d2d3ec5ca5d8978a2112485ecd8a0586268adfe2ca2a534c6bb5ac0ef3945bb33fb31fb1530313ea7285f3a839f84a0822c22796fe4c21eb66a303b6c6eadbe7b9aa7ceddc5277f34a92c668b0499c8a00eacfa551fd56435dfdfa3f274f7b9a7aee2e9242fdd4e509fc5ded1b7479159a0e1e864f5883e192dfa881a8706947113cff5fec6b5248987dd18606a31f47631a0579e096e51c66846ec4e0fa18ffef146ac1e0958e0d6160f97860229c5a3624ca0ef4fe13bfadd3d7df1d1454f5a7cf600296d68d6166fb81853dbb4cfcfa625aea0975a4d5092c95b76ef2551117f93e97000befae22f98968a328a8ec5a4b9a4daa079e250d2b793ea66094ab2f52ef11c73e683b0e60e9b9cb4c372a7eae408faf7a09b5152fb72811be751e1665228dc6422289c0993d1645a49d2bfc87fa830b19da059a43ed1f0a99dbd5686752ed8d853bca5a8c4f16a277c576dc7dfdad6536ed9a042cc6522c1274df04e6e6171271232423598c6cd31df1be1c2a8f84cc4992ca680", + "0xf90211a0856a5ba0f76d597044552bf2144e669ed37d2d60ccf8db6806d1e6ed390793dba0bb624b17aa5413eb4f956dde91fb98d0fef735c93ef0ab2ae6423f84762511b4a03dee18d7b780f6f21457964f785941bde382c75fcd45df8103ac3bd3532d1fd2a00e50bbb3b98de7f8ce0c9507a0a015997833690415c6f540126541753ed43f4aa07c908b5eb9de44c1b1482e480e8b2f072eb4ef21b2c01c832fe78064cba8c0f9a081b39923e4499e5781218ab993a266c374e0c6d1c23befa389cccd6427af04e8a07ee20a819e430aa2f3f6c61302df74fbc8f9d270c64acd2f84f797f12d7afb88a0e53e7b15fd95c077123433979f440530a8a41d2ba77b3d70f7a4f4212619ad64a034ea6136c2031aad9abceb5f8f339e7e922e1b78c72f0338088be6c964e38a48a0144061f2472148d57aebc53a101c76d1ab2d3491257b90627fc84d08b2413a14a0f51d5eb1dba609524a8e6d1aaa69fe36228a6050dfc8bac211f1c9eed622ec79a0b1db6c68eb339fc62bda7966d46d9424c775f16ef55911b1be47a54648875f05a036f65ba9df1f7f815b6da5a06de3390d980e122126ac6d9442b2f09d96715feaa0f1dc0797404f5b021716719adb3b1e73d184a0f0886d60d6fca24b875d0af138a0b32617cf2fc5b7382632a870c301a2b9533580d9cb7709ab753011c695d15ed9a01cf3215997995bb7807021987d45a2e420d8cf1a54e6b1bc17766bba29ccd54d80", + "0xf90211a0bdbaf27abc7a7c5f56132cde2e5a16d8e5deaa36ac5b3356a6c69eddd870c0baa05c93236c537a5f18996d6e18534b1a0948dff057b8b1eb6a7ffdf5dd5e0b7884a08ba7773b621d4451766846fb2839717c23a3461778bcc79e058ec7722fb66b03a0d5279a8333868fa843fa6bab8cee6a729b759fb03adae50d0fba0f800abb7349a0a613ce723a8d950b4495a23672dd5395902c9e26c099e8de1b967336a7792c0fa0565f24504219a044acf1a394ad4a553c3f2148473119d59759c0db8b8feaeda1a0f5fd49580469d9b8c09b591a0e65082248e4cabab6d7833fa8a9772cc7ca8b08a05a8349d7fe1f8f07f4e88f32680a54d613bb445beb9017253ea33189c09b96d5a0504a582785ef1c15fb23145233c46cc8dfcdfbc8e68b1ba381b338afb32e3eb0a05e471794b1e470b3f8e6b0fbca2f73740106d4d4f9768f0d59ee6986e6cec1cba02088c14ba45d15282bf51afb27da453b293b75979752cbf30096d060e3da1423a0e6ab8c2576b89d2f61a3fbb31f84ecb94e55787bb5d6c7c0257883160bc5bfffa0d06606934c6ea66ab058742ba515dea6f44c71b7c0edc51bf2ca4fdb96f39964a05af31c24097d4da5b804eda4d82cf59a97019effa4a27c6be00f04b54167558ca0d9b85112d62aea59864c6a33cf29de40eb58d546d79886c7556c78a477936ca4a086c0569596e26001ec648290276ab8114a7ff20ea02c82f9f903063bc5eb783b80", + "0xf8f180a0747019ac2d06a786aa651055e4e863c01a35e0571f634300acc702c06289475a80a0c60807f642aadbce39ea19fa93b35b74d493068e83f19b50ef4ade078e99d72180a062c6e51015aff520c0c63d29e151a34c7d9e2ca4a309dcbb28b0cb99dfac690fa08c99a097a9e48a4d33dfc992c153a600e8ceb31fe7a9d7075020604c9e32b4eb80a0d1886ce4f7ac555d45897a1447800c6e74b54e8f318523ef5b91d868c1b6a8548080a07a70ac40546859ef4a0ae2ae35fac945559967e181be7401fa6985108a0b560380a05edbcf59dcc71f075dd64b3d12e7d3af05eedb49459c7b6974e3bd56aa9cb85e808080", + "0xeb9e208142d6decf8376a8b5493cf1b89f680a197a01627db2b6cd39f0d80c5f8b8a2a13c4b40531e0f829d7" + ], + "value": "0x2a13c4b40531e0f829d7" + }, + { + "key": "0x9dd2a912bd3f98d4e52ea66ae2fff8b73a522895d081d522fe86f592ec8467c3", + "proof": [ + "0xf90211a0e37c64a088151b1bbdf0c8c6f9a87e7266c2883da61470d2cd829fec55ab71b5a099b9b3ab83b1892c0edb5e52a2dbefe095b610a6a167bb60fd674ad554bc272aa09cc2817c21c12dc38f0a263f7c062d55c73175273a0604c3c81d26b136b071afa052005f77adf11694ad5b3eb54284bbbf447585c6cd9d5c4925e97bbc8fd13055a0229b27fb717e110ae1ea3df3cf4bcc0768f8f6f2c030355ad28a66f0258b43c1a0bf8b6f79b25512acf14e66e63b9f7bd8d413054d3a1a134608fbf8d361edafe6a08fa149eb9392fb2d36adda5dc147efedbb8c29154fbcc20b361003896c1ca0cea0c13b0c610aa108ce9b33d06f737016951cdb29b93dd60968b2fe64c1cc9ff7dfa030bfe11e8fbc4e770e7b00acba8210fce677f2347c852a8a82b633d295cd6467a0d154cc0afe45358d551d9c2b3d600ed7e7c5ddd24a4603674a166c55b21b42a8a097391d419a060372ec93cc92df9daa012f737e3c036a52e5bcf3edaa4497787ea0034c5b40f2d150b18ad61ca5810b92c0a4eb63b15a6608997915fb8fba1da062a02668d317f71efa78cd60a7425e6b8e45ab4d6538f9e23454dd5f4f502139496ea02445be229ddc2be9925ebf500b039c759fb939e757c101dec7db5ea3709b0870a0194cd8d074c7903098cc09b7721d471768d8dfb7fa3151682c06dcad2aee7614a06be75261063f4ca900359fb78f82b385b0cec9f4270f87f4b44a7df9182c261580", + "0xf90211a0447313f67244163748acdf1f5840777e33714db2fef208e4885ab23490072829a03842805a42d38927fc5b4a70f510a5728637a8ad7de8bfd9c789a7a6b56f8ccea0d105907056b875ba65f3f6b01a627223884db53c0d688e8dda36b20b55956b8aa0121d99931641abf08a59ee8ce5f96bdac8d3f3344949b2a5af396c092fb04746a0f4d91895eca9759faeb09de7ee4dfc67bbc99f50081b76b381a08e4c2c140ed2a05e699a3c2d0455fa6950ceb2a3a40a0f56552be5ec9580cd95e5951656dda5e9a040a3d6776aa70fc02574823bed73b12eab9e7a8aad55958fc25e75878eaf455ea0533a90e68b58921c8f1f7ba545ccf70bef96a1e98c8fa7e38cee4771ae806577a0648ca5e743976a02649260ff5f9944960ea6e0173ed91f80e31fd71f656327d9a0b89f728bb6f6864fe45bfddd12941ec9e79e7e4a995f61c69a9dd05917695bf7a0f9a757cabc572f9b4069f444d25dd0cd8201b6cdb475d3533444d77ff43e6cf0a045cfc98eba0134a0b3cdf6a7b3a08ed64bb232a49b07da59411b70178cce61ffa037cb5a2504fbc98bd260f9180df7e83e6131e58f8d87fc064ae0de8df8b87b3ba08c8c1b5ebbc1611e47e2f5427e6764df1aad145328bc9bbf4f3cebbf78e59819a0d377480bea81907f2b9c43cba5c373a6693ca4636dabad91ab5eba4fea0a86ada0180e6c1d308c8549de6b6d5b2f4fe0da3d35f2f03b0326659f7dacd020f5334180", + "0xf90211a07f30e7b273906a129c83a89af35ebd5a9242406a91d89374b1cca8750edca45aa0dbab208690654b915a9efbedae8d15a2a8d67ec7fc148dc4e4d91f0f7d235406a01d210b5ace433a99006c5156167f332326d70d9fd803fe4a643933224599c969a0f8f0a2036d5e14568e7f9ac2bf78408e4f71c93403afe6c67370717cd77f938aa0e98fa8fb0278fd541f6a28806ec27336965a58ba2261bd2350a80b1328076549a0456efc8ca11f9e19b6fb15c21ecbf22db5fac14eb8167ddd8aaf0fc8f5a8ed3ba07abecb085fe645779058af42c6a70505fff4d2b9dcb667497bc9498b39e7debfa06b1b7b4183e44f0a0eaef9cf5a1270a7defa990e65ba316613a3613aff125745a0ab86224583fdf7fe389066c1c8b147a45e68c5a7462d7d8192a6af2ef4a6de60a074ca70d0184db3117e0c01e3af0f5b02613f2ac77c4a6e05a952f0db2ad505cca0621f14311c3099e26a8826747dfb29396d3db0e0288faa0befa9da35f9acf5bba0288dc305e2c0894470e32b9cdee591f6f537f44fc3de8a06544a7911988315cda0448a4574183a706802190dc4c1c4e9afdbd9259c611f86d0f33cc47fa967ba1ba01fa1ac73f6c52060901d83b5f5ce5ba9528bbfe28e6fdeb362ffbda309dfb5c1a067ce918ee7f5e80d1045c14312901c4ae610446644b405ec5324fcdcb524f94aa07085d0436f0153d40fb9784e5f02ecd26d8bb885de4ef4e72efcf6c2389846a780", + "0xf90211a08f2f8a7ba420c81175f665a14c1c7b3bea6ba15d07912204a7149caff2f00fd9a0563588ee659dab63e960b82758c0f7b8de60c431ec00e904048ce73eddd931e2a06ddc62dec3e68dd797f4a7bb67f08dae4b03f0abb30b24604f2219f4e0bc4862a077c0f7f5a8335a37d9b0be1d8acdcc1cbebcce312218604e279386be572422a3a0a0b64c050d88cdd5af75cc8ad34a3fdab01258e605b74e734cab4a80765daae9a0fb1949193aa23d93499cb81623d2941f73303331c7a69927c60c39f00ad670c9a07db03d219b71bb7fb3b3d9d734589bad6cf6fa66d7653e4d773fc9a985601bcba05247e8f2d47a35d6ed5f7d6a7a790ebee994e410754e536bb22982caad20a113a0a519063ed8869d33c3f15a51b2ca278241dd340bcefff5a7897157f19042a925a0db690f50a0c948d0196057524b938de7b08ea68a593f5a2be2c9f167ad5fd326a0e7bfe1822cdebaeeb4011a67da0c30ee392ebd095d138655e8e0524691c3834da0cf47fc1f15922c3843055cc11d37aa0194df5f2a4312e34926fc6d7bf4038ac3a05c61a1650b2cc84c3065dbcd8732dff386e1f7295c2e9ebeb2bcbd1ec5e3929aa0154f6faed0ef07f57211eed43a7df39a41bc712c57858ea5a1c8137b0f3e014ca05cbefcd3262931e19908bed7041c47da7a05667cacc137f3a360352f5cfba7bba04f90a6db1466eb840eef38bea9f42e015f1694bed9603c47ac13e0df420cca7280", + "0xf90211a0b1b42a7a63ce1c45304f6eb87f0fb0b56cad5b46885639efc2e88ab00baf8d1ca0968da090125f2b7fdf5786f103372e7c62646628bc4299d912f8152782f70c38a0887ac3a58c125e86404d4bc3c415be643eb50ec06947eafcad937095c36fb00ea0f72ac4f4feba6b77785d182146b249452cbdd35f5ea4d377f2b1839c9ec44519a06986c6611ad2012e5f46193b366ed85f211c235d966c41fdf9471a3ccda68060a09be2952cea6fec638d5e9786c03125989f810165af9966a5779dfa7c570f9406a04ea3e238b8020cb0f2e2c92222021a8cd997809b8cf8fa1f8017ac07e2524a59a02fe5d06a254187accec53757da5259bc03380d0790f6beb28bf395d0effb4f47a0c9216078fe7c9c49929d59e3aebba9c79ca999600bbcfe43cbe8a0e755b1745aa0ee7c1178244a653efb7a3a1229e1f193b97a0b0a6c0d95fbf850242a6d82c741a0647951685af042eaee386f51c9316701ed010896dc9d710bc611a6ea92cce9e2a0b28a35100efa558541dbf06b6544ced188c4d1e7a8ed94ea29df78cd0c577aaaa0b3482c520a7585d264df7c4a04aed75000a8ce7eb425fba947b22910c76adb02a04faf43d428909e9cc73f55240676942ca9e3324383de038668006e7a0cd29a94a09f091556e895d455ae7c9dda680de830c828e1f5b435936fb6edc3cee0f3bdb7a01b5b04073c5dfb703b3676dea109d281212589ac86feccd177e59ff2ceb2d31280", + "0xf8d180a0f8d06f8eb9933fb3201b21fa66153ed509a86c45ef0aa62d2aa0ee04a43dfcbca00f7e3e760b71154bd2122e52a8a327f492ef2814a35e664fba2cb3c9aa58366e808080a04d00ebf62ee011be765b37542e65fa729e370ebdfb4ae1ebd5913f9f154630b7a03879424d5a9dddb56ea5831c80a857eb33f0254977c8462ddf28d8528b1d4b9e808080a04aabb69c8670d1049df120908df2328a57a008449fa7ae0a353c9b0bcdb9e583a0ed44792d495753bd25a362d9ace186e3fca69acc1d67dfdf703be408d6aac3f480808080", + "0xeb9e20d948e006fe566f96bc87ca18bf0a4bd94153e16635048b3aa405e1aac78b8a26d16aea9a19cda40000" + ], + "value": "0x26d16aea9a19cda40000" + } + ] +} \ No newline at end of file diff --git a/test/data/proofs.ts b/test/data/proofs.ts deleted file mode 100644 index d82d173a..00000000 --- a/test/data/proofs.ts +++ /dev/null @@ -1,33 +0,0 @@ -// web3.eth.getProof('0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9', ['0x9adfa33c5673fd892b681c9591b41f0c1315a7c2d7601c0fd4386ad6633bd674'], '14354583') -export const proofs = { - accountProof: [ - '0xf90211a03172c84d2a64e3ca6a2382900108bb213e865d337b4023eb080785480b26f4e2a0f2aa24adc7a7a65fb2ac1243b11686726969540d34e0c51fd7efebd77a2898d0a03acc127b3983977ab51d4c9b5a5cb4299441f7255fea8dc22ed208f1747f1ed5a059db8a849fcab77ad788cec58a0f71e244f01abe12a6e3a8b74f8066fed1b4e2a060ee065caf85e98a7c5c940c8619a380d6b45ebba7ca975c3c7c30c0a7cbb480a0532b7532ccee84db066e7e47d67d31bb7aab1c479c8a3753e31b8d8ddb5c584da0f22e216cef7205b9904c0a05008126a4e7d5f6c523cf0020b0504faa5c108d37a01c1bf20eac1f7c50c84e5b642236c7ea67094b0c54688f3354f7e6738f677579a0122c649f9ba71247c8ffda426472618703098940b8f7d60a84561dd4693d4a94a0db7b359113a86f351db9a163545ad7de67f6397ebefd4aa0f9ae78935e2aaa85a03e3dd8861aac488487c1e59d9201e17e1b276ddd9a94b0fb30db0724e3003db3a06abce9b3ca7252b8d9ba33f7dd3789058f046dbd7d207ad4cb1fa675ffccd346a0ea25157ed0a989ef87d2f493bff207d760b9b2eb25886169ee9b599be0198619a0fef8d761ce1e9f47c8f25d2b76f88b02fee8b3d9e45bdef40d37b788eba88af3a0add7a03710fe781ae865e71bf25e64a201ca93a97b17deac3ae9e204094e5d13a09a1f89bb5a856e78f1f8e60412a90c5133009f251c143f9e2a332b59e84b828280', - '0xf90211a0cf875ce96060e9bf12f8924b0f07613766e0302ba73e3566616bbed93279737ba051248cd8f18b9209802d0832c7bc21ea5818cdbe99e1f8ceee2ab1ace3adc7b0a0e7c00153d7a58bd6666ef512071557ba4a6b89dabdbf73f4d85584d47ee9585fa0815bdb764ba0f0a1fc05b216b4171ad55a74af94c0ec3bd7056ee7b8381f0005a04e793ae8cade2cf6ca3c417c9eb3aae1e24b6a1a595b941ea593d090cdd43336a0648a3576a0ea09f9f70bed6993e0d9da22fe8c626f25735d8affc71b96fcf307a0ceb745ec1c430bb3215259c2fb527b02061f69661cb89b2008e5cc8049234d98a0de4ceaed6b8ab1c3a5eae943e7ccbd4c224a2e43a0dba289416fb4c2bbf2dc80a0ce225c858a262ab6b4196380fd713f8b231aed1c39a17e207ea47f7e2768f8d3a0165322e451bc8f29470d2eea2c442e425992e623451e3aff1ef59d7346af236da0a560bc47ad51b15deac25273c1a7a1460093a0806c24e0f220a03639a2079010a0d53a6959364e2ed768372e2954c6a2f530cdf3e3f1de44ecca369afa4b1f1718a05671f51f94812ae64a3bcbecdef5749c471d55b27dac2c825bcd5812a112774fa03c8e84695aa3fba3eeed9cfb20ce1338e195d6f06a2a2f1cc8f6a608f83aa4d4a027f40a17c75cc638dc6c96d7abc15fb04a057252ef9ca28862aea894284adfcba0179eafa104baffbe9867f67fe7888e19dd4ccbcf13d249e7d3594549ebbd918a80', - '0xf90211a064e2878741ee5ae0853d0681ac9f9fb1367a0a79d65aa211d0c9cc982a23362fa001722023c8cdbce271a6b7cb7c7c71804629ffa04e65d6cc33c2a827b6f2dba7a0af31912ab08e24c4ab7a7ffa519307606a88aa238c3e34768ae51dcaef716deca00cd430be038a3196841b4c29e35fd33afa784c0e1efbdfc4aabc2e1ad96e81b6a0cc229738513ba9a68193ad4fc22e0d81e69652bc46b86b22c474d64b2790e3b5a04475f14db5dc390097cc6bc3307d24511a054e5e8c362eee2dba4294b88b1aeba04481f36c4d65a6dc702aa374a83b964316dabb44a338387ed93ebaaca55d08e4a0fb9e2f765fe97cb93197e3b29b693928eabb005e33100211c037df9b6d7aa8bda081d33ecb8963818ae230fd4a278e21a3c4325992d22452c0192a6d62db5575d1a05b0fa8ad313539f2b6fef504b673ae3b6eb7b5dfea166a0ef11c0b7c8d065ed9a0333cdd836614a64195cf37b4e475a9cd155a4cbf380b5f23075b9c20ea3ff51da0e790a6909d43e8021661c5687fb0c8dc6df13ac2d72fbd0757cd1e2e4898bfeda03a80f910fb2a3136a3a744782bf8a18f4292af65b6ef3ea929e6022e1eeb7d6da00df1f0fe730d14ff7e4920c2a55beedc4be5b688b73cc0e84824bea9cee00860a0154dfd5e914b10462189a7d82d73d67ce1bf87681e4429fb7088d1f08de3d77aa038593cec09ae299deba829bd23e272a6fa89fd3f1370593754758e8b3c17f57380', - '0xf90211a07bc8af196600815131fcfbf70ce555a27d29a153b8c2125c946627ab24471dcaa01c224f40f63f2a1b9029997d49356c189d3f5e5abb8238faf95f7695a026bb92a097332c8a4e30da5c89ce48c3fe221e00be731026ff27acfa0b099a63dba91e19a089ba4a8111a18d47559c4da08b2272380287ea1b86f721c5531ae91c3d47c37aa04ea7b94a9e2b38677de19372a8b31744bc3afee027bec9c3c930d4c6a79003a4a085ebf0d71d2f7dcef5ba2dbfbc611bdace08e09a9bf083da907b117329c59ab8a09058daafc942225d39c9a7b66272adf3f9eed1ed03a3e686fdd8db4ee1518332a04223061848db69e174bbb59532759e922d97d9855b2ab13811794ba8991d8cdba0fa47216ded8ee8190dafdf5d4f0d5de694e110901456765c3542e63c6692f71ea033bb0bcd48080de9762ee615212f0c3fe11326f1abb5f695a35434686e703936a05cf0fb5b0bcce18ff75ea857d8fd43e93fba4f8392063f3c26b1cc4224382765a0fb7912ca2d55a84e23666b7de0bca66b9c958ceb77d30e33e574c82c34c7a75ca0e79be4c50b6860bf7c448be6bed37baaadb849d4775a7d141ccb3d7c0b04a85fa04d799866a112d82ae2b4454923725a181ebe3fb9a9d9efd3537b5917eb30034fa087de36e09ec78275a0aa710696937b853cac4c19397d0196d3830faed72a491aa04bfcb82d686400b337a84f5477653dced089c167ecc6b5aa9af0605f4d5561da80', - '0xf90211a0559e10072babf1a142d0de7e3f3a67f09b9845e23b7107bf27bfe64987dc7bb1a0034baa16fbeefc5c12ac07fc5f6dfa2705a83081e07fc8eb3bf79181bf2497c0a091bba5507f6ff51052ab083fe54c4b0f3ed469cca631d70c26eaca75f5f204e7a0cf1330c4b3376b30227ffd779865cbd818ab14b8f1a50e91363567b75449984da0b63ee3c718751e5be09321f7af548c5d75e67bbd16636b4780fce34b82272b0ca0e2d4ed5d875a1bdaae8ed3bd55f8f67ad365310fea4928e5a93bdddb465f34c5a0bf2e7c718a1cc03ddbc2528e5e8aeca97f158270c3a5614793b12f55ab659dfaa00b60f44843efc3c100435437833395966f001b6869833637299eee0aac97669ca04fbaa88981c1a39bf65cafb39e268bdd05bf23010d30b9bf86bd9f539f81cba9a04eae4c46e104f1333816fe64225f8594ce66624c8514a8934d4c230182dbf5f5a0ee4e35f398b7cfcf3b2a68046987d41ba9628677fa75fbf1069e9db132caa154a08f328cd1bc15369477b86f1f60f5f74531bfe269cc9c5bfa36655c25494ce72da0b5f52114e2c9d3789fd845cce51939bae5141d0a6490840b7042921880376eb6a00c8d22f73b579a02505192444dc56ce2549239bdf2baf5cf919ad253a4e809b3a000dce79dfafb2258eb6b08caecc67ae2e29e0a1aea1e9f281c8c3fd2227536d3a00b35e093769e11b0d7d89c4c58aad3de8df44a25dd203ccc6ce301bf5170df0880', - '0xf90211a09591bec8846b4033bb96bf3ffe64bbbe28c3d905811b94ced29cb6bf80792dada0300347eea49fda3985f175a0340320e21eb2b79616f913d6167706a2f8a5f0b6a06d53d948237320e7490326dc62f66ed5799c1231f25f32bb5cc7e8d3a7e17018a01c5ebea7a0d040731c566eaa5169f0e3f3a3fbd1b4f6b43ad6fe767f31b60289a057c22b7e044b574bbad8b56660c63a9172deed53990da75fa3cdfc45b32a507ea0fd1d93da6dcedddf74d2c894a281b2e73ca0cc62ba71fa939b30c602d3538e16a0262a28697c08283c30f93a22e7c0057c7f6829df5cb26cb0b11db21983a24096a0cc3dccf21fa49f706d13eea40a878eab074ec26dd8a060121f7875123dcd949ba00a5f86e46e8cee3d8ad9fe0a906ee5057aa8d71ecb58540ca627c59dd38b63aba0d63193e4528035bc22dadb8c63f311413600d64ebb86c8316a2dbc143efa61d6a0ab1db6fecc599b6acbefe8a546508f5d1a92edb7ba4d14fa3e7194075ce4aa22a0463918e63c076cb0cfd93c4dbb57adbfb03b6c01a75f87470654149d4cdad9eda01e80ea9c117ae952d6148f656f5724151439495b658fdb5e02bb06bfb6cdbb6fa08b9b7b0dfbb4667f1234a1d7349e86488fc9d48403d8a7285c6b07c86215f802a0ad24eeb7298889461511a453ec92c2449609e6df9a063e872386ea35923fc1cea03389c1fa68a7cc891a00848eb96263115ba605c610991324dcfd2f0db859366780', - '0xf8d1a01c86067471dae7df436ee03c35adaa908cd8186095ee9f324fe5de4dadf5e0db80808080a048b559e96c592c2acb2ff8b026f0c835ecd314b6498f9d3b6449fae75af1cc508080a0a09681024d1ef7fac54af891ce57555bff8d7faae8fc40247fa5c1306032cc628080a060451391141f4b9e3739e5d5c229203a81cdac925d672f610deb2f6d4b91e13880a0e7dac37c2afb15ed8a7430e546c372b43486e1d9a426c790090d86e6e8c2c77b80a0ec8af58ee14b94fe0c95bbd446f57ed92857015df60f7bf4511f2dd24cc71de080', - '0xf8669d3ddc872580ed3146e0b639b103935d2a6c3ab3c4d5a4aebe058aebbe07b846f8440180a06527f4fa46cafbb5f9d310029584f1310eb0c2ec50360e78b6623035f54ff22ba098a3150c9759d754a4b31f6fb3f4828371c60c2c07fb0754cfa2b230cb601001', - ], - address: '0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9', - balance: '0', - codeHash: '0x98a3150c9759d754a4b31f6fb3f4828371c60c2c07fb0754cfa2b230cb601001', - nonce: '1', - storageHash: '0x6527f4fa46cafbb5f9d310029584f1310eb0c2ec50360e78b6623035f54ff22b', - storageProof: [ - { - key: '0x9adfa33c5673fd892b681c9591b41f0c1315a7c2d7601c0fd4386ad6633bd674', - value: '0x4187f2aa67875579c06', - proof: [ - '0xf90211a0bffa21cc3f0434c2abea9bdc49f496a635681a21ad188349cea3c845362af3bda0cc45f2fe3181b20d3584e26277e336ac5914084c950128121f4ee9b478978091a01f13a46ee3b27a350f64f66df0699bad5b0269a54d565d1ae57dc44eed6ddb44a0dade18e03b38d4f69039de99b88b11980dea2e86dd8a2b6aace7b9f679da1768a01e55c003e7038c676b21876a0372f25501c5a4800fae27f2d45f26109dab40f6a07896d4099368f921c4a5fe335d82a322f896afa2bb50af62783d92ea31bb6233a09bacadd97aa83adef80facb2e5592d6c38c2f567fbb325e27478dae8b61f947fa082b2e64c0fbff74c4c052d74c87cb0f25b00c4a3a1a957ae1491ec3a17ea33fea00daabf11b14cfa10361b4ec19d7b4da8d233d359221aef2e1654ae4de366798fa0b54b93e934a47c24e326ee6f70cee256e21c4170ea9407ceb002055791a71f43a0ef30e3be8ad6a016975c46cca6575a6345918404d93681d07448ce62f90667fba0c614cad777f411a79aaa3352e080ec0b20b93778e0d606ed9f05b5ab50aa3efba040950f13c720a3ca60d85fbfc7b3ef3ff2953738744c72f0f53baf99174c2a6ca0000206a71b10a514bd12c54dd96053b02dfabe4e5e4a207bd68903ca633fa08ba00c2af61f7ef919020b66103feb0049da8ba91d9c07c2b3abb83cfb728960dc33a0a776d94bc72c72fbac339795b92c80a5e5f776ee5a71928e6ac13a1084e4a41f80', - '0xf90211a0cebb01f2c59884afa2e1f71aff96e0daa2a44fc48a36c599edeb8205a8085205a0b3f79b28594e4efddf57b38af6a9b53a35204c7b6a0e20f9bd0c34f7e9b9b74ea0ef85a5da51965fa06a5f9d373abc609c7d7576052ef3991d393672118af06e12a0d1791ed47c227eacb696a5dd9b81dbc528ec5151a5c1ff9fde5cb2b1b85b9ab2a01bc87b04abee1bf6b6c8e64a52c1d160d322c7db3727e4cc8ff63216ac9dcc95a0a29795ec005d0a99ce03ff3a3a3b7321837bb530bd4177cf8ab82ffa98dacd67a028cf80e7342640712bdcb4888408304df080a1dd1c0d405119568c205c9d7c1ba0f495b9cfccb1cb63473f5329c39fd908afc4d459a4c90d6deb7ba032db930ca1a033a69887dc85ccefd577f94bac9220840ea6e69dc661918e275c8b98e7277eb5a010c959c5f5da71661afca1f2c26edb4cd0b7f91e5acf6e8687ff3776247e838ca096bb5c843e574702d4eca2a002342b1c322ca883b134fcdf58dea761d625fc69a05bd258a45d9e292a00a755dda1c93dd3c3ff6f0f17bdc346b5526fb50f161d97a0f42f65d26525503346c940e665286ce0a8736c37d6de555edcbf2656c9392b46a0bd90afbedb4d98a3ed667b7e13224ce6524bcfedcc2c68d1041c9789e7ad8f19a0b6091cc4176b818d4547673fa75c45a18a63d410d17feb4e97d210d85d2ada2fa01eb76bcee8833b44924cc9f6eeca4a5e66a35de3555c115caba81556c0d2d96980', - '0xf90211a0c9870c91a38b9f8b831196183a52598816c794d32532101ea81012cdeb0b07a2a012194bac71ec81d39aeac0fb2b7c4e7240341e938250ed1d1ac1f2260844415aa0eed4f235f539e2e7e99558320f15ec5f33a8cf7f2cc4199be628daf738a84d85a0209776ee4227cbd2203d2819d504fc967d094550d5469716fa9453cb131f6d41a06d2e12136a15a7672773bc8573c4c82a8a7847bbd8cf6e5909071b1dd6c6433ca04bdac84eb631e1aedb027da13f92cd254f7a7dec58c7145e2867334d573b2f50a09758a966a49bf0bb2c3ce0743b2274f336f52b52ab2b7144f413547b38609c3ea0d3d2074f9b4a7a82bbd328211e70fef87b1c8d3f493726f67c71053d5c297bc5a03f7ae6c2eae215c95c105034f2131341e17d0fbb2de0726a92cbdc85fe75f970a0b6b3ba261d784dd309f886222a0c4869f7738e31bb2db232196ab7929d2b6faca0c100f8f1f30c57aaf194b84663a79ed530f1959afaa34fb77a6565fdf8b78983a0ded700f45f373b1a9d1f52a6edffcbc26a55759b08d78e30c00219d311f01c3da00a0cea8dbdba5314f8aaaa303d5531e2b58a8d2c82863c53c5406f529a013b01a0b1bd4ce0631f9dde0d6f7ca05eec1b6e0d448d378810d950b30f35fcabf5baeda02df14b2b287b1e9e06945226654da58f92b9a89441517f97af82a4dfa88d7013a05cf2fb599a5d50667348cc0401cf40f7306fe7cf858e161f697137a95077ec2780', - '0xf90211a0a155624338de60d6dc5b21de7b7dd1ca550d65fbeeda14545ba28c4b3d5a0d25a0d5260f37eff95e456acab06ea881e7894a1b278a8efda6fdda4ce2fa6e0eb9c6a01ed0011deb98ca2ef1465c62d12ea8c13714f38fd947cab67f7a3ef28ed6ef6ca0db0b8f58d10f0ee0f72ad8d725808efebcebf89885045752c61711192e3dcdc4a09e1bca5d8c884fe8f721d88f34c40f34b0efb7fbbbf73531b906b312e12f19c8a05296fa4c7722cce89e827f8ec3bd8b885be2590031e5c13991c37ea9208a2584a007d77c500f54bb374978f37a724c58fca685e510b4fa01ea48895cf70674b2e0a0e76a57c90b559db3575c99cbf413e51a05788547386bb5cd2d45793dea5a4cb7a0c34ba7b71ea3686d87d8e8aea13aea14481e6a6ac0550801d7c7b989f9203103a03c3c5fec492664121ece0fa245e7f6a4097e67d266b228b7c4f3a3cbb32aa68ba08e5e20da5009fa2035260e7afd9ee20a51b014fc530b49c42125cc437bce5f9ca01caa7186b8a9db923be3e4f871b05f4d5c0084b1544189da448578e7b3d5ceb4a0494e9e44be5b238e32616fefe49f549267d9cef15d6903e826aad317a0afcba8a0fbcd71d3e7b99f8b59ef3ae71558b146306f4158b3ed0158c1347520bb65e4f4a0d0312276767e850c10eae18715011b088b0d2559b5256f0d94ecbf0dc89f943ba0210319890f3a510c14f202eb799319c40c36e0059c0f01a533dd160031d8b68080', - '0xf901f1a04365e06db300ac1000e9f56fdd3135327de8bbde7cc5ef0ea474685af5eb7f52a0801293b210dedcfdf830f215928a9ba5171ff59acd74f39434eeb0e28e2012aaa06f0530145018093e7e32074240c8368eb5ca22cb6b16faf066ac305badbf05faa0411efd9a3cddb638e6a334eacd40cd4be6035fde70b6a0ee19924312998a4ad0a0e1f0e1b3771918c9df637c4dd33f9c635863a6d9119365f491e7533b122f7bd7a09eda6189b4404f740fac5bd860bfa2f2742438a5f73b53d2fbb75d84a15d534aa03321aa91cdf4d0394550096fe67478ebc7a28edcd155efef9550cfbc54bb434aa0d7476ac68cf4d85b9cb94d2863c4d31b69b0d888e8be915c00cc13f704a8bbc0a09360d2694179a6892f78bc7173adc06c3c6aace1b10f3d5455c78a0408807b62a0510b243b0f2e9a80442c0a37f7b1719419253580ee32872c08399d8346e2214380a0ba8feba91f0b7f074ae42473e7ea86fb71bfdef1811e5d37868b79da769dcad9a0a39384c9f844f292c9d6330de41402eb3c46cd98b1e073754dc1c0bf76e48afba0d0adc236b8ccbeec7e52b9e2be588586afed8997744eeed9c5ff96301a5adcbba00cf0bc68f5bc0cb13b451706eb1ce9188a2524b3d28ee76778713e12f1660e36a00c2e3227583732700c801cc5d5a054cb3b63c194c269c81d931befcfb951359b80', - '0xf8918080808080808080a07ad532dc3e69100eb7465d854de5e494688ee28cae815f141f529b20d7366c7fa072b38a3bf38149028cfabaa25cff0cec9e710e4b4a258758e14c9226cf1c309480a02f8a3bfedea2c9e3f40a1fb908f3c961527ac6de278baa49a919fdd8247617698080a0720489b3bac625e1c428671732543c53c5f9cca87665e1d7b7fa30e0b57d43348080', - '0xeb9e20a2e449459d39f8b9e23aa6a2762a867f3e3a50cf73adcb817cec1398218b8a04187f2aa67875579c06', - ], - }, - ], -}; diff --git a/test/ethereum/ZodiacModule.test.ts b/test/ethereum/ZodiacModule.test.ts index e723bb91..c0eaec35 100644 --- a/test/ethereum/ZodiacModule.test.ts +++ b/test/ethereum/ZodiacModule.test.ts @@ -17,10 +17,9 @@ describe('Snapshot X L1 Proposal Executor:', () => { let wallet_1: SignerWithAddress; let wallet_2: SignerWithAddress; let wallet_3: SignerWithAddress; - let wallet_4: SignerWithAddress; beforeEach(async () => { - [wallet_0, wallet_1, wallet_2, wallet_3, wallet_4] = await hre.ethers.getSigners(); //waffle.provider.getWallets(); + [wallet_0, wallet_1, wallet_2, wallet_3] = await hre.ethers.getSigners(); //waffle.provider.getWallets(); ({ zodiacModule, safe, safeSigner } = await safeWithZodiacSetup()); tx1 = { diff --git a/test/shared/helpers.ts b/test/shared/helpers.ts index c0c30bab..18d528bf 100644 --- a/test/shared/helpers.ts +++ b/test/shared/helpers.ts @@ -138,7 +138,6 @@ export function getProposeCalldata( proposerEthAddress: string, executionHash: string, metadataUri: bigint[], - ethBlockNumber: bigint, executorAddress: bigint, usedVotingStrategies: bigint[], usedVotingStrategyParams: bigint[][], @@ -152,7 +151,6 @@ export function getProposeCalldata( executionHashUint256.high, BigInt(metadataUri.length), ...metadataUri, - ethBlockNumber, executorAddress, BigInt(usedVotingStrategies.length), ...usedVotingStrategies, diff --git a/test/shared/parseRPCData.ts b/test/shared/parseRPCData.ts index 5f8de6b9..93f44ebf 100644 --- a/test/shared/parseRPCData.ts +++ b/test/shared/parseRPCData.ts @@ -12,6 +12,13 @@ export interface ProcessBlockInputs { headerInts: IntsSequence; } +/** + * Produces the inputs for the process_block function in Fossil. + * @param block Block object from RPC call + * @param _chain EVM chain identifier + * @param _hardfork Hardfork identifier + * @returns ProcessBlockInputs object + */ export function getProcessBlockInputs( block: any, _chain: Chain = Chain.Mainnet, @@ -34,13 +41,21 @@ export interface ProofInputs { blockNumber: number; accountOptions: number; ethAddress: IntsSequence; - ethAddressFelt: bigint; //Fossil treats eth addresses two different ways for some reason, it will be changed soon but now this works + ethAddressFelt: bigint; // Fossil treats eth addresses two different ways for some reason, it will be changed soon but now this works accountProofSizesBytes: bigint[]; accountProofSizesWords: bigint[]; accountProof: bigint[]; - userVotingPowerParams: bigint[]; + storageProofs: bigint[][]; // Multiple storage proofs } +/** + * Takes a proofs object obtained via a getStorageProof RPC call parses the data to extract the necessary data + * and converts it to the correct form required by the SX/Fossil contracts. + * @param blockNumber Number of the block that the proof targets + * @param proofs Proofs object + * @params encodeParams The encoding function that should be used on the storage proof data + * @returns ProofInputs object + */ export function getProofInputs( blockNumber: number, proofs: any, @@ -59,24 +74,30 @@ export function getProofInputs( } const ethAddress = IntsSequence.fromBytes(hexToBytes(proofs.address)); const ethAddressFelt = BigInt(proofs.address); - const slot = IntsSequence.fromBytes(hexToBytes(proofs.storageProof[0].key)); - const storageProofArray = proofs.storageProof[0].proof.map((node: string) => - IntsSequence.fromBytes(hexToBytes(node)) - ); - let storageProof: bigint[] = []; - let storageProofSizesBytes: bigint[] = []; - let storageProofSizesWords: bigint[] = []; - for (const node of storageProofArray) { - storageProof = storageProof.concat(node.values); - storageProofSizesBytes = storageProofSizesBytes.concat([BigInt(node.bytesLength)]); - storageProofSizesWords = storageProofSizesWords.concat([BigInt(node.values.length)]); + + const storageProofs = []; + for (let i = 0; i < proofs.storageProof.length; i++) { + const slot = IntsSequence.fromBytes(hexToBytes(proofs.storageProof[i].key)); + const storageProofArray = proofs.storageProof[i].proof.map((node: string) => + IntsSequence.fromBytes(hexToBytes(node)) + ); + let storageProof: bigint[] = []; + let storageProofSizesBytes: bigint[] = []; + let storageProofSizesWords: bigint[] = []; + for (const node of storageProofArray) { + storageProof = storageProof.concat(node.values); + storageProofSizesBytes = storageProofSizesBytes.concat([BigInt(node.bytesLength)]); + storageProofSizesWords = storageProofSizesWords.concat([BigInt(node.values.length)]); + } + const storageProofEncoded = encodeParams( + slot.values, + storageProofSizesBytes, + storageProofSizesWords, + storageProof + ); + storageProofs.push(storageProofEncoded); } - const userVotingPowerParams = encodeParams( - slot.values, - storageProofSizesBytes, - storageProofSizesWords, - storageProof - ); + return { blockNumber: blockNumber as number, accountOptions: 15 as number, @@ -85,6 +106,6 @@ export function getProofInputs( accountProofSizesBytes: accountProofSizesBytes as bigint[], accountProofSizesWords: accountProofSizesWords as bigint[], accountProof: accountProof as bigint[], - userVotingPowerParams: userVotingPowerParams as bigint[], + storageProofs: storageProofs as bigint[][], }; } diff --git a/test/shared/safeUtils.ts b/test/shared/safeUtils.ts index e7cb55a0..3ae73ba8 100644 --- a/test/shared/safeUtils.ts +++ b/test/shared/safeUtils.ts @@ -1,15 +1,7 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -import { - Contract, - Wallet, - utils, - BigNumber, - BigNumberish, - Signer, - PopulatedTransaction, -} from 'ethers'; +import { Contract, utils, BigNumber, BigNumberish, Signer, PopulatedTransaction } from 'ethers'; import { TypedDataSigner } from '@ethersproject/abstract-signer'; import { AddressZero } from '@ethersproject/constants'; import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; diff --git a/test/shared/setup.ts b/test/shared/setup.ts index 114fde68..5a283e69 100644 --- a/test/shared/setup.ts +++ b/test/shared/setup.ts @@ -5,7 +5,13 @@ import { StarknetContract, Account } from 'hardhat/types'; import { Contract, ContractFactory } from 'ethers'; import { SplitUint256, IntsSequence } from './types'; import { hexToBytes, flatten2DArray } from './helpers'; -import { ProcessBlockInputs, getProcessBlockInputs } from './parseRPCData'; +import { + ProcessBlockInputs, + getProcessBlockInputs, + ProofInputs, + getProofInputs, +} from './parseRPCData'; +import { encodeParams } from './singleSlotProofStrategyEncoding'; import { AddressZero } from '@ethersproject/constants'; import { executeContractCallWithSigners } from './safeUtils'; @@ -16,7 +22,7 @@ export interface Fossil { } export async function vanillaSetup() { - const controller = (await starknet.deployAccount('OpenZeppelin')) as Account; + const controller = (await starknet.deployAccount('Argent')) as Account; const spaceFactory = await starknet.getContractFactory('./contracts/starknet/Space.cairo'); const vanillaVotingStrategyFactory = await starknet.getContractFactory( './contracts/starknet/VotingStrategies/Vanilla.cairo' @@ -74,7 +80,7 @@ export async function vanillaSetup() { } export async function zodiacRelayerSetup() { - const controller = (await starknet.deployAccount('OpenZeppelin')) as Account; + const controller = (await starknet.deployAccount('Argent')) as Account; const spaceFactory = await starknet.getContractFactory('./contracts/starknet/Space.cairo'); const vanillaVotingStategyFactory = await starknet.getContractFactory( './contracts/starknet/VotingStrategies/Vanilla.cairo' @@ -237,7 +243,7 @@ export async function safeWithZodiacSetup( } export async function ethTxAuthSetup() { - const controller = (await starknet.deployAccount('OpenZeppelin')) as Account; + const controller = (await starknet.deployAccount('Argent')) as Account; const spaceFactory = await starknet.getContractFactory('./contracts/starknet/Space.cairo'); const vanillaVotingStrategyFactory = await starknet.getContractFactory( './contracts/starknet/VotingStrategies/Vanilla.cairo' @@ -312,14 +318,98 @@ export async function ethTxAuthSetup() { }; } -export async function singleSlotProofSetup(block: any) { - const account = await starknet.deployAccount('OpenZeppelin'); +export async function singleSlotProofSetup(block: any, proofs: any) { + // We pass the encode params function for the single slot proof strategy to generate the encoded data for the single slot proof strategy + const proofInputs: ProofInputs = getProofInputs(block.number, proofs, encodeParams); + + const controller = (await starknet.deployAccount('Argent')) as Account; + + const fossil = await fossilSetup(controller); + const spaceFactory = await starknet.getContractFactory('./contracts/starknet/Space.cairo'); + const singleSlotProofStrategyFactory = await starknet.getContractFactory( + 'contracts/starknet/VotingStrategies/SingleSlotProof.cairo' + ); + const vanillaAuthenticatorFactory = await starknet.getContractFactory( + './contracts/starknet/Authenticators/Vanilla.cairo' + ); + const vanillaExecutionStrategyFactory = await starknet.getContractFactory( + './contracts/starknet/ExecutionStrategies/Vanilla.cairo' + ); + const deployments = [ + vanillaAuthenticatorFactory.deploy(), + singleSlotProofStrategyFactory.deploy({ + fact_registry_address: BigInt(fossil.factsRegistry.address), + l1_headers_store_address: BigInt(fossil.l1HeadersStore.address), + }), + vanillaExecutionStrategyFactory.deploy(), + ]; + const contracts = await Promise.all(deployments); + const vanillaAuthenticator = contracts[0] as StarknetContract; + const singleSlotProofStrategy = contracts[1] as StarknetContract; + const vanillaExecutionStrategy = contracts[2] as StarknetContract; + + // Submit blockhash to L1 Headers Store (via dummy function rather than L1 -> L2 bridge) + await fossil.l1RelayerAccount.invoke(fossil.l1HeadersStore, 'receive_from_l1', { + parent_hash: IntsSequence.fromBytes(hexToBytes(block.hash)).values, + block_number: block.number + 1, + }); + + // Encode block header and then submit to L1 Headers Store + const processBlockInputs: ProcessBlockInputs = getProcessBlockInputs(block); + await fossil.l1RelayerAccount.invoke(fossil.l1HeadersStore, 'process_block', { + options_set: processBlockInputs.blockOptions, + block_number: processBlockInputs.blockNumber, + block_header_rlp_bytes_len: processBlockInputs.headerInts.bytesLength, + block_header_rlp: processBlockInputs.headerInts.values, + }); + + const controllerAddress = BigInt(controller.starknetContract.address); + const votingDelay = BigInt(0); + const minVotingDuration = BigInt(0); + const maxVotingDuration = BigInt(2000); + const votingStrategies: bigint[] = [BigInt(singleSlotProofStrategy.address)]; + const votingStrategyParams: bigint[][] = [[proofInputs.ethAddressFelt, BigInt(1)]]; + const votingStrategyParamsFlat: bigint[] = flatten2DArray(votingStrategyParams); + const authenticators: bigint[] = [BigInt(vanillaAuthenticator.address)]; + const executors: bigint[] = [BigInt(vanillaExecutionStrategy.address)]; + const quorum: SplitUint256 = SplitUint256.fromUint(BigInt(1)); // Quorum of one for the vanilla test + const proposalThreshold: SplitUint256 = SplitUint256.fromUint(BigInt(1)); // Proposal threshold of 1 for the vanilla test + + // Deploy space with specified parameters + const space = (await spaceFactory.deploy({ + _voting_delay: votingDelay, + _min_voting_duration: minVotingDuration, + _max_voting_duration: maxVotingDuration, + _proposal_threshold: proposalThreshold, + _controller: controllerAddress, + _quorum: quorum, + _voting_strategy_params_flat: votingStrategyParamsFlat, + _voting_strategies: votingStrategies, + _authenticators: authenticators, + _executors: executors, + })) as StarknetContract; + + return { + space, + controller, + vanillaAuthenticator, + singleSlotProofStrategy, + vanillaExecutionStrategy, + fossil, + proofInputs, + }; +} + +// Setup function to test the single slot proof strategy in isolation, ie not within context of space contract +export async function singleSlotProofSetupIsolated(block: any) { + const account = await starknet.deployAccount('Argent'); const fossil = await fossilSetup(account); const singleSlotProofStrategyFactory = await starknet.getContractFactory( 'contracts/starknet/VotingStrategies/SingleSlotProof.cairo' ); const singleSlotProofStrategy = await singleSlotProofStrategyFactory.deploy({ - fact_registry: BigInt(fossil.factsRegistry.address), + fact_registry_address: BigInt(fossil.factsRegistry.address), + l1_headers_store_address: BigInt(fossil.l1HeadersStore.address), }); // Submit blockhash to L1 Headers Store (via dummy function rather than L1 -> L2 bridge) await fossil.l1RelayerAccount.invoke(fossil.l1HeadersStore, 'receive_from_l1', { @@ -350,7 +440,7 @@ async function fossilSetup(deployer: Account): Promise { ); const factsRegistry = await factsRegistryFactory.deploy(); const l1HeadersStore = await l1HeadersStoreFactory.deploy(); - const l1RelayerAccount = await starknet.deployAccount('OpenZeppelin'); + const l1RelayerAccount = await starknet.deployAccount('Argent'); await deployer.invoke(factsRegistry, 'initialize', { l1_headers_store_addr: BigInt(l1HeadersStore.address), }); @@ -367,7 +457,7 @@ async function fossilSetup(deployer: Account): Promise { // TODO: Ive left these functions in the old style for now as some changes are needed, but they should be refactored like the ones above soon. export async function starknetAccountSetup() { - const account = await starknet.deployAccount('OpenZeppelin'); + const account = await starknet.deployAccount('Argent'); const vanillaSpaceFactory = await starknet.getContractFactory('./contracts/starknet/Space.cairo'); const vanillaVotingStrategyFactory = await starknet.getContractFactory( @@ -395,7 +485,6 @@ export async function starknetAccountSetup() { const authenticator = BigInt(starknetAccountAuth.address); const zodiac_relayer = BigInt(zodiacRelayer.address); const quorum = SplitUint256.fromUint(BigInt(0)); - const voting_strategy_params: bigint[][] = [[]]; const voting_strategy_params_flat = flatten2DArray(voting_strategy_params); @@ -428,7 +517,7 @@ export async function starknetAccountSetup() { } export async function starkTxAuthSetup() { - const controller = (await starknet.deployAccount('OpenZeppelin')) as Account; + const controller = await starknet.deployAccount('Argent'); const spaceFactory = await starknet.getContractFactory('./contracts/starknet/Space.cairo'); const vanillaVotingStrategyFactory = await starknet.getContractFactory( './contracts/starknet/VotingStrategies/Vanilla.cairo' diff --git a/test/starknet/ControllerActions.test.ts b/test/starknet/ControllerActions.test.ts index b97704aa..e6fb3825 100644 --- a/test/starknet/ControllerActions.test.ts +++ b/test/starknet/ControllerActions.test.ts @@ -6,15 +6,11 @@ import { StarknetContract, Account } from 'hardhat/types'; describe('Controller', () => { let space: StarknetContract; let controller: Account; - let vanillaAuthenticator: StarknetContract; - let vanillaVotingStrategy: StarknetContract; - let vanillaExecutionStrategy: StarknetContract; before(async function () { this.timeout(800000); - ({ space, controller, vanillaAuthenticator, vanillaVotingStrategy, vanillaExecutionStrategy } = - await vanillaSetup()); + ({ space, controller } = await vanillaSetup()); }); it('Should be able to update controller if properly called', async () => { diff --git a/test/starknet/ExecutorWhitelist.test.ts b/test/starknet/ExecutorWhitelist.test.ts index 18fb1a5b..28ea9dcf 100644 --- a/test/starknet/ExecutorWhitelist.test.ts +++ b/test/starknet/ExecutorWhitelist.test.ts @@ -5,11 +5,10 @@ import { strToShortStringArr } from '@snapshot-labs/sx'; import { zodiacRelayerSetup } from '../shared/setup'; import { getProposeCalldata, bytesToHex } from '../shared/helpers'; import { StarknetContract, Account } from 'hardhat/types'; -import { PROPOSE_SELECTOR, VOTE_SELECTOR } from '../shared/constants'; +import { PROPOSE_SELECTOR } from '../shared/constants'; describe('Whitelist testing', () => { // Contracts - let mockStarknetMessaging: Contract; let space: StarknetContract; let controller: Account; let vanillaAuthenticator: StarknetContract; @@ -27,7 +26,6 @@ describe('Whitelist testing', () => { let userVotingParamsAll1: bigint[][]; let executionStrategy1: bigint; let executionParams1: bigint[]; - let ethBlockNumber: bigint; let proposeCalldata1: bigint[]; // Alternative execution strategy parameters @@ -45,7 +43,6 @@ describe('Whitelist testing', () => { vanillaVotingStrategy, zodiacRelayer, zodiacModule, - mockStarknetMessaging, } = await zodiacRelayerSetup()); const vanillaExecutionStrategyFactory = await starknet.getContractFactory( @@ -59,7 +56,6 @@ describe('Whitelist testing', () => { 'Hello and welcome to Snapshot X. This is the future of governance.' ); proposerEthAddress = ethers.Wallet.createRandom().address; - ethBlockNumber = BigInt(1337); spaceAddress = BigInt(space.address); usedVotingStrategies1 = [BigInt(vanillaVotingStrategy.address)]; userVotingParamsAll1 = [[]]; @@ -69,7 +65,6 @@ describe('Whitelist testing', () => { proposerEthAddress, executionHash, metadataUri, - ethBlockNumber, executionStrategy1, usedVotingStrategies1, userVotingParamsAll1, @@ -82,7 +77,6 @@ describe('Whitelist testing', () => { proposerEthAddress, executionHash, metadataUri, - ethBlockNumber, executionStrategy2, usedVotingStrategies1, userVotingParamsAll1, diff --git a/test/starknet/SingleSlotProof.test.ts b/test/starknet/SingleSlotProof.test.ts index 1729026e..45851cbd 100644 --- a/test/starknet/SingleSlotProof.test.ts +++ b/test/starknet/SingleSlotProof.test.ts @@ -1,39 +1,102 @@ +import fs from 'fs'; import { expect } from 'chai'; -import { block } from '../data/blocks'; -import { proofs } from '../data/proofs'; -import { SplitUint256 } from '../shared/types'; -import { ProofInputs, getProofInputs } from '../shared/parseRPCData'; -import { encodeParams } from '../shared/singleSlotProofStrategyEncoding'; +import { starknet, ethers } from 'hardhat'; +import { SplitUint256, Choice } from '../shared/types'; +import { ProofInputs } from '../shared/parseRPCData'; import { singleSlotProofSetup, Fossil } from '../shared/setup'; +import { PROPOSE_SELECTOR, VOTE_SELECTOR } from '../shared/constants'; +import { getProposeCalldata, getVoteCalldata, bytesToHex } from '../shared/helpers'; import { StarknetContract, Account } from 'hardhat/types'; +import { strToShortStringArr } from '@snapshot-labs/sx'; -// We test the single slot proof strategy flow directly here - ie not calling it via the space contract -// Full end to end tests of the flow will come soon. describe('Single slot proof voting strategy:', () => { - let voterAddress: string; - let proofInputs: ProofInputs; - let params: bigint[]; - let fossil: Fossil; - let singleSlotProofStrategy: StarknetContract; + // Contracts + let space: StarknetContract; + let controller: Account; let account: Account; + let vanillaAuthenticator: StarknetContract; + let singleSlotProofStrategy: StarknetContract; + let vanillaExecutionStrategy: StarknetContract; + let fossil: Fossil; + + // Data for account and storage proofs + let proofInputs: ProofInputs; + + // Proposal creation parameters + let spaceAddress: bigint; + let executionHash: string; + let metadataUri: bigint[]; + let proposerEthAddress: string; + let usedVotingStrategies1: bigint[]; + let userVotingParamsAll1: bigint[][]; + let executionStrategy: bigint; + let executionParams: bigint[]; + let proposeCalldata: bigint[]; + + // Additional parameters for voting + let voterEthAddress: string; + let proposalId: bigint; + let choice: Choice; + let usedVotingStrategies2: bigint[]; + let userVotingParamsAll2: bigint[][]; + let voteCalldata: bigint[]; before(async function () { this.timeout(800000); - // Address of the user that corresponds to the slot in the contract associated with the corresponding proof - voterAddress = '0x5773D321394D20C36E4CA35386C97761A9BAe820'; - // We pass the encode params function for the single slot proof strategy. - proofInputs = getProofInputs(block.number, proofs, encodeParams); + const block = JSON.parse(fs.readFileSync('./test/data/block.json').toString()); + const proofs = JSON.parse(fs.readFileSync('./test/data/proofs.json').toString()); + + account = await starknet.deployAccount('Argent'); - // Defining the parameters for the single slot proof strategy - params = [proofInputs.ethAddressFelt, BigInt(0)]; + ({ + space, + controller, + vanillaAuthenticator, + singleSlotProofStrategy, + vanillaExecutionStrategy, + fossil, + proofInputs, + } = await singleSlotProofSetup(block, proofs)); - // Deploy Fossil storage verifier instance and the voting strategy contract. - ({ fossil, singleSlotProofStrategy, account } = await singleSlotProofSetup(block)); + proposalId = BigInt(1); + executionHash = bytesToHex(ethers.utils.randomBytes(32)); // Random 32 byte hash + metadataUri = strToShortStringArr( + 'Hello and welcome to Snapshot X. This is the future of governance.' + ); + // Eth address corresponding to slot with key: 0x1f209fa834e9c9c92b83d1bd04d8d1914bd212e440f88fdda8a5879962bda665 + proposerEthAddress = '0x4048c47b546b68ad226ea20b5f0acac49b086a21'; + spaceAddress = BigInt(space.address); + usedVotingStrategies1 = [BigInt(singleSlotProofStrategy.address)]; + userVotingParamsAll1 = [proofInputs.storageProofs[0]]; + executionStrategy = BigInt(vanillaExecutionStrategy.address); + executionParams = []; + proposeCalldata = getProposeCalldata( + proposerEthAddress, + executionHash, + metadataUri, + executionStrategy, + usedVotingStrategies1, + userVotingParamsAll1, + executionParams + ); + // Eth address corresponding to slot with key: 0x9dd2a912bd3f98d4e52ea66ae2fff8b73a522895d081d522fe86f592ec8467c3 + voterEthAddress = '0x3744da57184575064838bbc87a0fc791f5e39ea2'; + choice = Choice.FOR; + usedVotingStrategies2 = [BigInt(singleSlotProofStrategy.address)]; + userVotingParamsAll2 = [proofInputs.storageProofs[1]]; + voteCalldata = getVoteCalldata( + voterEthAddress, + proposalId, + choice, + usedVotingStrategies2, + userVotingParamsAll2 + ); }); - it('The strategy should return the voting power', async () => { + it('A user can create a proposal', async () => { // Verify an account proof to obtain the storage root for the account at the specified block number trustlessly on-chain. + // Result will be stored in the L1 Headers store in Fossil await account.invoke(fossil.factsRegistry, 'prove_account', { options_set: proofInputs.accountOptions, block_number: proofInputs.blockNumber, @@ -47,17 +110,55 @@ describe('Single slot proof voting strategy:', () => { proofs_concat: proofInputs.accountProof, }); - // Obtain voting power for the account by verifying the storage proof. - const { voting_power: vp } = await singleSlotProofStrategy.call('get_voting_power', { - block: proofInputs.blockNumber, - voter_address: { value: BigInt(voterAddress) }, - params: params, - user_params: proofInputs.userVotingPowerParams, - }); + // -- Creates the proposal -- + { + await vanillaAuthenticator.invoke('authenticate', { + target: spaceAddress, + function_selector: PROPOSE_SELECTOR, + calldata: proposeCalldata, + }); - // Assert voting power obtained from strategy is correct - expect(new SplitUint256(vp.low, vp.high)).to.deep.equal( - SplitUint256.fromUint(BigInt(proofs.storageProof[0].value)) - ); + const { proposal_info } = await space.call('get_proposal_info', { + proposal_id: proposalId, + }); + + const _executionHash = SplitUint256.fromObj(proposal_info.proposal.execution_hash).toUint(); + expect(_executionHash).to.deep.equal(BigInt(executionHash)); + const _for = SplitUint256.fromObj(proposal_info.power_for).toUint(); + expect(_for).to.deep.equal(BigInt(0)); + const against = SplitUint256.fromObj(proposal_info.power_against).toUint(); + expect(against).to.deep.equal(BigInt(0)); + const abstain = SplitUint256.fromObj(proposal_info.power_abstain).toUint(); + expect(abstain).to.deep.equal(BigInt(0)); + console.log('proposal created'); + } + + // -- Casts a vote FOR -- + { + await vanillaAuthenticator.invoke('authenticate', { + target: spaceAddress, + function_selector: VOTE_SELECTOR, + calldata: voteCalldata, + }); + + const { proposal_info } = await space.call('get_proposal_info', { + proposal_id: proposalId, + }); + + const _for = SplitUint256.fromObj(proposal_info.power_for).toUint(); + expect(_for).to.deep.equal(BigInt('0x26d16aea9a19cda40000')); + const against = SplitUint256.fromObj(proposal_info.power_against).toUint(); + expect(against).to.deep.equal(BigInt(0)); + const abstain = SplitUint256.fromObj(proposal_info.power_abstain).toUint(); + expect(abstain).to.deep.equal(BigInt(0)); + } + + // -- Executes the proposal -- + { + await space.invoke('finalize_proposal', { + proposal_id: proposalId, + execution_params: executionParams, + }); + } }).timeout(1000000); }); diff --git a/test/starknet/Space.test.ts b/test/starknet/Space.test.ts index 22f2f960..93f6e65f 100644 --- a/test/starknet/Space.test.ts +++ b/test/starknet/Space.test.ts @@ -24,7 +24,6 @@ describe('Space Testing', () => { let userVotingParamsAll1: bigint[][]; let executionStrategy: bigint; let executionParams: bigint[]; - let ethBlockNumber: bigint; let proposeCalldata: bigint[]; // Additional parameters for voting @@ -46,7 +45,6 @@ describe('Space Testing', () => { 'Hello and welcome to Snapshot X. This is the future of governance.' ); proposerEthAddress = ethers.Wallet.createRandom().address; - ethBlockNumber = BigInt(1337); spaceAddress = BigInt(space.address); usedVotingStrategies1 = [BigInt(vanillaVotingStrategy.address)]; userVotingParamsAll1 = [[]]; @@ -56,7 +54,6 @@ describe('Space Testing', () => { proposerEthAddress, executionHash, metadataUri, - ethBlockNumber, executionStrategy, usedVotingStrategies1, userVotingParamsAll1, diff --git a/test/starknet/StarkTxAuth.test.ts b/test/starknet/StarkTxAuth.test.ts index c4e87ce5..f48846e4 100644 --- a/test/starknet/StarkTxAuth.test.ts +++ b/test/starknet/StarkTxAuth.test.ts @@ -27,7 +27,6 @@ describe('StarkNet Tx Auth testing', () => { let userVotingParamsAll1: bigint[][]; let executionStrategy: bigint; let executionParams: bigint[]; - let ethBlockNumber: bigint; let proposeCalldata: bigint[]; // Additional parameters for voting @@ -56,7 +55,6 @@ describe('StarkNet Tx Auth testing', () => { 'Hello and welcome to Snapshot X. This is the future of governance.' ); proposerAddress = proposerAccount.starknetContract.address; - ethBlockNumber = BigInt(1337); spaceAddress = BigInt(space.address); usedVotingStrategies1 = [BigInt(vanillaVotingStrategy.address)]; userVotingParamsAll1 = [[]]; @@ -66,7 +64,6 @@ describe('StarkNet Tx Auth testing', () => { proposerAddress, executionHash, metadataUri, - ethBlockNumber, executionStrategy, usedVotingStrategies1, userVotingParamsAll1, diff --git a/test/starknet/VanillaVotingStrategy.test.ts b/test/starknet/VanillaVotingStrategy.test.ts index 565853b8..9cbc3d05 100644 --- a/test/starknet/VanillaVotingStrategy.test.ts +++ b/test/starknet/VanillaVotingStrategy.test.ts @@ -17,7 +17,7 @@ describe('Snapshot X Vanilla Voting Strategy:', () => { it('The voting strategy should return a voting power of 1', async () => { const { vanillaVotingStrategy } = await setup(); const { voting_power: vp } = await vanillaVotingStrategy.call('get_voting_power', { - block: 1, + timestamp: 1, voter_address: { value: BigInt(ethers.Wallet.createRandom().address) }, params: [], user_params: [], diff --git a/test/starknet/WhitelistVotingStrategy.test.ts b/test/starknet/WhitelistVotingStrategy.test.ts index 21c28371..551e4683 100644 --- a/test/starknet/WhitelistVotingStrategy.test.ts +++ b/test/starknet/WhitelistVotingStrategy.test.ts @@ -67,25 +67,25 @@ describe('Whitelist testing', () => { it('returns the voting power for everyone in the list', async () => { const { voting_power: vp1 } = await whitelist.call('get_voting_power', { - block: BigInt(0), + timestamp: BigInt(0), voter_address: { value: address1 }, params: [], user_params: [], }); const { voting_power: vp2 } = await whitelist.call('get_voting_power', { - block: BigInt(0), + timestamp: BigInt(0), voter_address: { value: address2 }, params: [], user_params: [], }); const { voting_power: vp3 } = await whitelist.call('get_voting_power', { - block: BigInt(0), + timestamp: BigInt(0), voter_address: { value: address3 }, params: [], user_params: [], }); const { voting_power: vp4 } = await whitelist.call('get_voting_power', { - block: BigInt(0), + timestamp: BigInt(0), voter_address: { value: address4 }, params: [], user_params: [], @@ -98,7 +98,7 @@ describe('Whitelist testing', () => { it('returns 0 voting power for non-whitelisted addresses', async () => { const { voting_power: vp } = await whitelist.call('get_voting_power', { - block: BigInt(0), + timestamp: BigInt(0), voter_address: { value: BigInt(ethers.Wallet.createRandom().address) }, params: [], user_params: [], @@ -108,7 +108,7 @@ describe('Whitelist testing', () => { it('returns 0 for an empty whitelist', async () => { const { voting_power: vp } = await emptyWhitelist.call('get_voting_power', { - block: BigInt(0), + timestamp: BigInt(0), voter_address: { value: address1 }, params: [], user_params: [], @@ -118,7 +118,7 @@ describe('Whitelist testing', () => { it('returns the correct voting power even if address is repeated', async () => { const { voting_power: vp } = await repeatWhitelist.call('get_voting_power', { - block: BigInt(0), + timestamp: BigInt(0), voter_address: { value: address1 }, params: [], user_params: [], diff --git a/yarn.lock b/yarn.lock index 4b2e3c47..3b647e05 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7595,7 +7595,7 @@ npm-user-validate@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/npm-user-validate/-/npm-user-validate-1.0.1.tgz#31428fc5475fe8416023f178c0ab47935ad8c561" -npm@^8.12.1: +npm@^8.11.0: version "8.12.1" resolved "https://registry.yarnpkg.com/npm/-/npm-8.12.1.tgz#624064fa7a8e0730223f6b2effe087e7127d567b" integrity sha512-0yOlhfgu1UzP6UijnaFuIS2bES2H9D90EA5OVsf2iOZw7VBrjntXKEwKfCaFA6vMVWkCP8qnPwCxxPdnDVwlNw== @@ -9689,7 +9689,6 @@ swarm-js@^0.1.40: sx-api@snapshot-labs/sx-api: version "0.1.0" - uid "61f14e6caa1e986f754455560f9fd245e7af4697" resolved "https://codeload.github.com/snapshot-labs/sx-api/tar.gz/61f14e6caa1e986f754455560f9fd245e7af4697" dependencies: "@ethersproject/address" "^5.6.1"