diff --git a/contracts/bindings/cosmos/lib/cosmos_types.abigen.go b/contracts/bindings/cosmos/lib/cosmos_types.abigen.go index a6277b295..5bcb39485 100644 --- a/contracts/bindings/cosmos/lib/cosmos_types.abigen.go +++ b/contracts/bindings/cosmos/lib/cosmos_types.abigen.go @@ -59,7 +59,7 @@ type CosmosPageResponse struct { // CosmosTypesMetaData contains all meta data concerning the CosmosTypes contract. var CosmosTypesMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"typeURL\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"value\",\"type\":\"bytes\"}],\"internalType\":\"structCosmos.CodecAny\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"codecAny\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"coin\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"uint64\",\"name\":\"offset\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"limit\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"countTotal\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"reverse\",\"type\":\"bool\"}],\"internalType\":\"structCosmos.PageRequest\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"pageRequest\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"nextKey\",\"type\":\"string\"},{\"internalType\":\"uint64\",\"name\":\"total\",\"type\":\"uint64\"}],\"internalType\":\"structCosmos.PageResponse\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"pageResponse\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b506102a08061001d5f395ff3fe608060405234801561000f575f80fd5b506004361061004a575f3560e01c80631713cb131461004e5780631acc976f1461006a5780632ff6e5df14610086578063426ce1a9146100a2575b5f80fd5b610068600480360381019061006391906100f4565b6100be565b005b610084600480360381019061007f9190610159565b6100c1565b005b6100a0600480360381019061009b91906101be565b6100c4565b005b6100bc60048036038101906100b79190610223565b6100c7565b005b50565b50565b50565b50565b5f80fd5b5f80fd5b5f80fd5b5f604082840312156100eb576100ea6100d2565b5b81905092915050565b5f60208284031215610109576101086100ca565b5b5f82013567ffffffffffffffff811115610126576101256100ce565b5b610132848285016100d6565b91505092915050565b5f60a082840312156101505761014f6100d2565b5b81905092915050565b5f6020828403121561016e5761016d6100ca565b5b5f82013567ffffffffffffffff81111561018b5761018a6100ce565b5b6101978482850161013b565b91505092915050565b5f604082840312156101b5576101b46100d2565b5b81905092915050565b5f602082840312156101d3576101d26100ca565b5b5f82013567ffffffffffffffff8111156101f0576101ef6100ce565b5b6101fc848285016101a0565b91505092915050565b5f6040828403121561021a576102196100d2565b5b81905092915050565b5f60208284031215610238576102376100ca565b5b5f82013567ffffffffffffffff811115610255576102546100ce565b5b61026184828501610205565b9150509291505056fea2646970667358221220b8747d134404de4f68ec89426a62d8617708e74ff07ea4e11939db7028c8355664736f6c63430008150033", + Bin: "0x608060405234801561000f575f80fd5b506102a08061001d5f395ff3fe608060405234801561000f575f80fd5b506004361061004a575f3560e01c80631713cb131461004e5780631acc976f1461006a5780632ff6e5df14610086578063426ce1a9146100a2575b5f80fd5b610068600480360381019061006391906100f4565b6100be565b005b610084600480360381019061007f9190610159565b6100c1565b005b6100a0600480360381019061009b91906101be565b6100c4565b005b6100bc60048036038101906100b79190610223565b6100c7565b005b50565b50565b50565b50565b5f80fd5b5f80fd5b5f80fd5b5f604082840312156100eb576100ea6100d2565b5b81905092915050565b5f60208284031215610109576101086100ca565b5b5f82013567ffffffffffffffff811115610126576101256100ce565b5b610132848285016100d6565b91505092915050565b5f60a082840312156101505761014f6100d2565b5b81905092915050565b5f6020828403121561016e5761016d6100ca565b5b5f82013567ffffffffffffffff81111561018b5761018a6100ce565b5b6101978482850161013b565b91505092915050565b5f604082840312156101b5576101b46100d2565b5b81905092915050565b5f602082840312156101d3576101d26100ca565b5b5f82013567ffffffffffffffff8111156101f0576101ef6100ce565b5b6101fc848285016101a0565b91505092915050565b5f6040828403121561021a576102196100d2565b5b81905092915050565b5f60208284031215610238576102376100ca565b5b5f82013567ffffffffffffffff811115610255576102546100ce565b5b61026184828501610205565b9150509291505056fea26469706673582212204851c65929628c6917f205d63c2ed1fe53414a6ef5256c40efcb934edb9babd164736f6c63430008150033", } // CosmosTypesABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/consume_gas.abigen.go b/contracts/bindings/testing/consume_gas.abigen.go index 3ed97e890..7f38d198c 100644 --- a/contracts/bindings/testing/consume_gas.abigen.go +++ b/contracts/bindings/testing/consume_gas.abigen.go @@ -32,7 +32,7 @@ var ( // ConsumeGasMetaData contains all meta data concerning the ConsumeGas contract. var ConsumeGasMetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"name\":\"GasConsumed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"targetGas\",\"type\":\"uint256\"}],\"name\":\"consumeGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b506101cb8061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063a329e8de1461002d575b5f80fd5b610047600480360381019061004291906100e2565b610049565b005b5f5a90505b818161005a919061013a565b5a1161004e575f5a8261006d919061013a565b90507f1a2dc18f5a2dabdf3809a83ec652290b81d97d915bf5561908090bad91deffc48160405161009e919061017c565b60405180910390a1505050565b5f80fd5b5f819050919050565b6100c1816100af565b81146100cb575f80fd5b50565b5f813590506100dc816100b8565b92915050565b5f602082840312156100f7576100f66100ab565b5b5f610104848285016100ce565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610144826100af565b915061014f836100af565b92508282039050818111156101675761016661010d565b5b92915050565b610176816100af565b82525050565b5f60208201905061018f5f83018461016d565b9291505056fea2646970667358221220d55ff6e47540c6013ff6f852d1f50dafdad161b2c9b5cc3e82260979ddd5d45864736f6c63430008150033", + Bin: "0x608060405234801561000f575f80fd5b506101cb8061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063a329e8de1461002d575b5f80fd5b610047600480360381019061004291906100e2565b610049565b005b5f5a90505b818161005a919061013a565b5a1161004e575f5a8261006d919061013a565b90507f1a2dc18f5a2dabdf3809a83ec652290b81d97d915bf5561908090bad91deffc48160405161009e919061017c565b60405180910390a1505050565b5f80fd5b5f819050919050565b6100c1816100af565b81146100cb575f80fd5b50565b5f813590506100dc816100b8565b92915050565b5f602082840312156100f7576100f66100ab565b5b5f610104848285016100ce565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610144826100af565b915061014f836100af565b92508282039050818111156101675761016661010d565b5b92915050565b610176816100af565b82525050565b5f60208201905061018f5f83018461016d565b9291505056fea2646970667358221220115db31d6671601a577bae4be2d7cb75bdc4dbfd5e7b3b99a7e00c4560d03a2d64736f6c63430008150033", } // ConsumeGasABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/distribution_testing_helper.abigen.go b/contracts/bindings/testing/distribution_testing_helper.abigen.go index 2c1f8a922..1534feef9 100644 --- a/contracts/bindings/testing/distribution_testing_helper.abigen.go +++ b/contracts/bindings/testing/distribution_testing_helper.abigen.go @@ -32,7 +32,7 @@ var ( // DistributionWrapperMetaData contains all meta data concerning the DistributionWrapper contract. var DistributionWrapperMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_distributionprecompile\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_stakingprecompile\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_validator\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"distribution\",\"outputs\":[{\"internalType\":\"contractIDistributionModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWithdrawEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_withdrawAddress\",\"type\":\"address\"}],\"name\":\"setWithdrawAddress\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staking\",\"outputs\":[{\"internalType\":\"contractIStakingModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_delegatorAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_validatorAddress\",\"type\":\"address\"}],\"name\":\"withdrawRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b50604051610bf8380380610bf8833981810160405281019061003191906101b2565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614801561009757505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b156100ce576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506101f0565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018182610158565b9050919050565b61019181610177565b811461019b575f80fd5b50565b5f815190506101ac81610188565b92915050565b5f80604083850312156101c8576101c7610154565b5b5f6101d58582860161019e565b92505060206101e68582860161019e565b9150509250929050565b6109fb806101fd5f395ff3fe608060405260043610610054575f3560e01c806339cc4c86146100585780633ab1a494146100825780634cf088d9146100be5780635c19a95c146100e85780635ee58efc14610104578063e20981ca1461012e575b5f80fd5b348015610063575f80fd5b5061006c610156565b604051610079919061042e565b60405180910390f35b34801561008d575f80fd5b506100a860048036038101906100a391906104b2565b6101e9565b6040516100b5919061042e565b60405180910390f35b3480156100c9575f80fd5b506100d261028a565b6040516100df9190610538565b60405180910390f35b61010260048036038101906100fd91906104b2565b6102af565b005b34801561010f575f80fd5b5061011861034f565b6040516101259190610571565b60405180910390f35b348015610139575f80fd5b50610154600480360381019061014f919061058a565b610372565b005b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166339cc4c866040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101c0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101e491906105f2565b905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633ab1a494836040518263ffffffff1660e01b8152600401610243919061062c565b6020604051808303815f875af115801561025f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061028391906105f2565b9050919050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663026e402b82346040518363ffffffff1660e01b815260040161030b92919061065d565b6020604051808303815f875af1158015610327573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061034b91906105f2565b5050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663562c67a483836040518363ffffffff1660e01b81526004016103cc929190610684565b5f604051808303815f875af11580156103e7573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061040f919061097e565b505050565b5f8115159050919050565b61042881610414565b82525050565b5f6020820190506104415f83018461041f565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61048182610458565b9050919050565b61049181610477565b811461049b575f80fd5b50565b5f813590506104ac81610488565b92915050565b5f602082840312156104c7576104c6610450565b5b5f6104d48482850161049e565b91505092915050565b5f819050919050565b5f6105006104fb6104f684610458565b6104dd565b610458565b9050919050565b5f610511826104e6565b9050919050565b5f61052282610507565b9050919050565b61053281610518565b82525050565b5f60208201905061054b5f830184610529565b92915050565b5f61055b82610507565b9050919050565b61056b81610551565b82525050565b5f6020820190506105845f830184610562565b92915050565b5f80604083850312156105a05761059f610450565b5b5f6105ad8582860161049e565b92505060206105be8582860161049e565b9150509250929050565b6105d181610414565b81146105db575f80fd5b50565b5f815190506105ec816105c8565b92915050565b5f6020828403121561060757610606610450565b5b5f610614848285016105de565b91505092915050565b61062681610477565b82525050565b5f60208201905061063f5f83018461061d565b92915050565b5f819050919050565b61065781610645565b82525050565b5f6040820190506106705f83018561061d565b61067d602083018461064e565b9392505050565b5f6040820190506106975f83018561061d565b6106a4602083018461061d565b9392505050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6106f5826106af565b810181811067ffffffffffffffff82111715610714576107136106bf565b5b80604052505050565b5f610726610447565b905061073282826106ec565b919050565b5f67ffffffffffffffff821115610751576107506106bf565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b61077781610645565b8114610781575f80fd5b50565b5f815190506107928161076e565b92915050565b5f80fd5b5f67ffffffffffffffff8211156107b6576107b56106bf565b5b6107bf826106af565b9050602081019050919050565b5f5b838110156107e95780820151818401526020810190506107ce565b5f8484015250505050565b5f6108066108018461079c565b61071d565b90508281526020810184848401111561082257610821610798565b5b61082d8482856107cc565b509392505050565b5f82601f830112610849576108486106ab565b5b81516108598482602086016107f4565b91505092915050565b5f6040828403121561087757610876610766565b5b610881604061071d565b90505f61089084828501610784565b5f83015250602082015167ffffffffffffffff8111156108b3576108b261076a565b5b6108bf84828501610835565b60208301525092915050565b5f6108dd6108d884610737565b61071d565b90508083825260208201905060208402830185811115610900576108ff610762565b5b835b8181101561094757805167ffffffffffffffff811115610925576109246106ab565b5b8086016109328982610862565b85526020850194505050602081019050610902565b5050509392505050565b5f82601f830112610965576109646106ab565b5b81516109758482602086016108cb565b91505092915050565b5f6020828403121561099357610992610450565b5b5f82015167ffffffffffffffff8111156109b0576109af610454565b5b6109bc84828501610951565b9150509291505056fea2646970667358221220eb7f57407b06306a368cfd6b44ffe4a4c87116d2894dad0b67f2516e7d8ff05564736f6c63430008150033", + Bin: "0x608060405234801561000f575f80fd5b50604051610bf8380380610bf8833981810160405281019061003191906101b2565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614801561009757505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b156100ce576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506101f0565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018182610158565b9050919050565b61019181610177565b811461019b575f80fd5b50565b5f815190506101ac81610188565b92915050565b5f80604083850312156101c8576101c7610154565b5b5f6101d58582860161019e565b92505060206101e68582860161019e565b9150509250929050565b6109fb806101fd5f395ff3fe608060405260043610610054575f3560e01c806339cc4c86146100585780633ab1a494146100825780634cf088d9146100be5780635c19a95c146100e85780635ee58efc14610104578063e20981ca1461012e575b5f80fd5b348015610063575f80fd5b5061006c610156565b604051610079919061042e565b60405180910390f35b34801561008d575f80fd5b506100a860048036038101906100a391906104b2565b6101e9565b6040516100b5919061042e565b60405180910390f35b3480156100c9575f80fd5b506100d261028a565b6040516100df9190610538565b60405180910390f35b61010260048036038101906100fd91906104b2565b6102af565b005b34801561010f575f80fd5b5061011861034f565b6040516101259190610571565b60405180910390f35b348015610139575f80fd5b50610154600480360381019061014f919061058a565b610372565b005b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166339cc4c866040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101c0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101e491906105f2565b905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633ab1a494836040518263ffffffff1660e01b8152600401610243919061062c565b6020604051808303815f875af115801561025f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061028391906105f2565b9050919050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663026e402b82346040518363ffffffff1660e01b815260040161030b92919061065d565b6020604051808303815f875af1158015610327573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061034b91906105f2565b5050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663562c67a483836040518363ffffffff1660e01b81526004016103cc929190610684565b5f604051808303815f875af11580156103e7573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061040f919061097e565b505050565b5f8115159050919050565b61042881610414565b82525050565b5f6020820190506104415f83018461041f565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61048182610458565b9050919050565b61049181610477565b811461049b575f80fd5b50565b5f813590506104ac81610488565b92915050565b5f602082840312156104c7576104c6610450565b5b5f6104d48482850161049e565b91505092915050565b5f819050919050565b5f6105006104fb6104f684610458565b6104dd565b610458565b9050919050565b5f610511826104e6565b9050919050565b5f61052282610507565b9050919050565b61053281610518565b82525050565b5f60208201905061054b5f830184610529565b92915050565b5f61055b82610507565b9050919050565b61056b81610551565b82525050565b5f6020820190506105845f830184610562565b92915050565b5f80604083850312156105a05761059f610450565b5b5f6105ad8582860161049e565b92505060206105be8582860161049e565b9150509250929050565b6105d181610414565b81146105db575f80fd5b50565b5f815190506105ec816105c8565b92915050565b5f6020828403121561060757610606610450565b5b5f610614848285016105de565b91505092915050565b61062681610477565b82525050565b5f60208201905061063f5f83018461061d565b92915050565b5f819050919050565b61065781610645565b82525050565b5f6040820190506106705f83018561061d565b61067d602083018461064e565b9392505050565b5f6040820190506106975f83018561061d565b6106a4602083018461061d565b9392505050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6106f5826106af565b810181811067ffffffffffffffff82111715610714576107136106bf565b5b80604052505050565b5f610726610447565b905061073282826106ec565b919050565b5f67ffffffffffffffff821115610751576107506106bf565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b61077781610645565b8114610781575f80fd5b50565b5f815190506107928161076e565b92915050565b5f80fd5b5f67ffffffffffffffff8211156107b6576107b56106bf565b5b6107bf826106af565b9050602081019050919050565b5f5b838110156107e95780820151818401526020810190506107ce565b5f8484015250505050565b5f6108066108018461079c565b61071d565b90508281526020810184848401111561082257610821610798565b5b61082d8482856107cc565b509392505050565b5f82601f830112610849576108486106ab565b5b81516108598482602086016107f4565b91505092915050565b5f6040828403121561087757610876610766565b5b610881604061071d565b90505f61089084828501610784565b5f83015250602082015167ffffffffffffffff8111156108b3576108b261076a565b5b6108bf84828501610835565b60208301525092915050565b5f6108dd6108d884610737565b61071d565b90508083825260208201905060208402830185811115610900576108ff610762565b5b835b8181101561094757805167ffffffffffffffff811115610925576109246106ab565b5b8086016109328982610862565b85526020850194505050602081019050610902565b5050509392505050565b5f82601f830112610965576109646106ab565b5b81516109758482602086016108cb565b91505092915050565b5f6020828403121561099357610992610450565b5b5f82015167ffffffffffffffff8111156109b0576109af610454565b5b6109bc84828501610951565b9150509291505056fea264697066735822122043654432997c95922bfcf12c9cded90160bd69b0223f1939299c88cc6eb9f4c664736f6c63430008150033", } // DistributionWrapperABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/governance/governance_wrapper.abigen.go b/contracts/bindings/testing/governance/governance_wrapper.abigen.go index fd4f26d9e..c571e4332 100644 --- a/contracts/bindings/testing/governance/governance_wrapper.abigen.go +++ b/contracts/bindings/testing/governance/governance_wrapper.abigen.go @@ -80,7 +80,7 @@ type IGovernanceModuleTallyResult struct { // GovernanceWrapperMetaData contains all meta data concerning the GovernanceWrapper contract. var GovernanceWrapperMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governanceModule\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"bank\",\"outputs\":[{\"internalType\":\"contractIBankModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"}],\"name\":\"cancelProposal\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"}],\"name\":\"getProposal\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"typeURL\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"value\",\"type\":\"bytes\"}],\"internalType\":\"structCosmos.CodecAny[]\",\"name\":\"messages\",\"type\":\"tuple[]\"},{\"internalType\":\"int32\",\"name\":\"status\",\"type\":\"int32\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"yesCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"abstainCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noWithVetoCount\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.TallyResult\",\"name\":\"finalTallyResult\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"submitTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositEndTime\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"totalDeposit\",\"type\":\"tuple[]\"},{\"internalType\":\"uint64\",\"name\":\"votingStartTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"votingEndTime\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"summary\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"}],\"internalType\":\"structIGovernanceModule.Proposal\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"proposalStatus\",\"type\":\"int32\"}],\"name\":\"getProposals\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"typeURL\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"value\",\"type\":\"bytes\"}],\"internalType\":\"structCosmos.CodecAny[]\",\"name\":\"messages\",\"type\":\"tuple[]\"},{\"internalType\":\"int32\",\"name\":\"status\",\"type\":\"int32\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"yesCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"abstainCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noWithVetoCount\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.TallyResult\",\"name\":\"finalTallyResult\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"submitTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositEndTime\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"totalDeposit\",\"type\":\"tuple[]\"},{\"internalType\":\"uint64\",\"name\":\"votingStartTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"votingEndTime\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"summary\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"}],\"internalType\":\"structIGovernanceModule.Proposal[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governanceModule\",\"outputs\":[{\"internalType\":\"contractIGovernanceModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"typeURL\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"value\",\"type\":\"bytes\"}],\"internalType\":\"structCosmos.CodecAny[]\",\"name\":\"messages\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"initialDeposit\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"summary\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"expedited\",\"type\":\"bool\"}],\"internalType\":\"structIGovernanceModule.MsgSubmitProposal\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"submit\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"option\",\"type\":\"int32\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"}],\"name\":\"vote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x60a0604052734381dc2ab14285160c808659aee005d51255add773ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1681525034801562000057575f80fd5b506040516200264b3803806200264b83398181016040528101906200007d91906200018e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000e3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050620001be565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000158826200012d565b9050919050565b6200016a816200014c565b811462000175575f80fd5b50565b5f8151905062000188816200015f565b92915050565b5f60208284031215620001a657620001a562000129565b5b5f620001b58482850162000178565b91505092915050565b608051612474620001d75f395f6104e501526124745ff3fe608060405260043610610072575f3560e01c806337a9a59e1161004d57806337a9a59e1461011357806376cdb03b14610150578063b5828df21461017a578063f1610a28146101b657610079565b8062e66c9a1461007d57806319f7a0fb146100ad5780632b0a7032146100e957610079565b3661007957005b5f80fd5b61009760048036038101906100929190610862565b6101f2565b6040516100a49190610911565b60405180910390f35b3480156100b8575f80fd5b506100d360048036038101906100ce9190610ac2565b610377565b6040516100e09190610b48565b60405180910390f35b3480156100f4575f80fd5b506100fd61041e565b60405161010a9190610bdb565b60405180910390f35b34801561011e575f80fd5b5061013960048036038101906101349190610bf4565b610441565b604051610147929190610c1f565b60405180910390f35b34801561015b575f80fd5b506101646104e3565b6040516101719190610c66565b60405180910390f35b348015610185575f80fd5b506101a0600480360381019061019b9190610c7f565b610507565b6040516101ad919061121d565b60405180910390f35b3480156101c1575f80fd5b506101dc60048036038101906101d79190610bf4565b6105bc565b6040516101e99190611376565b60405180910390f35b5f80600167ffffffffffffffff81111561020f5761020e61099e565b5b60405190808252806020026020018201604052801561024857816020015b610235610665565b81526020019060019003908161022d5790505b50905084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050815f815181106102a2576102a1611396565b5b60200260200101516020018190525082815f815181106102c5576102c4611396565b5b60200260200101515f0181815250505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638ed6982d876040518263ffffffff1660e01b815260040161032c919061196e565b6020604051808303815f875af1158015610348573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061036c91906119a2565b915050949350505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319f7a0fb8585856040518463ffffffff1660e01b81526004016103d593929190611a24565b6020604051808303815f875af11580156103f1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104159190611a74565b90509392505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166337a9a59e846040518263ffffffff1660e01b815260040161049b9190610911565b60408051808303815f875af11580156104b6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104da9190611a9f565b91509150915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b606061051161067e565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663917c9d9285846040518363ffffffff1660e01b815260040161056d929190611b50565b5f60405180830381865afa158015610587573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906105af9190612381565b5090508092505050919050565b6105c46106c1565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f1610a28836040518263ffffffff1660e01b815260040161061c9190610911565b5f60405180830381865afa158015610636573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061065e91906123f7565b9050919050565b60405180604001604052805f8152602001606081525090565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b604051806101a001604052805f67ffffffffffffffff168152602001606081526020015f60030b81526020016106f5610773565b81526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020016060815260200160608152602001606081526020015f73ffffffffffffffffffffffffffffffffffffffff1681525090565b6040518060800160405280606081526020016060815260200160608152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f60e082840312156107c5576107c46107ac565b5b81905092915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126107ef576107ee6107ce565b5b8235905067ffffffffffffffff81111561080c5761080b6107d2565b5b602083019150836001820283011115610828576108276107d6565b5b9250929050565b5f819050919050565b6108418161082f565b811461084b575f80fd5b50565b5f8135905061085c81610838565b92915050565b5f805f806060858703121561087a576108796107a4565b5b5f85013567ffffffffffffffff811115610897576108966107a8565b5b6108a3878288016107b0565b945050602085013567ffffffffffffffff8111156108c4576108c36107a8565b5b6108d0878288016107da565b935093505060406108e38782880161084e565b91505092959194509250565b5f67ffffffffffffffff82169050919050565b61090b816108ef565b82525050565b5f6020820190506109245f830184610902565b92915050565b610933816108ef565b811461093d575f80fd5b50565b5f8135905061094e8161092a565b92915050565b5f8160030b9050919050565b61096981610954565b8114610973575f80fd5b50565b5f8135905061098481610960565b92915050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6109d48261098e565b810181811067ffffffffffffffff821117156109f3576109f261099e565b5b80604052505050565b5f610a0561079b565b9050610a1182826109cb565b919050565b5f67ffffffffffffffff821115610a3057610a2f61099e565b5b610a398261098e565b9050602081019050919050565b828183375f83830152505050565b5f610a66610a6184610a16565b6109fc565b905082815260208101848484011115610a8257610a8161098a565b5b610a8d848285610a46565b509392505050565b5f82601f830112610aa957610aa86107ce565b5b8135610ab9848260208601610a54565b91505092915050565b5f805f60608486031215610ad957610ad86107a4565b5b5f610ae686828701610940565b9350506020610af786828701610976565b925050604084013567ffffffffffffffff811115610b1857610b176107a8565b5b610b2486828701610a95565b9150509250925092565b5f8115159050919050565b610b4281610b2e565b82525050565b5f602082019050610b5b5f830184610b39565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610ba3610b9e610b9984610b61565b610b80565b610b61565b9050919050565b5f610bb482610b89565b9050919050565b5f610bc582610baa565b9050919050565b610bd581610bbb565b82525050565b5f602082019050610bee5f830184610bcc565b92915050565b5f60208284031215610c0957610c086107a4565b5b5f610c1684828501610940565b91505092915050565b5f604082019050610c325f830185610902565b610c3f6020830184610902565b9392505050565b5f610c5082610baa565b9050919050565b610c6081610c46565b82525050565b5f602082019050610c795f830184610c57565b92915050565b5f60208284031215610c9457610c936107a4565b5b5f610ca184828501610976565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610cdc816108ef565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610d42578082015181840152602081019050610d27565b5f8484015250505050565b5f610d5782610d0b565b610d618185610d15565b9350610d71818560208601610d25565b610d7a8161098e565b840191505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f610da982610d85565b610db38185610d8f565b9350610dc3818560208601610d25565b610dcc8161098e565b840191505092915050565b5f604083015f8301518482035f860152610df18282610d4d565b91505060208301518482036020860152610e0b8282610d9f565b9150508091505092915050565b5f610e238383610dd7565b905092915050565b5f602082019050919050565b5f610e4182610ce2565b610e4b8185610cec565b935083602082028501610e5d85610cfc565b805f5b85811015610e985784840389528151610e798582610e18565b9450610e8483610e2b565b925060208a01995050600181019050610e60565b50829750879550505050505092915050565b610eb381610954565b82525050565b5f608083015f8301518482035f860152610ed38282610d4d565b91505060208301518482036020860152610eed8282610d4d565b91505060408301518482036040860152610f078282610d4d565b91505060608301518482036060860152610f218282610d4d565b9150508091505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610f608161082f565b82525050565b5f604083015f830151610f7b5f860182610f57565b5060208301518482036020860152610f938282610d4d565b9150508091505092915050565b5f610fab8383610f66565b905092915050565b5f602082019050919050565b5f610fc982610f2e565b610fd38185610f38565b935083602082028501610fe585610f48565b805f5b8581101561102057848403895281516110018582610fa0565b945061100c83610fb3565b925060208a01995050600181019050610fe8565b50829750879550505050505092915050565b5f61103c82610b61565b9050919050565b61104c81611032565b82525050565b5f6101a083015f8301516110685f860182610cd3565b50602083015184820360208601526110808282610e37565b91505060408301516110956040860182610eaa565b50606083015184820360608601526110ad8282610eb9565b91505060808301516110c26080860182610cd3565b5060a08301516110d560a0860182610cd3565b5060c083015184820360c08601526110ed8282610fbf565b91505060e083015161110260e0860182610cd3565b50610100830151611117610100860182610cd3565b506101208301518482036101208601526111318282610d4d565b91505061014083015184820361014086015261114d8282610d4d565b9150506101608301518482036101608601526111698282610d4d565b915050610180830151611180610180860182611043565b508091505092915050565b5f6111968383611052565b905092915050565b5f602082019050919050565b5f6111b482610caa565b6111be8185610cb4565b9350836020820285016111d085610cc4565b805f5b8581101561120b57848403895281516111ec858261118b565b94506111f78361119e565b925060208a019950506001810190506111d3565b50829750879550505050505092915050565b5f6020820190508181035f83015261123581846111aa565b905092915050565b5f6101a083015f8301516112535f860182610cd3565b506020830151848203602086015261126b8282610e37565b91505060408301516112806040860182610eaa565b50606083015184820360608601526112988282610eb9565b91505060808301516112ad6080860182610cd3565b5060a08301516112c060a0860182610cd3565b5060c083015184820360c08601526112d88282610fbf565b91505060e08301516112ed60e0860182610cd3565b50610100830151611302610100860182610cd3565b5061012083015184820361012086015261131c8282610d4d565b9150506101408301518482036101408601526113388282610d4d565b9150506101608301518482036101608601526113548282610d4d565b91505061018083015161136b610180860182611043565b508091505092915050565b5f6020820190508181035f83015261138e818461123d565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f80fd5b5f80fd5b5f80fd5b5f80833560016020038436030381126113eb576113ea6113cb565b5b83810192508235915060208301925067ffffffffffffffff821115611413576114126113c3565b5b602082023603831315611429576114286113c7565b5b509250929050565b5f819050919050565b5f8083356001602003843603038112611456576114556113cb565b5b83810192508235915060208301925067ffffffffffffffff82111561147e5761147d6113c3565b5b600182023603831315611494576114936113c7565b5b509250929050565b5f6114a78385610d15565b93506114b4838584610a46565b6114bd8361098e565b840190509392505050565b5f80833560016020038436030381126114e4576114e36113cb565b5b83810192508235915060208301925067ffffffffffffffff82111561150c5761150b6113c3565b5b600182023603831315611522576115216113c7565b5b509250929050565b5f6115358385610d8f565b9350611542838584610a46565b61154b8361098e565b840190509392505050565b5f604083016115675f84018461143a565b8583035f87015261157983828461149c565b9250505061158a60208401846114c8565b858303602087015261159d83828461152a565b925050508091505092915050565b5f6115b68383611556565b905092915050565b5f823560016040038336030381126115d9576115d86113cb565b5b82810191505092915050565b5f602082019050919050565b5f6115fc8385610cec565b93508360208402850161160e84611431565b805f5b8781101561165157848403895261162882846115be565b61163285826115ab565b945061163d836115e5565b925060208a01995050600181019050611611565b50829750879450505050509392505050565b5f808335600160200384360303811261167f5761167e6113cb565b5b83810192508235915060208301925067ffffffffffffffff8211156116a7576116a66113c3565b5b6020820236038313156116bd576116bc6113c7565b5b509250929050565b5f819050919050565b5f6116dc602084018461084e565b905092915050565b5f604083016116f55f8401846116ce565b6117015f860182610f57565b5061170f602084018461143a565b858303602087015261172283828461149c565b925050508091505092915050565b5f61173b83836116e4565b905092915050565b5f8235600160400383360303811261175e5761175d6113cb565b5b82810191505092915050565b5f602082019050919050565b5f6117818385610f38565b935083602084028501611793846116c5565b805f5b878110156117d65784840389526117ad8284611743565b6117b78582611730565b94506117c28361176a565b925060208a01995050600181019050611796565b50829750879450505050509392505050565b6117f181611032565b81146117fb575f80fd5b50565b5f8135905061180c816117e8565b92915050565b5f61182060208401846117fe565b905092915050565b61183181610b2e565b811461183b575f80fd5b50565b5f8135905061184c81611828565b92915050565b5f611860602084018461183e565b905092915050565b61187181610b2e565b82525050565b5f60e083016118885f8401846113cf565b8583035f87015261189a8382846115f1565b925050506118ab6020840184611663565b85830360208701526118be838284611776565b925050506118cf6040840184611812565b6118dc6040860182611043565b506118ea606084018461143a565b85830360608701526118fd83828461149c565b9250505061190e608084018461143a565b858303608087015261192183828461149c565b9250505061193260a084018461143a565b85830360a087015261194583828461149c565b9250505061195660c0840184611852565b61196360c0860182611868565b508091505092915050565b5f6020820190508181035f8301526119868184611877565b905092915050565b5f8151905061199c8161092a565b92915050565b5f602082840312156119b7576119b66107a4565b5b5f6119c48482850161198e565b91505092915050565b6119d681610954565b82525050565b5f82825260208201905092915050565b5f6119f682610d0b565b611a0081856119dc565b9350611a10818560208601610d25565b611a198161098e565b840191505092915050565b5f606082019050611a375f830186610902565b611a4460208301856119cd565b8181036040830152611a5681846119ec565b9050949350505050565b5f81519050611a6e81611828565b92915050565b5f60208284031215611a8957611a886107a4565b5b5f611a9684828501611a60565b91505092915050565b5f8060408385031215611ab557611ab46107a4565b5b5f611ac28582860161198e565b9250506020611ad38582860161198e565b9150509250929050565b5f60a083015f8301518482035f860152611af78282610d4d565b9150506020830151611b0c6020860182610cd3565b506040830151611b1f6040860182610cd3565b506060830151611b326060860182611868565b506080830151611b456080860182611868565b508091505092915050565b5f604082019050611b635f8301856119cd565b8181036020830152611b758184611add565b90509392505050565b5f67ffffffffffffffff821115611b9857611b9761099e565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f67ffffffffffffffff821115611bcb57611bca61099e565b5b602082029050602081019050919050565b5f611bee611be984610a16565b6109fc565b905082815260208101848484011115611c0a57611c0961098a565b5b611c15848285610d25565b509392505050565b5f82601f830112611c3157611c306107ce565b5b8151611c41848260208601611bdc565b91505092915050565b5f67ffffffffffffffff821115611c6457611c6361099e565b5b611c6d8261098e565b9050602081019050919050565b5f611c8c611c8784611c4a565b6109fc565b905082815260208101848484011115611ca857611ca761098a565b5b611cb3848285610d25565b509392505050565b5f82601f830112611ccf57611cce6107ce565b5b8151611cdf848260208601611c7a565b91505092915050565b5f60408284031215611cfd57611cfc611ba9565b5b611d0760406109fc565b90505f82015167ffffffffffffffff811115611d2657611d25611bad565b5b611d3284828501611c1d565b5f83015250602082015167ffffffffffffffff811115611d5557611d54611bad565b5b611d6184828501611cbb565b60208301525092915050565b5f611d7f611d7a84611bb1565b6109fc565b90508083825260208201905060208402830185811115611da257611da16107d6565b5b835b81811015611de957805167ffffffffffffffff811115611dc757611dc66107ce565b5b808601611dd48982611ce8565b85526020850194505050602081019050611da4565b5050509392505050565b5f82601f830112611e0757611e066107ce565b5b8151611e17848260208601611d6d565b91505092915050565b5f81519050611e2e81610960565b92915050565b5f60808284031215611e4957611e48611ba9565b5b611e5360806109fc565b90505f82015167ffffffffffffffff811115611e7257611e71611bad565b5b611e7e84828501611c1d565b5f83015250602082015167ffffffffffffffff811115611ea157611ea0611bad565b5b611ead84828501611c1d565b602083015250604082015167ffffffffffffffff811115611ed157611ed0611bad565b5b611edd84828501611c1d565b604083015250606082015167ffffffffffffffff811115611f0157611f00611bad565b5b611f0d84828501611c1d565b60608301525092915050565b5f67ffffffffffffffff821115611f3357611f3261099e565b5b602082029050602081019050919050565b5f81519050611f5281610838565b92915050565b5f60408284031215611f6d57611f6c611ba9565b5b611f7760406109fc565b90505f611f8684828501611f44565b5f83015250602082015167ffffffffffffffff811115611fa957611fa8611bad565b5b611fb584828501611c1d565b60208301525092915050565b5f611fd3611fce84611f19565b6109fc565b90508083825260208201905060208402830185811115611ff657611ff56107d6565b5b835b8181101561203d57805167ffffffffffffffff81111561201b5761201a6107ce565b5b8086016120288982611f58565b85526020850194505050602081019050611ff8565b5050509392505050565b5f82601f83011261205b5761205a6107ce565b5b815161206b848260208601611fc1565b91505092915050565b5f81519050612082816117e8565b92915050565b5f6101a0828403121561209e5761209d611ba9565b5b6120a96101a06109fc565b90505f6120b88482850161198e565b5f83015250602082015167ffffffffffffffff8111156120db576120da611bad565b5b6120e784828501611df3565b60208301525060406120fb84828501611e20565b604083015250606082015167ffffffffffffffff81111561211f5761211e611bad565b5b61212b84828501611e34565b606083015250608061213f8482850161198e565b60808301525060a06121538482850161198e565b60a08301525060c082015167ffffffffffffffff81111561217757612176611bad565b5b61218384828501612047565b60c08301525060e06121978482850161198e565b60e0830152506101006121ac8482850161198e565b6101008301525061012082015167ffffffffffffffff8111156121d2576121d1611bad565b5b6121de84828501611c1d565b6101208301525061014082015167ffffffffffffffff81111561220457612203611bad565b5b61221084828501611c1d565b6101408301525061016082015167ffffffffffffffff81111561223657612235611bad565b5b61224284828501611c1d565b6101608301525061018061225884828501612074565b6101808301525092915050565b5f61227761227284611b7e565b6109fc565b9050808382526020820190506020840283018581111561229a576122996107d6565b5b835b818110156122e157805167ffffffffffffffff8111156122bf576122be6107ce565b5b8086016122cc8982612088565b8552602085019450505060208101905061229c565b5050509392505050565b5f82601f8301126122ff576122fe6107ce565b5b815161230f848260208601612265565b91505092915050565b5f6040828403121561232d5761232c611ba9565b5b61233760406109fc565b90505f82015167ffffffffffffffff81111561235657612355611bad565b5b61236284828501611c1d565b5f8301525060206123758482850161198e565b60208301525092915050565b5f8060408385031215612397576123966107a4565b5b5f83015167ffffffffffffffff8111156123b4576123b36107a8565b5b6123c0858286016122eb565b925050602083015167ffffffffffffffff8111156123e1576123e06107a8565b5b6123ed85828601612318565b9150509250929050565b5f6020828403121561240c5761240b6107a4565b5b5f82015167ffffffffffffffff811115612429576124286107a8565b5b61243584828501612088565b9150509291505056fea26469706673582212206e68cc9e1af8c1457b7c19bae135a8ae3e3ab13687c25f67afeb4537de87481464736f6c63430008150033", + Bin: "0x60a0604052734381dc2ab14285160c808659aee005d51255add773ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1681525034801562000057575f80fd5b506040516200264b3803806200264b83398181016040528101906200007d91906200018e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000e3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050620001be565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000158826200012d565b9050919050565b6200016a816200014c565b811462000175575f80fd5b50565b5f8151905062000188816200015f565b92915050565b5f60208284031215620001a657620001a562000129565b5b5f620001b58482850162000178565b91505092915050565b608051612474620001d75f395f6104e501526124745ff3fe608060405260043610610072575f3560e01c806337a9a59e1161004d57806337a9a59e1461011357806376cdb03b14610150578063b5828df21461017a578063f1610a28146101b657610079565b8062e66c9a1461007d57806319f7a0fb146100ad5780632b0a7032146100e957610079565b3661007957005b5f80fd5b61009760048036038101906100929190610862565b6101f2565b6040516100a49190610911565b60405180910390f35b3480156100b8575f80fd5b506100d360048036038101906100ce9190610ac2565b610377565b6040516100e09190610b48565b60405180910390f35b3480156100f4575f80fd5b506100fd61041e565b60405161010a9190610bdb565b60405180910390f35b34801561011e575f80fd5b5061013960048036038101906101349190610bf4565b610441565b604051610147929190610c1f565b60405180910390f35b34801561015b575f80fd5b506101646104e3565b6040516101719190610c66565b60405180910390f35b348015610185575f80fd5b506101a0600480360381019061019b9190610c7f565b610507565b6040516101ad919061121d565b60405180910390f35b3480156101c1575f80fd5b506101dc60048036038101906101d79190610bf4565b6105bc565b6040516101e99190611376565b60405180910390f35b5f80600167ffffffffffffffff81111561020f5761020e61099e565b5b60405190808252806020026020018201604052801561024857816020015b610235610665565b81526020019060019003908161022d5790505b50905084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050815f815181106102a2576102a1611396565b5b60200260200101516020018190525082815f815181106102c5576102c4611396565b5b60200260200101515f0181815250505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638ed6982d876040518263ffffffff1660e01b815260040161032c919061196e565b6020604051808303815f875af1158015610348573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061036c91906119a2565b915050949350505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319f7a0fb8585856040518463ffffffff1660e01b81526004016103d593929190611a24565b6020604051808303815f875af11580156103f1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104159190611a74565b90509392505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166337a9a59e846040518263ffffffff1660e01b815260040161049b9190610911565b60408051808303815f875af11580156104b6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104da9190611a9f565b91509150915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b606061051161067e565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663917c9d9285846040518363ffffffff1660e01b815260040161056d929190611b50565b5f60405180830381865afa158015610587573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906105af9190612381565b5090508092505050919050565b6105c46106c1565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f1610a28836040518263ffffffff1660e01b815260040161061c9190610911565b5f60405180830381865afa158015610636573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061065e91906123f7565b9050919050565b60405180604001604052805f8152602001606081525090565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b604051806101a001604052805f67ffffffffffffffff168152602001606081526020015f60030b81526020016106f5610773565b81526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020016060815260200160608152602001606081526020015f73ffffffffffffffffffffffffffffffffffffffff1681525090565b6040518060800160405280606081526020016060815260200160608152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f60e082840312156107c5576107c46107ac565b5b81905092915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126107ef576107ee6107ce565b5b8235905067ffffffffffffffff81111561080c5761080b6107d2565b5b602083019150836001820283011115610828576108276107d6565b5b9250929050565b5f819050919050565b6108418161082f565b811461084b575f80fd5b50565b5f8135905061085c81610838565b92915050565b5f805f806060858703121561087a576108796107a4565b5b5f85013567ffffffffffffffff811115610897576108966107a8565b5b6108a3878288016107b0565b945050602085013567ffffffffffffffff8111156108c4576108c36107a8565b5b6108d0878288016107da565b935093505060406108e38782880161084e565b91505092959194509250565b5f67ffffffffffffffff82169050919050565b61090b816108ef565b82525050565b5f6020820190506109245f830184610902565b92915050565b610933816108ef565b811461093d575f80fd5b50565b5f8135905061094e8161092a565b92915050565b5f8160030b9050919050565b61096981610954565b8114610973575f80fd5b50565b5f8135905061098481610960565b92915050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6109d48261098e565b810181811067ffffffffffffffff821117156109f3576109f261099e565b5b80604052505050565b5f610a0561079b565b9050610a1182826109cb565b919050565b5f67ffffffffffffffff821115610a3057610a2f61099e565b5b610a398261098e565b9050602081019050919050565b828183375f83830152505050565b5f610a66610a6184610a16565b6109fc565b905082815260208101848484011115610a8257610a8161098a565b5b610a8d848285610a46565b509392505050565b5f82601f830112610aa957610aa86107ce565b5b8135610ab9848260208601610a54565b91505092915050565b5f805f60608486031215610ad957610ad86107a4565b5b5f610ae686828701610940565b9350506020610af786828701610976565b925050604084013567ffffffffffffffff811115610b1857610b176107a8565b5b610b2486828701610a95565b9150509250925092565b5f8115159050919050565b610b4281610b2e565b82525050565b5f602082019050610b5b5f830184610b39565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610ba3610b9e610b9984610b61565b610b80565b610b61565b9050919050565b5f610bb482610b89565b9050919050565b5f610bc582610baa565b9050919050565b610bd581610bbb565b82525050565b5f602082019050610bee5f830184610bcc565b92915050565b5f60208284031215610c0957610c086107a4565b5b5f610c1684828501610940565b91505092915050565b5f604082019050610c325f830185610902565b610c3f6020830184610902565b9392505050565b5f610c5082610baa565b9050919050565b610c6081610c46565b82525050565b5f602082019050610c795f830184610c57565b92915050565b5f60208284031215610c9457610c936107a4565b5b5f610ca184828501610976565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610cdc816108ef565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610d42578082015181840152602081019050610d27565b5f8484015250505050565b5f610d5782610d0b565b610d618185610d15565b9350610d71818560208601610d25565b610d7a8161098e565b840191505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f610da982610d85565b610db38185610d8f565b9350610dc3818560208601610d25565b610dcc8161098e565b840191505092915050565b5f604083015f8301518482035f860152610df18282610d4d565b91505060208301518482036020860152610e0b8282610d9f565b9150508091505092915050565b5f610e238383610dd7565b905092915050565b5f602082019050919050565b5f610e4182610ce2565b610e4b8185610cec565b935083602082028501610e5d85610cfc565b805f5b85811015610e985784840389528151610e798582610e18565b9450610e8483610e2b565b925060208a01995050600181019050610e60565b50829750879550505050505092915050565b610eb381610954565b82525050565b5f608083015f8301518482035f860152610ed38282610d4d565b91505060208301518482036020860152610eed8282610d4d565b91505060408301518482036040860152610f078282610d4d565b91505060608301518482036060860152610f218282610d4d565b9150508091505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610f608161082f565b82525050565b5f604083015f830151610f7b5f860182610f57565b5060208301518482036020860152610f938282610d4d565b9150508091505092915050565b5f610fab8383610f66565b905092915050565b5f602082019050919050565b5f610fc982610f2e565b610fd38185610f38565b935083602082028501610fe585610f48565b805f5b8581101561102057848403895281516110018582610fa0565b945061100c83610fb3565b925060208a01995050600181019050610fe8565b50829750879550505050505092915050565b5f61103c82610b61565b9050919050565b61104c81611032565b82525050565b5f6101a083015f8301516110685f860182610cd3565b50602083015184820360208601526110808282610e37565b91505060408301516110956040860182610eaa565b50606083015184820360608601526110ad8282610eb9565b91505060808301516110c26080860182610cd3565b5060a08301516110d560a0860182610cd3565b5060c083015184820360c08601526110ed8282610fbf565b91505060e083015161110260e0860182610cd3565b50610100830151611117610100860182610cd3565b506101208301518482036101208601526111318282610d4d565b91505061014083015184820361014086015261114d8282610d4d565b9150506101608301518482036101608601526111698282610d4d565b915050610180830151611180610180860182611043565b508091505092915050565b5f6111968383611052565b905092915050565b5f602082019050919050565b5f6111b482610caa565b6111be8185610cb4565b9350836020820285016111d085610cc4565b805f5b8581101561120b57848403895281516111ec858261118b565b94506111f78361119e565b925060208a019950506001810190506111d3565b50829750879550505050505092915050565b5f6020820190508181035f83015261123581846111aa565b905092915050565b5f6101a083015f8301516112535f860182610cd3565b506020830151848203602086015261126b8282610e37565b91505060408301516112806040860182610eaa565b50606083015184820360608601526112988282610eb9565b91505060808301516112ad6080860182610cd3565b5060a08301516112c060a0860182610cd3565b5060c083015184820360c08601526112d88282610fbf565b91505060e08301516112ed60e0860182610cd3565b50610100830151611302610100860182610cd3565b5061012083015184820361012086015261131c8282610d4d565b9150506101408301518482036101408601526113388282610d4d565b9150506101608301518482036101608601526113548282610d4d565b91505061018083015161136b610180860182611043565b508091505092915050565b5f6020820190508181035f83015261138e818461123d565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f80fd5b5f80fd5b5f80fd5b5f80833560016020038436030381126113eb576113ea6113cb565b5b83810192508235915060208301925067ffffffffffffffff821115611413576114126113c3565b5b602082023603831315611429576114286113c7565b5b509250929050565b5f819050919050565b5f8083356001602003843603038112611456576114556113cb565b5b83810192508235915060208301925067ffffffffffffffff82111561147e5761147d6113c3565b5b600182023603831315611494576114936113c7565b5b509250929050565b5f6114a78385610d15565b93506114b4838584610a46565b6114bd8361098e565b840190509392505050565b5f80833560016020038436030381126114e4576114e36113cb565b5b83810192508235915060208301925067ffffffffffffffff82111561150c5761150b6113c3565b5b600182023603831315611522576115216113c7565b5b509250929050565b5f6115358385610d8f565b9350611542838584610a46565b61154b8361098e565b840190509392505050565b5f604083016115675f84018461143a565b8583035f87015261157983828461149c565b9250505061158a60208401846114c8565b858303602087015261159d83828461152a565b925050508091505092915050565b5f6115b68383611556565b905092915050565b5f823560016040038336030381126115d9576115d86113cb565b5b82810191505092915050565b5f602082019050919050565b5f6115fc8385610cec565b93508360208402850161160e84611431565b805f5b8781101561165157848403895261162882846115be565b61163285826115ab565b945061163d836115e5565b925060208a01995050600181019050611611565b50829750879450505050509392505050565b5f808335600160200384360303811261167f5761167e6113cb565b5b83810192508235915060208301925067ffffffffffffffff8211156116a7576116a66113c3565b5b6020820236038313156116bd576116bc6113c7565b5b509250929050565b5f819050919050565b5f6116dc602084018461084e565b905092915050565b5f604083016116f55f8401846116ce565b6117015f860182610f57565b5061170f602084018461143a565b858303602087015261172283828461149c565b925050508091505092915050565b5f61173b83836116e4565b905092915050565b5f8235600160400383360303811261175e5761175d6113cb565b5b82810191505092915050565b5f602082019050919050565b5f6117818385610f38565b935083602084028501611793846116c5565b805f5b878110156117d65784840389526117ad8284611743565b6117b78582611730565b94506117c28361176a565b925060208a01995050600181019050611796565b50829750879450505050509392505050565b6117f181611032565b81146117fb575f80fd5b50565b5f8135905061180c816117e8565b92915050565b5f61182060208401846117fe565b905092915050565b61183181610b2e565b811461183b575f80fd5b50565b5f8135905061184c81611828565b92915050565b5f611860602084018461183e565b905092915050565b61187181610b2e565b82525050565b5f60e083016118885f8401846113cf565b8583035f87015261189a8382846115f1565b925050506118ab6020840184611663565b85830360208701526118be838284611776565b925050506118cf6040840184611812565b6118dc6040860182611043565b506118ea606084018461143a565b85830360608701526118fd83828461149c565b9250505061190e608084018461143a565b858303608087015261192183828461149c565b9250505061193260a084018461143a565b85830360a087015261194583828461149c565b9250505061195660c0840184611852565b61196360c0860182611868565b508091505092915050565b5f6020820190508181035f8301526119868184611877565b905092915050565b5f8151905061199c8161092a565b92915050565b5f602082840312156119b7576119b66107a4565b5b5f6119c48482850161198e565b91505092915050565b6119d681610954565b82525050565b5f82825260208201905092915050565b5f6119f682610d0b565b611a0081856119dc565b9350611a10818560208601610d25565b611a198161098e565b840191505092915050565b5f606082019050611a375f830186610902565b611a4460208301856119cd565b8181036040830152611a5681846119ec565b9050949350505050565b5f81519050611a6e81611828565b92915050565b5f60208284031215611a8957611a886107a4565b5b5f611a9684828501611a60565b91505092915050565b5f8060408385031215611ab557611ab46107a4565b5b5f611ac28582860161198e565b9250506020611ad38582860161198e565b9150509250929050565b5f60a083015f8301518482035f860152611af78282610d4d565b9150506020830151611b0c6020860182610cd3565b506040830151611b1f6040860182610cd3565b506060830151611b326060860182611868565b506080830151611b456080860182611868565b508091505092915050565b5f604082019050611b635f8301856119cd565b8181036020830152611b758184611add565b90509392505050565b5f67ffffffffffffffff821115611b9857611b9761099e565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f67ffffffffffffffff821115611bcb57611bca61099e565b5b602082029050602081019050919050565b5f611bee611be984610a16565b6109fc565b905082815260208101848484011115611c0a57611c0961098a565b5b611c15848285610d25565b509392505050565b5f82601f830112611c3157611c306107ce565b5b8151611c41848260208601611bdc565b91505092915050565b5f67ffffffffffffffff821115611c6457611c6361099e565b5b611c6d8261098e565b9050602081019050919050565b5f611c8c611c8784611c4a565b6109fc565b905082815260208101848484011115611ca857611ca761098a565b5b611cb3848285610d25565b509392505050565b5f82601f830112611ccf57611cce6107ce565b5b8151611cdf848260208601611c7a565b91505092915050565b5f60408284031215611cfd57611cfc611ba9565b5b611d0760406109fc565b90505f82015167ffffffffffffffff811115611d2657611d25611bad565b5b611d3284828501611c1d565b5f83015250602082015167ffffffffffffffff811115611d5557611d54611bad565b5b611d6184828501611cbb565b60208301525092915050565b5f611d7f611d7a84611bb1565b6109fc565b90508083825260208201905060208402830185811115611da257611da16107d6565b5b835b81811015611de957805167ffffffffffffffff811115611dc757611dc66107ce565b5b808601611dd48982611ce8565b85526020850194505050602081019050611da4565b5050509392505050565b5f82601f830112611e0757611e066107ce565b5b8151611e17848260208601611d6d565b91505092915050565b5f81519050611e2e81610960565b92915050565b5f60808284031215611e4957611e48611ba9565b5b611e5360806109fc565b90505f82015167ffffffffffffffff811115611e7257611e71611bad565b5b611e7e84828501611c1d565b5f83015250602082015167ffffffffffffffff811115611ea157611ea0611bad565b5b611ead84828501611c1d565b602083015250604082015167ffffffffffffffff811115611ed157611ed0611bad565b5b611edd84828501611c1d565b604083015250606082015167ffffffffffffffff811115611f0157611f00611bad565b5b611f0d84828501611c1d565b60608301525092915050565b5f67ffffffffffffffff821115611f3357611f3261099e565b5b602082029050602081019050919050565b5f81519050611f5281610838565b92915050565b5f60408284031215611f6d57611f6c611ba9565b5b611f7760406109fc565b90505f611f8684828501611f44565b5f83015250602082015167ffffffffffffffff811115611fa957611fa8611bad565b5b611fb584828501611c1d565b60208301525092915050565b5f611fd3611fce84611f19565b6109fc565b90508083825260208201905060208402830185811115611ff657611ff56107d6565b5b835b8181101561203d57805167ffffffffffffffff81111561201b5761201a6107ce565b5b8086016120288982611f58565b85526020850194505050602081019050611ff8565b5050509392505050565b5f82601f83011261205b5761205a6107ce565b5b815161206b848260208601611fc1565b91505092915050565b5f81519050612082816117e8565b92915050565b5f6101a0828403121561209e5761209d611ba9565b5b6120a96101a06109fc565b90505f6120b88482850161198e565b5f83015250602082015167ffffffffffffffff8111156120db576120da611bad565b5b6120e784828501611df3565b60208301525060406120fb84828501611e20565b604083015250606082015167ffffffffffffffff81111561211f5761211e611bad565b5b61212b84828501611e34565b606083015250608061213f8482850161198e565b60808301525060a06121538482850161198e565b60a08301525060c082015167ffffffffffffffff81111561217757612176611bad565b5b61218384828501612047565b60c08301525060e06121978482850161198e565b60e0830152506101006121ac8482850161198e565b6101008301525061012082015167ffffffffffffffff8111156121d2576121d1611bad565b5b6121de84828501611c1d565b6101208301525061014082015167ffffffffffffffff81111561220457612203611bad565b5b61221084828501611c1d565b6101408301525061016082015167ffffffffffffffff81111561223657612235611bad565b5b61224284828501611c1d565b6101608301525061018061225884828501612074565b6101808301525092915050565b5f61227761227284611b7e565b6109fc565b9050808382526020820190506020840283018581111561229a576122996107d6565b5b835b818110156122e157805167ffffffffffffffff8111156122bf576122be6107ce565b5b8086016122cc8982612088565b8552602085019450505060208101905061229c565b5050509392505050565b5f82601f8301126122ff576122fe6107ce565b5b815161230f848260208601612265565b91505092915050565b5f6040828403121561232d5761232c611ba9565b5b61233760406109fc565b90505f82015167ffffffffffffffff81111561235657612355611bad565b5b61236284828501611c1d565b5f8301525060206123758482850161198e565b60208301525092915050565b5f8060408385031215612397576123966107a4565b5b5f83015167ffffffffffffffff8111156123b4576123b36107a8565b5b6123c0858286016122eb565b925050602083015167ffffffffffffffff8111156123e1576123e06107a8565b5b6123ed85828601612318565b9150509250929050565b5f6020828403121561240c5761240b6107a4565b5b5f82015167ffffffffffffffff811115612429576124286107a8565b5b61243584828501612088565b9150509291505056fea26469706673582212203a7ddd435312b1bb86536949e71389633ba2796df3994b5da3a8ce07417a5b4264736f6c63430008150033", } // GovernanceWrapperABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/liquid_staking.abigen.go b/contracts/bindings/testing/liquid_staking.abigen.go index 30836b560..74deba0f5 100644 --- a/contracts/bindings/testing/liquid_staking.abigen.go +++ b/contracts/bindings/testing/liquid_staking.abigen.go @@ -32,7 +32,7 @@ var ( // LiquidStakingMetaData contains all meta data concerning the LiquidStaking contract. var LiquidStakingMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InvalidValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"Data\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"Success\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getActiveValidators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staking\",\"outputs\":[{\"internalType\":\"contractIStakingModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"validatorAddress\",\"type\":\"address\"}],\"name\":\"totalDelegated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x61010060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660e09073ffffffffffffffffffffffffffffffffffffffff1681525034801562000058575f80fd5b50604051620031d7380380620031d783398181016040528101906200007e9190620002f0565b81816012825f9081620000929190620005aa565b508160019081620000a49190620005aa565b508060ff1660808160ff16815250504660a08181525050620000cb620000dd60201b60201c565b60c08181525050505050505062000817565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010f919062000736565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200162000150959493929190620007bc565b60405160208183030381529060405280519060200120905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620001cc8262000184565b810181811067ffffffffffffffff82111715620001ee57620001ed62000194565b5b80604052505050565b5f620002026200016b565b9050620002108282620001c1565b919050565b5f67ffffffffffffffff82111562000232576200023162000194565b5b6200023d8262000184565b9050602081019050919050565b5f5b83811015620002695780820151818401526020810190506200024c565b5f8484015250505050565b5f6200028a620002848462000215565b620001f7565b905082815260208101848484011115620002a957620002a862000180565b5b620002b68482856200024a565b509392505050565b5f82601f830112620002d557620002d46200017c565b5b8151620002e784826020860162000274565b91505092915050565b5f806040838503121562000309576200030862000174565b5b5f83015167ffffffffffffffff81111562000329576200032862000178565b5b6200033785828601620002be565b925050602083015167ffffffffffffffff8111156200035b576200035a62000178565b5b6200036985828601620002be565b9150509250929050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620003c257607f821691505b602082108103620003d857620003d76200037d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200043c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003ff565b620004488683620003ff565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620004926200048c620004868462000460565b62000469565b62000460565b9050919050565b5f819050919050565b620004ad8362000472565b620004c5620004bc8262000499565b8484546200040b565b825550505050565b5f90565b620004db620004cd565b620004e8818484620004a2565b505050565b5b818110156200050f57620005035f82620004d1565b600181019050620004ee565b5050565b601f8211156200055e576200052881620003de565b6200053384620003f0565b8101602085101562000543578190505b6200055b6200055285620003f0565b830182620004ed565b50505b505050565b5f82821c905092915050565b5f620005805f198460080262000563565b1980831691505092915050565b5f6200059a83836200056f565b9150826002028217905092915050565b620005b58262000373565b67ffffffffffffffff811115620005d157620005d062000194565b5b620005dd8254620003aa565b620005ea82828562000513565b5f60209050601f83116001811462000620575f84156200060b578287015190505b6200061785826200058d565b86555062000686565b601f1984166200063086620003de565b5f5b82811015620006595784890151825560018201915060208501945060208101905062000632565b8683101562000679578489015162000675601f8916826200056f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620006b881620003aa565b620006c481866200068e565b9450600182165f8114620006e15760018114620006f7576200072d565b60ff19831686528115158202860193506200072d565b620007028562000698565b5f5b83811015620007255781548189015260018201915060208101905062000704565b838801955050505b50505092915050565b5f620007438284620006aa565b915081905092915050565b5f819050919050565b62000762816200074e565b82525050565b620007738162000460565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620007a48262000779565b9050919050565b620007b68162000798565b82525050565b5f60a082019050620007d15f83018862000757565b620007e0602083018762000757565b620007ef604083018662000757565b620007fe606083018562000768565b6200080d6080830184620007ab565b9695505050505050565b60805160a05160c05160e051612970620008675f395f8181610907015281816109ec01528181610bac01528181610c6c015261117501525f6108e001525f6108ac01525f61088701526129705ff3fe608060405260043610610101575f3560e01c806370a08231116100945780639fa6dd35116100635780639fa6dd351461034a578063a9059cbb14610366578063d505accf146103a2578063dd62ed3e146103ca578063f639187e1461040657610108565b806370a082311461027e5780637ecebe00146102ba57806395d89b41146102f65780639de702581461032057610108565b80632e1a7d4d116100d05780632e1a7d4d146101d8578063313ce567146102005780633644e5151461022a5780634cf088d91461025457610108565b806306fdde031461010c578063095ea7b31461013657806318160ddd1461017257806323b872dd1461019c57610108565b3661010857005b5f80fd5b348015610117575f80fd5b50610120610442565b60405161012d9190611501565b60405180910390f35b348015610141575f80fd5b5061015c600480360381019061015791906115bf565b6104cd565b6040516101699190611617565b60405180910390f35b34801561017d575f80fd5b506101866105ba565b604051610193919061163f565b60405180910390f35b3480156101a7575f80fd5b506101c260048036038101906101bd9190611658565b6105c0565b6040516101cf9190611617565b60405180910390f35b3480156101e3575f80fd5b506101fe60048036038101906101f991906116a8565b6107fb565b005b34801561020b575f80fd5b50610214610885565b60405161022191906116ee565b60405180910390f35b348015610235575f80fd5b5061023e6108a9565b60405161024b919061171f565b60405180910390f35b34801561025f575f80fd5b50610268610905565b6040516102759190611793565b60405180910390f35b348015610289575f80fd5b506102a4600480360381019061029f91906117ac565b610929565b6040516102b1919061163f565b60405180910390f35b3480156102c5575f80fd5b506102e060048036038101906102db91906117ac565b61093e565b6040516102ed919061163f565b60405180910390f35b348015610301575f80fd5b5061030a610953565b6040516103179190611501565b60405180910390f35b34801561032b575f80fd5b506103346109df565b604051610341919061188e565b60405180910390f35b610364600480360381019061035f91906116a8565b610b68565b005b348015610371575f80fd5b5061038c600480360381019061038791906115bf565b610d58565b6040516103999190611617565b60405180910390f35b3480156103ad575f80fd5b506103c860048036038101906103c39190611902565b610e65565b005b3480156103d5575f80fd5b506103f060048036038101906103eb919061199f565b611152565b6040516103fd919061163f565b60405180910390f35b348015610411575f80fd5b5061042c600480360381019061042791906117ac565b611172565b604051610439919061163f565b60405180910390f35b5f805461044e90611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461047a90611a0a565b80156104c55780601f1061049c576101008083540402835291602001916104c5565b820191905f5260205f20905b8154815290600101906020018083116104a857829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516105a8919061163f565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146106ed5782816106709190611a67565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546107399190611a67565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516107e7919061163f565b60405180910390a360019150509392505050565b5f8103610834576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61083e3382611214565b3373ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f19350505050158015610881573d5f803e3d5ffd5b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146108de576108d96112df565b610900565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461096090611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461098c90611a0a565b80156109d75780601f106109ae576101008083540402835291602001916109d7565b820191905f5260205f20905b8154815290600101906020018083116109ba57829003601f168201915b505050505081565b60606109e9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610a439190611b86565b5f60405180830381865afa158015610a5d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610a8591906123e3565b5090505f815167ffffffffffffffff811115610aa457610aa3611baa565b5b604051908082528060200260200182016040528015610ad25781602001602082028036833780820191505090505b5090505f5b8251811015610b5e57828181518110610af357610af2612459565b5b60200260200101515f0151828281518110610b1157610b10612459565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080610b5690612486565b915050610ad7565b5080935050505090565b5f8103610ba1576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ba9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610c039190611b86565b5f60405180830381865afa158015610c1d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610c4591906123e3565b5090505f815f81518110610c5c57610c5b612459565b5b60200260200101515f015190505f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663026e402b83876040518363ffffffff1660e01b8152600401610cc59291906124dc565b6020604051808303815f875af1158015610ce1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d059190612503565b905080610d47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3e90612578565b60405180910390fd5b610d513386611369565b5050505050565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610da59190611a67565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e53919061163f565b60405180910390a36001905092915050565b42841015610ea8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9f906125e0565b60405180910390fd5b5f6001610eb36108a9565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b604051602001610f38969594939291906125fe565b60405160208183030381529060405280519060200120604051602001610f5f9291906126d1565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610f949493929190612707565b6020604051602081039080840390855afa158015610fb4573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561102757508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105d90612794565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051611141919061163f565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166315049a5a30846040518363ffffffff1660e01b81526004016111ce9291906127b2565b602060405180830381865afa1580156111e9573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061120d91906127d9565b9050919050565b8060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546112609190611a67565b925050819055508060025f82825403925050819055505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516112d3919061163f565b60405180910390a35050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f60405161130f91906128a0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200161134e9594939291906128b6565b60405160208183030381529060405280519060200120905090565b8060025f82825461137a9190612907565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611428919061163f565b60405180910390a35050565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156114ae578082015181840152602081019050611493565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6114d382611477565b6114dd8185611481565b93506114ed818560208601611491565b6114f6816114b9565b840191505092915050565b5f6020820190508181035f83015261151981846114c9565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61155b82611532565b9050919050565b61156b81611551565b8114611575575f80fd5b50565b5f8135905061158681611562565b92915050565b5f819050919050565b61159e8161158c565b81146115a8575f80fd5b50565b5f813590506115b981611595565b92915050565b5f80604083850312156115d5576115d461152a565b5b5f6115e285828601611578565b92505060206115f3858286016115ab565b9150509250929050565b5f8115159050919050565b611611816115fd565b82525050565b5f60208201905061162a5f830184611608565b92915050565b6116398161158c565b82525050565b5f6020820190506116525f830184611630565b92915050565b5f805f6060848603121561166f5761166e61152a565b5b5f61167c86828701611578565b935050602061168d86828701611578565b925050604061169e868287016115ab565b9150509250925092565b5f602082840312156116bd576116bc61152a565b5b5f6116ca848285016115ab565b91505092915050565b5f60ff82169050919050565b6116e8816116d3565b82525050565b5f6020820190506117015f8301846116df565b92915050565b5f819050919050565b61171981611707565b82525050565b5f6020820190506117325f830184611710565b92915050565b5f819050919050565b5f61175b61175661175184611532565b611738565b611532565b9050919050565b5f61176c82611741565b9050919050565b5f61177d82611762565b9050919050565b61178d81611773565b82525050565b5f6020820190506117a65f830184611784565b92915050565b5f602082840312156117c1576117c061152a565b5b5f6117ce84828501611578565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61180981611551565b82525050565b5f61181a8383611800565b60208301905092915050565b5f602082019050919050565b5f61183c826117d7565b61184681856117e1565b9350611851836117f1565b805f5b83811015611881578151611868888261180f565b975061187383611826565b925050600181019050611854565b5085935050505092915050565b5f6020820190508181035f8301526118a68184611832565b905092915050565b6118b7816116d3565b81146118c1575f80fd5b50565b5f813590506118d2816118ae565b92915050565b6118e181611707565b81146118eb575f80fd5b50565b5f813590506118fc816118d8565b92915050565b5f805f805f805f60e0888a03121561191d5761191c61152a565b5b5f61192a8a828b01611578565b975050602061193b8a828b01611578565b965050604061194c8a828b016115ab565b955050606061195d8a828b016115ab565b945050608061196e8a828b016118c4565b93505060a061197f8a828b016118ee565b92505060c06119908a828b016118ee565b91505092959891949750929550565b5f80604083850312156119b5576119b461152a565b5b5f6119c285828601611578565b92505060206119d385828601611578565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611a2157607f821691505b602082108103611a3457611a336119dd565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611a718261158c565b9150611a7c8361158c565b9250828203905081811115611a9457611a93611a3a565b5b92915050565b5f82825260208201905092915050565b5f611ab482611477565b611abe8185611a9a565b9350611ace818560208601611491565b611ad7816114b9565b840191505092915050565b5f67ffffffffffffffff82169050919050565b611afe81611ae2565b82525050565b611b0d816115fd565b82525050565b5f60a083015f8301518482035f860152611b2d8282611aaa565b9150506020830151611b426020860182611af5565b506040830151611b556040860182611af5565b506060830151611b686060860182611b04565b506080830151611b7b6080860182611b04565b508091505092915050565b5f6020820190508181035f830152611b9e8184611b13565b905092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611be0826114b9565b810181811067ffffffffffffffff82111715611bff57611bfe611baa565b5b80604052505050565b5f611c11611521565b9050611c1d8282611bd7565b919050565b5f67ffffffffffffffff821115611c3c57611c3b611baa565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b5f81519050611c6781611562565b92915050565b5f80fd5b5f67ffffffffffffffff821115611c8b57611c8a611baa565b5b611c94826114b9565b9050602081019050919050565b5f611cb3611cae84611c71565b611c08565b905082815260208101848484011115611ccf57611cce611c6d565b5b611cda848285611491565b509392505050565b5f82601f830112611cf657611cf5611ba6565b5b8151611d06848260208601611ca1565b91505092915050565b611d18816115fd565b8114611d22575f80fd5b50565b5f81519050611d3381611d0f565b92915050565b5f67ffffffffffffffff821115611d5357611d52611baa565b5b611d5c826114b9565b9050602081019050919050565b5f611d7b611d7684611d39565b611c08565b905082815260208101848484011115611d9757611d96611c6d565b5b611da2848285611491565b509392505050565b5f82601f830112611dbe57611dbd611ba6565b5b8151611dce848260208601611d69565b91505092915050565b5f81519050611de581611595565b92915050565b5f60a08284031215611e0057611dff611c51565b5b611e0a60a0611c08565b90505f82015167ffffffffffffffff811115611e2957611e28611c55565b5b611e3584828501611daa565b5f83015250602082015167ffffffffffffffff811115611e5857611e57611c55565b5b611e6484828501611daa565b602083015250604082015167ffffffffffffffff811115611e8857611e87611c55565b5b611e9484828501611daa565b604083015250606082015167ffffffffffffffff811115611eb857611eb7611c55565b5b611ec484828501611daa565b606083015250608082015167ffffffffffffffff811115611ee857611ee7611c55565b5b611ef484828501611daa565b60808301525092915050565b5f8160070b9050919050565b611f1581611f00565b8114611f1f575f80fd5b50565b5f81519050611f3081611f0c565b92915050565b5f60608284031215611f4b57611f4a611c51565b5b611f556060611c08565b90505f611f6484828501611dd7565b5f830152506020611f7784828501611dd7565b6020830152506040611f8b84828501611dd7565b60408301525092915050565b5f60808284031215611fac57611fab611c51565b5b611fb66040611c08565b90505f611fc584828501611f36565b5f83015250606082015167ffffffffffffffff811115611fe857611fe7611c55565b5b611ff484828501611daa565b60208301525092915050565b5f67ffffffffffffffff82111561201a57612019611baa565b5b602082029050602081019050919050565b61203481611ae2565b811461203e575f80fd5b50565b5f8151905061204f8161202b565b92915050565b5f61206761206284612000565b611c08565b9050808382526020820190506020840283018581111561208a57612089611c4d565b5b835b818110156120b3578061209f8882612041565b84526020840193505060208101905061208c565b5050509392505050565b5f82601f8301126120d1576120d0611ba6565b5b81516120e1848260208601612055565b91505092915050565b5f6101a08284031215612100576120ff611c51565b5b61210b6101a0611c08565b90505f61211a84828501611c59565b5f83015250602082015167ffffffffffffffff81111561213d5761213c611c55565b5b61214984828501611ce2565b602083015250604061215d84828501611d25565b604083015250606082015167ffffffffffffffff81111561218157612180611c55565b5b61218d84828501611daa565b60608301525060806121a184828501611dd7565b60808301525060a06121b584828501611dd7565b60a08301525060c082015167ffffffffffffffff8111156121d9576121d8611c55565b5b6121e584828501611deb565b60c08301525060e06121f984828501611f22565b60e08301525061010082015167ffffffffffffffff81111561221e5761221d611c55565b5b61222a84828501611daa565b6101008301525061012082015167ffffffffffffffff8111156122505761224f611c55565b5b61225c84828501611f97565b6101208301525061014061227284828501611dd7565b6101408301525061016061228884828501611f22565b6101608301525061018082015167ffffffffffffffff8111156122ae576122ad611c55565b5b6122ba848285016120bd565b6101808301525092915050565b5f6122d96122d484611c22565b611c08565b905080838252602082019050602084028301858111156122fc576122fb611c4d565b5b835b8181101561234357805167ffffffffffffffff81111561232157612320611ba6565b5b80860161232e89826120ea565b855260208501945050506020810190506122fe565b5050509392505050565b5f82601f83011261236157612360611ba6565b5b81516123718482602086016122c7565b91505092915050565b5f6040828403121561238f5761238e611c51565b5b6123996040611c08565b90505f82015167ffffffffffffffff8111156123b8576123b7611c55565b5b6123c484828501611daa565b5f8301525060206123d784828501612041565b60208301525092915050565b5f80604083850312156123f9576123f861152a565b5b5f83015167ffffffffffffffff8111156124165761241561152e565b5b6124228582860161234d565b925050602083015167ffffffffffffffff8111156124435761244261152e565b5b61244f8582860161237a565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6124908261158c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036124c2576124c1611a3a565b5b600182019050919050565b6124d681611551565b82525050565b5f6040820190506124ef5f8301856124cd565b6124fc6020830184611630565b9392505050565b5f602082840312156125185761251761152a565b5b5f61252584828501611d25565b91505092915050565b7f4661696c656420746f2064656c656761746500000000000000000000000000005f82015250565b5f612562601283611481565b915061256d8261252e565b602082019050919050565b5f6020820190508181035f83015261258f81612556565b9050919050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f6125ca601783611481565b91506125d582612596565b602082019050919050565b5f6020820190508181035f8301526125f7816125be565b9050919050565b5f60c0820190506126115f830189611710565b61261e60208301886124cd565b61262b60408301876124cd565b6126386060830186611630565b6126456080830185611630565b61265260a0830184611630565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61269b60028361265d565b91506126a682612667565b600282019050919050565b5f819050919050565b6126cb6126c682611707565b6126b1565b82525050565b5f6126db8261268f565b91506126e782856126ba565b6020820191506126f782846126ba565b6020820191508190509392505050565b5f60808201905061271a5f830187611710565b61272760208301866116df565b6127346040830185611710565b6127416060830184611710565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f61277e600e83611481565b91506127898261274a565b602082019050919050565b5f6020820190508181035f8301526127ab81612772565b9050919050565b5f6040820190506127c55f8301856124cd565b6127d260208301846124cd565b9392505050565b5f602082840312156127ee576127ed61152a565b5b5f6127fb84828501611dd7565b91505092915050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461282c81611a0a565b6128368186612804565b9450600182165f8114612850576001811461286557612897565b60ff1983168652811515820286019350612897565b61286e8561280e565b5f5b8381101561288f57815481890152600182019150602081019050612870565b838801955050505b50505092915050565b5f6128ab8284612820565b915081905092915050565b5f60a0820190506128c95f830188611710565b6128d66020830187611710565b6128e36040830186611710565b6128f06060830185611630565b6128fd60808301846124cd565b9695505050505050565b5f6129118261158c565b915061291c8361158c565b925082820190508082111561293457612933611a3a565b5b9291505056fea2646970667358221220c7e84b6db206f5d9266ae734b492fdafba600b28130ce87ee834c4d9603e490864736f6c63430008150033", + Bin: "0x61010060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660e09073ffffffffffffffffffffffffffffffffffffffff1681525034801562000058575f80fd5b50604051620031d7380380620031d783398181016040528101906200007e9190620002f0565b81816012825f9081620000929190620005aa565b508160019081620000a49190620005aa565b508060ff1660808160ff16815250504660a08181525050620000cb620000dd60201b60201c565b60c08181525050505050505062000817565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010f919062000736565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200162000150959493929190620007bc565b60405160208183030381529060405280519060200120905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620001cc8262000184565b810181811067ffffffffffffffff82111715620001ee57620001ed62000194565b5b80604052505050565b5f620002026200016b565b9050620002108282620001c1565b919050565b5f67ffffffffffffffff82111562000232576200023162000194565b5b6200023d8262000184565b9050602081019050919050565b5f5b83811015620002695780820151818401526020810190506200024c565b5f8484015250505050565b5f6200028a620002848462000215565b620001f7565b905082815260208101848484011115620002a957620002a862000180565b5b620002b68482856200024a565b509392505050565b5f82601f830112620002d557620002d46200017c565b5b8151620002e784826020860162000274565b91505092915050565b5f806040838503121562000309576200030862000174565b5b5f83015167ffffffffffffffff81111562000329576200032862000178565b5b6200033785828601620002be565b925050602083015167ffffffffffffffff8111156200035b576200035a62000178565b5b6200036985828601620002be565b9150509250929050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620003c257607f821691505b602082108103620003d857620003d76200037d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200043c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003ff565b620004488683620003ff565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620004926200048c620004868462000460565b62000469565b62000460565b9050919050565b5f819050919050565b620004ad8362000472565b620004c5620004bc8262000499565b8484546200040b565b825550505050565b5f90565b620004db620004cd565b620004e8818484620004a2565b505050565b5b818110156200050f57620005035f82620004d1565b600181019050620004ee565b5050565b601f8211156200055e576200052881620003de565b6200053384620003f0565b8101602085101562000543578190505b6200055b6200055285620003f0565b830182620004ed565b50505b505050565b5f82821c905092915050565b5f620005805f198460080262000563565b1980831691505092915050565b5f6200059a83836200056f565b9150826002028217905092915050565b620005b58262000373565b67ffffffffffffffff811115620005d157620005d062000194565b5b620005dd8254620003aa565b620005ea82828562000513565b5f60209050601f83116001811462000620575f84156200060b578287015190505b6200061785826200058d565b86555062000686565b601f1984166200063086620003de565b5f5b82811015620006595784890151825560018201915060208501945060208101905062000632565b8683101562000679578489015162000675601f8916826200056f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620006b881620003aa565b620006c481866200068e565b9450600182165f8114620006e15760018114620006f7576200072d565b60ff19831686528115158202860193506200072d565b620007028562000698565b5f5b83811015620007255781548189015260018201915060208101905062000704565b838801955050505b50505092915050565b5f620007438284620006aa565b915081905092915050565b5f819050919050565b62000762816200074e565b82525050565b620007738162000460565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620007a48262000779565b9050919050565b620007b68162000798565b82525050565b5f60a082019050620007d15f83018862000757565b620007e0602083018762000757565b620007ef604083018662000757565b620007fe606083018562000768565b6200080d6080830184620007ab565b9695505050505050565b60805160a05160c05160e051612970620008675f395f8181610907015281816109ec01528181610bac01528181610c6c015261117501525f6108e001525f6108ac01525f61088701526129705ff3fe608060405260043610610101575f3560e01c806370a08231116100945780639fa6dd35116100635780639fa6dd351461034a578063a9059cbb14610366578063d505accf146103a2578063dd62ed3e146103ca578063f639187e1461040657610108565b806370a082311461027e5780637ecebe00146102ba57806395d89b41146102f65780639de702581461032057610108565b80632e1a7d4d116100d05780632e1a7d4d146101d8578063313ce567146102005780633644e5151461022a5780634cf088d91461025457610108565b806306fdde031461010c578063095ea7b31461013657806318160ddd1461017257806323b872dd1461019c57610108565b3661010857005b5f80fd5b348015610117575f80fd5b50610120610442565b60405161012d9190611501565b60405180910390f35b348015610141575f80fd5b5061015c600480360381019061015791906115bf565b6104cd565b6040516101699190611617565b60405180910390f35b34801561017d575f80fd5b506101866105ba565b604051610193919061163f565b60405180910390f35b3480156101a7575f80fd5b506101c260048036038101906101bd9190611658565b6105c0565b6040516101cf9190611617565b60405180910390f35b3480156101e3575f80fd5b506101fe60048036038101906101f991906116a8565b6107fb565b005b34801561020b575f80fd5b50610214610885565b60405161022191906116ee565b60405180910390f35b348015610235575f80fd5b5061023e6108a9565b60405161024b919061171f565b60405180910390f35b34801561025f575f80fd5b50610268610905565b6040516102759190611793565b60405180910390f35b348015610289575f80fd5b506102a4600480360381019061029f91906117ac565b610929565b6040516102b1919061163f565b60405180910390f35b3480156102c5575f80fd5b506102e060048036038101906102db91906117ac565b61093e565b6040516102ed919061163f565b60405180910390f35b348015610301575f80fd5b5061030a610953565b6040516103179190611501565b60405180910390f35b34801561032b575f80fd5b506103346109df565b604051610341919061188e565b60405180910390f35b610364600480360381019061035f91906116a8565b610b68565b005b348015610371575f80fd5b5061038c600480360381019061038791906115bf565b610d58565b6040516103999190611617565b60405180910390f35b3480156103ad575f80fd5b506103c860048036038101906103c39190611902565b610e65565b005b3480156103d5575f80fd5b506103f060048036038101906103eb919061199f565b611152565b6040516103fd919061163f565b60405180910390f35b348015610411575f80fd5b5061042c600480360381019061042791906117ac565b611172565b604051610439919061163f565b60405180910390f35b5f805461044e90611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461047a90611a0a565b80156104c55780601f1061049c576101008083540402835291602001916104c5565b820191905f5260205f20905b8154815290600101906020018083116104a857829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516105a8919061163f565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146106ed5782816106709190611a67565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546107399190611a67565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516107e7919061163f565b60405180910390a360019150509392505050565b5f8103610834576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61083e3382611214565b3373ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f19350505050158015610881573d5f803e3d5ffd5b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146108de576108d96112df565b610900565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461096090611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461098c90611a0a565b80156109d75780601f106109ae576101008083540402835291602001916109d7565b820191905f5260205f20905b8154815290600101906020018083116109ba57829003601f168201915b505050505081565b60606109e9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610a439190611b86565b5f60405180830381865afa158015610a5d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610a8591906123e3565b5090505f815167ffffffffffffffff811115610aa457610aa3611baa565b5b604051908082528060200260200182016040528015610ad25781602001602082028036833780820191505090505b5090505f5b8251811015610b5e57828181518110610af357610af2612459565b5b60200260200101515f0151828281518110610b1157610b10612459565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080610b5690612486565b915050610ad7565b5080935050505090565b5f8103610ba1576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ba9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610c039190611b86565b5f60405180830381865afa158015610c1d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610c4591906123e3565b5090505f815f81518110610c5c57610c5b612459565b5b60200260200101515f015190505f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663026e402b83876040518363ffffffff1660e01b8152600401610cc59291906124dc565b6020604051808303815f875af1158015610ce1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d059190612503565b905080610d47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3e90612578565b60405180910390fd5b610d513386611369565b5050505050565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610da59190611a67565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e53919061163f565b60405180910390a36001905092915050565b42841015610ea8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9f906125e0565b60405180910390fd5b5f6001610eb36108a9565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b604051602001610f38969594939291906125fe565b60405160208183030381529060405280519060200120604051602001610f5f9291906126d1565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610f949493929190612707565b6020604051602081039080840390855afa158015610fb4573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561102757508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105d90612794565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051611141919061163f565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166315049a5a30846040518363ffffffff1660e01b81526004016111ce9291906127b2565b602060405180830381865afa1580156111e9573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061120d91906127d9565b9050919050565b8060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546112609190611a67565b925050819055508060025f82825403925050819055505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516112d3919061163f565b60405180910390a35050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f60405161130f91906128a0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200161134e9594939291906128b6565b60405160208183030381529060405280519060200120905090565b8060025f82825461137a9190612907565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611428919061163f565b60405180910390a35050565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156114ae578082015181840152602081019050611493565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6114d382611477565b6114dd8185611481565b93506114ed818560208601611491565b6114f6816114b9565b840191505092915050565b5f6020820190508181035f83015261151981846114c9565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61155b82611532565b9050919050565b61156b81611551565b8114611575575f80fd5b50565b5f8135905061158681611562565b92915050565b5f819050919050565b61159e8161158c565b81146115a8575f80fd5b50565b5f813590506115b981611595565b92915050565b5f80604083850312156115d5576115d461152a565b5b5f6115e285828601611578565b92505060206115f3858286016115ab565b9150509250929050565b5f8115159050919050565b611611816115fd565b82525050565b5f60208201905061162a5f830184611608565b92915050565b6116398161158c565b82525050565b5f6020820190506116525f830184611630565b92915050565b5f805f6060848603121561166f5761166e61152a565b5b5f61167c86828701611578565b935050602061168d86828701611578565b925050604061169e868287016115ab565b9150509250925092565b5f602082840312156116bd576116bc61152a565b5b5f6116ca848285016115ab565b91505092915050565b5f60ff82169050919050565b6116e8816116d3565b82525050565b5f6020820190506117015f8301846116df565b92915050565b5f819050919050565b61171981611707565b82525050565b5f6020820190506117325f830184611710565b92915050565b5f819050919050565b5f61175b61175661175184611532565b611738565b611532565b9050919050565b5f61176c82611741565b9050919050565b5f61177d82611762565b9050919050565b61178d81611773565b82525050565b5f6020820190506117a65f830184611784565b92915050565b5f602082840312156117c1576117c061152a565b5b5f6117ce84828501611578565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61180981611551565b82525050565b5f61181a8383611800565b60208301905092915050565b5f602082019050919050565b5f61183c826117d7565b61184681856117e1565b9350611851836117f1565b805f5b83811015611881578151611868888261180f565b975061187383611826565b925050600181019050611854565b5085935050505092915050565b5f6020820190508181035f8301526118a68184611832565b905092915050565b6118b7816116d3565b81146118c1575f80fd5b50565b5f813590506118d2816118ae565b92915050565b6118e181611707565b81146118eb575f80fd5b50565b5f813590506118fc816118d8565b92915050565b5f805f805f805f60e0888a03121561191d5761191c61152a565b5b5f61192a8a828b01611578565b975050602061193b8a828b01611578565b965050604061194c8a828b016115ab565b955050606061195d8a828b016115ab565b945050608061196e8a828b016118c4565b93505060a061197f8a828b016118ee565b92505060c06119908a828b016118ee565b91505092959891949750929550565b5f80604083850312156119b5576119b461152a565b5b5f6119c285828601611578565b92505060206119d385828601611578565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611a2157607f821691505b602082108103611a3457611a336119dd565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611a718261158c565b9150611a7c8361158c565b9250828203905081811115611a9457611a93611a3a565b5b92915050565b5f82825260208201905092915050565b5f611ab482611477565b611abe8185611a9a565b9350611ace818560208601611491565b611ad7816114b9565b840191505092915050565b5f67ffffffffffffffff82169050919050565b611afe81611ae2565b82525050565b611b0d816115fd565b82525050565b5f60a083015f8301518482035f860152611b2d8282611aaa565b9150506020830151611b426020860182611af5565b506040830151611b556040860182611af5565b506060830151611b686060860182611b04565b506080830151611b7b6080860182611b04565b508091505092915050565b5f6020820190508181035f830152611b9e8184611b13565b905092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611be0826114b9565b810181811067ffffffffffffffff82111715611bff57611bfe611baa565b5b80604052505050565b5f611c11611521565b9050611c1d8282611bd7565b919050565b5f67ffffffffffffffff821115611c3c57611c3b611baa565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b5f81519050611c6781611562565b92915050565b5f80fd5b5f67ffffffffffffffff821115611c8b57611c8a611baa565b5b611c94826114b9565b9050602081019050919050565b5f611cb3611cae84611c71565b611c08565b905082815260208101848484011115611ccf57611cce611c6d565b5b611cda848285611491565b509392505050565b5f82601f830112611cf657611cf5611ba6565b5b8151611d06848260208601611ca1565b91505092915050565b611d18816115fd565b8114611d22575f80fd5b50565b5f81519050611d3381611d0f565b92915050565b5f67ffffffffffffffff821115611d5357611d52611baa565b5b611d5c826114b9565b9050602081019050919050565b5f611d7b611d7684611d39565b611c08565b905082815260208101848484011115611d9757611d96611c6d565b5b611da2848285611491565b509392505050565b5f82601f830112611dbe57611dbd611ba6565b5b8151611dce848260208601611d69565b91505092915050565b5f81519050611de581611595565b92915050565b5f60a08284031215611e0057611dff611c51565b5b611e0a60a0611c08565b90505f82015167ffffffffffffffff811115611e2957611e28611c55565b5b611e3584828501611daa565b5f83015250602082015167ffffffffffffffff811115611e5857611e57611c55565b5b611e6484828501611daa565b602083015250604082015167ffffffffffffffff811115611e8857611e87611c55565b5b611e9484828501611daa565b604083015250606082015167ffffffffffffffff811115611eb857611eb7611c55565b5b611ec484828501611daa565b606083015250608082015167ffffffffffffffff811115611ee857611ee7611c55565b5b611ef484828501611daa565b60808301525092915050565b5f8160070b9050919050565b611f1581611f00565b8114611f1f575f80fd5b50565b5f81519050611f3081611f0c565b92915050565b5f60608284031215611f4b57611f4a611c51565b5b611f556060611c08565b90505f611f6484828501611dd7565b5f830152506020611f7784828501611dd7565b6020830152506040611f8b84828501611dd7565b60408301525092915050565b5f60808284031215611fac57611fab611c51565b5b611fb66040611c08565b90505f611fc584828501611f36565b5f83015250606082015167ffffffffffffffff811115611fe857611fe7611c55565b5b611ff484828501611daa565b60208301525092915050565b5f67ffffffffffffffff82111561201a57612019611baa565b5b602082029050602081019050919050565b61203481611ae2565b811461203e575f80fd5b50565b5f8151905061204f8161202b565b92915050565b5f61206761206284612000565b611c08565b9050808382526020820190506020840283018581111561208a57612089611c4d565b5b835b818110156120b3578061209f8882612041565b84526020840193505060208101905061208c565b5050509392505050565b5f82601f8301126120d1576120d0611ba6565b5b81516120e1848260208601612055565b91505092915050565b5f6101a08284031215612100576120ff611c51565b5b61210b6101a0611c08565b90505f61211a84828501611c59565b5f83015250602082015167ffffffffffffffff81111561213d5761213c611c55565b5b61214984828501611ce2565b602083015250604061215d84828501611d25565b604083015250606082015167ffffffffffffffff81111561218157612180611c55565b5b61218d84828501611daa565b60608301525060806121a184828501611dd7565b60808301525060a06121b584828501611dd7565b60a08301525060c082015167ffffffffffffffff8111156121d9576121d8611c55565b5b6121e584828501611deb565b60c08301525060e06121f984828501611f22565b60e08301525061010082015167ffffffffffffffff81111561221e5761221d611c55565b5b61222a84828501611daa565b6101008301525061012082015167ffffffffffffffff8111156122505761224f611c55565b5b61225c84828501611f97565b6101208301525061014061227284828501611dd7565b6101408301525061016061228884828501611f22565b6101608301525061018082015167ffffffffffffffff8111156122ae576122ad611c55565b5b6122ba848285016120bd565b6101808301525092915050565b5f6122d96122d484611c22565b611c08565b905080838252602082019050602084028301858111156122fc576122fb611c4d565b5b835b8181101561234357805167ffffffffffffffff81111561232157612320611ba6565b5b80860161232e89826120ea565b855260208501945050506020810190506122fe565b5050509392505050565b5f82601f83011261236157612360611ba6565b5b81516123718482602086016122c7565b91505092915050565b5f6040828403121561238f5761238e611c51565b5b6123996040611c08565b90505f82015167ffffffffffffffff8111156123b8576123b7611c55565b5b6123c484828501611daa565b5f8301525060206123d784828501612041565b60208301525092915050565b5f80604083850312156123f9576123f861152a565b5b5f83015167ffffffffffffffff8111156124165761241561152e565b5b6124228582860161234d565b925050602083015167ffffffffffffffff8111156124435761244261152e565b5b61244f8582860161237a565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6124908261158c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036124c2576124c1611a3a565b5b600182019050919050565b6124d681611551565b82525050565b5f6040820190506124ef5f8301856124cd565b6124fc6020830184611630565b9392505050565b5f602082840312156125185761251761152a565b5b5f61252584828501611d25565b91505092915050565b7f4661696c656420746f2064656c656761746500000000000000000000000000005f82015250565b5f612562601283611481565b915061256d8261252e565b602082019050919050565b5f6020820190508181035f83015261258f81612556565b9050919050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f6125ca601783611481565b91506125d582612596565b602082019050919050565b5f6020820190508181035f8301526125f7816125be565b9050919050565b5f60c0820190506126115f830189611710565b61261e60208301886124cd565b61262b60408301876124cd565b6126386060830186611630565b6126456080830185611630565b61265260a0830184611630565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61269b60028361265d565b91506126a682612667565b600282019050919050565b5f819050919050565b6126cb6126c682611707565b6126b1565b82525050565b5f6126db8261268f565b91506126e782856126ba565b6020820191506126f782846126ba565b6020820191508190509392505050565b5f60808201905061271a5f830187611710565b61272760208301866116df565b6127346040830185611710565b6127416060830184611710565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f61277e600e83611481565b91506127898261274a565b602082019050919050565b5f6020820190508181035f8301526127ab81612772565b9050919050565b5f6040820190506127c55f8301856124cd565b6127d260208301846124cd565b9392505050565b5f602082840312156127ee576127ed61152a565b5b5f6127fb84828501611dd7565b91505092915050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461282c81611a0a565b6128368186612804565b9450600182165f8114612850576001811461286557612897565b60ff1983168652811515820286019350612897565b61286e8561280e565b5f5b8381101561288f57815481890152600182019150602081019050612870565b838801955050505b50505092915050565b5f6128ab8284612820565b915081905092915050565b5f60a0820190506128c95f830188611710565b6128d66020830187611710565b6128e36040830186611710565b6128f06060830185611630565b6128fd60808301846124cd565b9695505050505050565b5f6129118261158c565b915061291c8361158c565b925082820190508082111561293457612933611a3a565b5b9291505056fea2646970667358221220e1befea2f1d88361e22fa46de66a0946314b8d5bf3a55903625d53ee040c04d264736f6c63430008150033", } // LiquidStakingABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/precompile_constructor.abigen.go b/contracts/bindings/testing/precompile_constructor.abigen.go index bbca3ec10..d90f5ec8c 100644 --- a/contracts/bindings/testing/precompile_constructor.abigen.go +++ b/contracts/bindings/testing/precompile_constructor.abigen.go @@ -32,7 +32,7 @@ var ( // PrecompileConstructorMetaData contains all meta data concerning the PrecompileConstructor contract. var PrecompileConstructorMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"stakingModule\",\"outputs\":[{\"internalType\":\"contractIStakingModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60a060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff16815250348015610056575f80fd5b5060805173ffffffffffffffffffffffffffffffffffffffff1663dcaf464a6040518163ffffffff1660e01b81526004015f60405180830381865afa1580156100a1573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906100c9919061028a565b506102d1565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61012a826100e4565b810181811067ffffffffffffffff82111715610149576101486100f4565b5b80604052505050565b5f61015b6100cf565b90506101678282610121565b919050565b5f67ffffffffffffffff821115610186576101856100f4565b5b602082029050602081019050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6101c48261019b565b9050919050565b6101d4816101ba565b81146101de575f80fd5b50565b5f815190506101ef816101cb565b92915050565b5f6102076102028461016c565b610152565b9050808382526020820190506020840283018581111561022a57610229610197565b5b835b81811015610253578061023f88826101e1565b84526020840193505060208101905061022c565b5050509392505050565b5f82601f830112610271576102706100e0565b5b81516102818482602086016101f5565b91505092915050565b5f6020828403121561029f5761029e6100d8565b5b5f82015167ffffffffffffffff8111156102bc576102bb6100dc565b5b6102c88482850161025d565b91505092915050565b6080516101236102e85f395f604601526101235ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c8063504b82bf14602a575b5f80fd5b60306044565b604051603b919060d6565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f60a460a0609c846068565b6087565b6068565b9050919050565b5f60b3826090565b9050919050565b5f60c28260ab565b9050919050565b60d08160ba565b82525050565b5f60208201905060e75f83018460c9565b9291505056fea264697066735822122026d74557dd2a531de3f06b31fa0092f284f80f0768ed6793e01c3bd2f031323764736f6c63430008150033", + Bin: "0x60a060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff16815250348015610056575f80fd5b5060805173ffffffffffffffffffffffffffffffffffffffff1663dcaf464a6040518163ffffffff1660e01b81526004015f60405180830381865afa1580156100a1573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906100c9919061028a565b506102d1565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61012a826100e4565b810181811067ffffffffffffffff82111715610149576101486100f4565b5b80604052505050565b5f61015b6100cf565b90506101678282610121565b919050565b5f67ffffffffffffffff821115610186576101856100f4565b5b602082029050602081019050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6101c48261019b565b9050919050565b6101d4816101ba565b81146101de575f80fd5b50565b5f815190506101ef816101cb565b92915050565b5f6102076102028461016c565b610152565b9050808382526020820190506020840283018581111561022a57610229610197565b5b835b81811015610253578061023f88826101e1565b84526020840193505060208101905061022c565b5050509392505050565b5f82601f830112610271576102706100e0565b5b81516102818482602086016101f5565b91505092915050565b5f6020828403121561029f5761029e6100d8565b5b5f82015167ffffffffffffffff8111156102bc576102bb6100dc565b5b6102c88482850161025d565b91505092915050565b6080516101236102e85f395f604601526101235ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c8063504b82bf14602a575b5f80fd5b60306044565b604051603b919060d6565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f60a460a0609c846068565b6087565b6068565b9050919050565b5f60b3826090565b9050919050565b5f60c28260ab565b9050919050565b60d08160ba565b82525050565b5f60208201905060e75f83018460c9565b9291505056fea264697066735822122032de415702619c2679a6596f73b8062fb27ef9e79eecaa57e39997b2e4430c3864736f6c63430008150033", } // PrecompileConstructorABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/solmate_erc20.abigen.go b/contracts/bindings/testing/solmate_erc20.abigen.go index 10953f09a..ee50028de 100644 --- a/contracts/bindings/testing/solmate_erc20.abigen.go +++ b/contracts/bindings/testing/solmate_erc20.abigen.go @@ -32,7 +32,7 @@ var ( // SolmateERC20MetaData contains all meta data concerning the SolmateERC20 contract. var SolmateERC20MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60e060405234801562000010575f80fd5b506040518060400160405280600581526020017f546f6b656e0000000000000000000000000000000000000000000000000000008152506040518060400160405280600281526020017f544b0000000000000000000000000000000000000000000000000000000000008152506012825f90816200008f9190620003ca565b508160019081620000a19190620003ca565b508060ff1660808160ff16815250504660a08181525050620000c8620000d860201b60201c565b60c0818152505050505062000637565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010a919062000556565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc646306040516020016200014b959493929190620005dc565b60405160208183030381529060405280519060200120905090565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620001e257607f821691505b602082108103620001f857620001f76200019d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200025c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200021f565b6200026886836200021f565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620002b2620002ac620002a68462000280565b62000289565b62000280565b9050919050565b5f819050919050565b620002cd8362000292565b620002e5620002dc82620002b9565b8484546200022b565b825550505050565b5f90565b620002fb620002ed565b62000308818484620002c2565b505050565b5b818110156200032f57620003235f82620002f1565b6001810190506200030e565b5050565b601f8211156200037e576200034881620001fe565b620003538462000210565b8101602085101562000363578190505b6200037b620003728562000210565b8301826200030d565b50505b505050565b5f82821c905092915050565b5f620003a05f198460080262000383565b1980831691505092915050565b5f620003ba83836200038f565b9150826002028217905092915050565b620003d58262000166565b67ffffffffffffffff811115620003f157620003f062000170565b5b620003fd8254620001ca565b6200040a82828562000333565b5f60209050601f83116001811462000440575f84156200042b578287015190505b620004378582620003ad565b865550620004a6565b601f1984166200045086620001fe565b5f5b82811015620004795784890151825560018201915060208501945060208101905062000452565b8683101562000499578489015162000495601f8916826200038f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620004d881620001ca565b620004e48186620004ae565b9450600182165f811462000501576001811462000517576200054d565b60ff19831686528115158202860193506200054d565b6200052285620004b8565b5f5b83811015620005455781548189015260018201915060208101905062000524565b838801955050505b50505092915050565b5f620005638284620004ca565b915081905092915050565b5f819050919050565b62000582816200056e565b82525050565b620005938162000280565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620005c48262000599565b9050919050565b620005d681620005b8565b82525050565b5f60a082019050620005f15f83018862000577565b62000600602083018762000577565b6200060f604083018662000577565b6200061e606083018562000588565b6200062d6080830184620005cb565b9695505050505050565b60805160a05160c0516115b0620006625f395f6106d301525f61069f01525f61067a01526115b05ff3fe608060405234801561000f575f80fd5b50600436106100cd575f3560e01c806340c10f191161008a57806395d89b411161006457806395d89b4114610225578063a9059cbb14610243578063d505accf14610273578063dd62ed3e1461028f576100cd565b806340c10f19146101a957806370a08231146101c55780637ecebe00146101f5576100cd565b806306fdde03146100d1578063095ea7b3146100ef57806318160ddd1461011f57806323b872dd1461013d578063313ce5671461016d5780633644e5151461018b575b5f80fd5b6100d96102bf565b6040516100e69190610e03565b60405180910390f35b61010960048036038101906101049190610eb4565b61034a565b6040516101169190610f0c565b60405180910390f35b610127610437565b6040516101349190610f34565b60405180910390f35b61015760048036038101906101529190610f4d565b61043d565b6040516101649190610f0c565b60405180910390f35b610175610678565b6040516101829190610fb8565b60405180910390f35b61019361069c565b6040516101a09190610fe9565b60405180910390f35b6101c360048036038101906101be9190610eb4565b6106f8565b005b6101df60048036038101906101da9190611002565b610754565b6040516101ec9190610f34565b60405180910390f35b61020f600480360381019061020a9190611002565b610769565b60405161021c9190610f34565b60405180910390f35b61022d61077e565b60405161023a9190610e03565b60405180910390f35b61025d60048036038101906102589190610eb4565b61080a565b60405161026a9190610f0c565b60405180910390f35b61028d60048036038101906102889190611081565b610917565b005b6102a960048036038101906102a4919061111e565b610c04565b6040516102b69190610f34565b60405180910390f35b5f80546102cb90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546102f790611189565b80156103425780601f1061031957610100808354040283529160200191610342565b820191905f5260205f20905b81548152906001019060200180831161032557829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516104259190610f34565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461056a5782816104ed91906111e6565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105b691906111e6565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516106649190610f34565b60405180910390a360019150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146106d1576106cc610c24565b6106f3565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b6107028282610cae565b8173ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885826040516107489190610f34565b60405180910390a25050565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461078b90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546107b790611189565b80156108025780601f106107d957610100808354040283529160200191610802565b820191905f5260205f20905b8154815290600101906020018083116107e557829003601f168201915b505050505081565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461085791906111e6565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109059190610f34565b60405180910390a36001905092915050565b4284101561095a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095190611263565b60405180910390fd5b5f600161096561069c565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b6040516020016109ea96959493929190611290565b60405160208183030381529060405280519060200120604051602001610a11929190611363565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610a469493929190611399565b6020604051602081039080840390855afa158015610a66573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015610ad957508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90611426565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051610bf39190610f34565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f604051610c5491906114e0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc64630604051602001610c939594939291906114f6565b60405160208183030381529060405280519060200120905090565b8060025f828254610cbf9190611547565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d6d9190610f34565b60405180910390a35050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610db0578082015181840152602081019050610d95565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610dd582610d79565b610ddf8185610d83565b9350610def818560208601610d93565b610df881610dbb565b840191505092915050565b5f6020820190508181035f830152610e1b8184610dcb565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e5082610e27565b9050919050565b610e6081610e46565b8114610e6a575f80fd5b50565b5f81359050610e7b81610e57565b92915050565b5f819050919050565b610e9381610e81565b8114610e9d575f80fd5b50565b5f81359050610eae81610e8a565b92915050565b5f8060408385031215610eca57610ec9610e23565b5b5f610ed785828601610e6d565b9250506020610ee885828601610ea0565b9150509250929050565b5f8115159050919050565b610f0681610ef2565b82525050565b5f602082019050610f1f5f830184610efd565b92915050565b610f2e81610e81565b82525050565b5f602082019050610f475f830184610f25565b92915050565b5f805f60608486031215610f6457610f63610e23565b5b5f610f7186828701610e6d565b9350506020610f8286828701610e6d565b9250506040610f9386828701610ea0565b9150509250925092565b5f60ff82169050919050565b610fb281610f9d565b82525050565b5f602082019050610fcb5f830184610fa9565b92915050565b5f819050919050565b610fe381610fd1565b82525050565b5f602082019050610ffc5f830184610fda565b92915050565b5f6020828403121561101757611016610e23565b5b5f61102484828501610e6d565b91505092915050565b61103681610f9d565b8114611040575f80fd5b50565b5f813590506110518161102d565b92915050565b61106081610fd1565b811461106a575f80fd5b50565b5f8135905061107b81611057565b92915050565b5f805f805f805f60e0888a03121561109c5761109b610e23565b5b5f6110a98a828b01610e6d565b97505060206110ba8a828b01610e6d565b96505060406110cb8a828b01610ea0565b95505060606110dc8a828b01610ea0565b94505060806110ed8a828b01611043565b93505060a06110fe8a828b0161106d565b92505060c061110f8a828b0161106d565b91505092959891949750929550565b5f806040838503121561113457611133610e23565b5b5f61114185828601610e6d565b925050602061115285828601610e6d565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806111a057607f821691505b6020821081036111b3576111b261115c565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6111f082610e81565b91506111fb83610e81565b9250828203905081811115611213576112126111b9565b5b92915050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f61124d601783610d83565b915061125882611219565b602082019050919050565b5f6020820190508181035f83015261127a81611241565b9050919050565b61128a81610e46565b82525050565b5f60c0820190506112a35f830189610fda565b6112b06020830188611281565b6112bd6040830187611281565b6112ca6060830186610f25565b6112d76080830185610f25565b6112e460a0830184610f25565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61132d6002836112ef565b9150611338826112f9565b600282019050919050565b5f819050919050565b61135d61135882610fd1565b611343565b82525050565b5f61136d82611321565b9150611379828561134c565b602082019150611389828461134c565b6020820191508190509392505050565b5f6080820190506113ac5f830187610fda565b6113b96020830186610fa9565b6113c66040830185610fda565b6113d36060830184610fda565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f611410600e83610d83565b915061141b826113dc565b602082019050919050565b5f6020820190508181035f83015261143d81611404565b9050919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461146c81611189565b6114768186611444565b9450600182165f811461149057600181146114a5576114d7565b60ff19831686528115158202860193506114d7565b6114ae8561144e565b5f5b838110156114cf578154818901526001820191506020810190506114b0565b838801955050505b50505092915050565b5f6114eb8284611460565b915081905092915050565b5f60a0820190506115095f830188610fda565b6115166020830187610fda565b6115236040830186610fda565b6115306060830185610f25565b61153d6080830184611281565b9695505050505050565b5f61155182610e81565b915061155c83610e81565b9250828201905080821115611574576115736111b9565b5b9291505056fea26469706673582212202e51cf7fd61df0464d3a27dd6535d12e463c0bf3246e7a15387d926c38d7288764736f6c63430008150033", + Bin: "0x60e060405234801562000010575f80fd5b506040518060400160405280600581526020017f546f6b656e0000000000000000000000000000000000000000000000000000008152506040518060400160405280600281526020017f544b0000000000000000000000000000000000000000000000000000000000008152506012825f90816200008f9190620003ca565b508160019081620000a19190620003ca565b508060ff1660808160ff16815250504660a08181525050620000c8620000d860201b60201c565b60c0818152505050505062000637565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010a919062000556565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc646306040516020016200014b959493929190620005dc565b60405160208183030381529060405280519060200120905090565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620001e257607f821691505b602082108103620001f857620001f76200019d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200025c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200021f565b6200026886836200021f565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620002b2620002ac620002a68462000280565b62000289565b62000280565b9050919050565b5f819050919050565b620002cd8362000292565b620002e5620002dc82620002b9565b8484546200022b565b825550505050565b5f90565b620002fb620002ed565b62000308818484620002c2565b505050565b5b818110156200032f57620003235f82620002f1565b6001810190506200030e565b5050565b601f8211156200037e576200034881620001fe565b620003538462000210565b8101602085101562000363578190505b6200037b620003728562000210565b8301826200030d565b50505b505050565b5f82821c905092915050565b5f620003a05f198460080262000383565b1980831691505092915050565b5f620003ba83836200038f565b9150826002028217905092915050565b620003d58262000166565b67ffffffffffffffff811115620003f157620003f062000170565b5b620003fd8254620001ca565b6200040a82828562000333565b5f60209050601f83116001811462000440575f84156200042b578287015190505b620004378582620003ad565b865550620004a6565b601f1984166200045086620001fe565b5f5b82811015620004795784890151825560018201915060208501945060208101905062000452565b8683101562000499578489015162000495601f8916826200038f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620004d881620001ca565b620004e48186620004ae565b9450600182165f811462000501576001811462000517576200054d565b60ff19831686528115158202860193506200054d565b6200052285620004b8565b5f5b83811015620005455781548189015260018201915060208101905062000524565b838801955050505b50505092915050565b5f620005638284620004ca565b915081905092915050565b5f819050919050565b62000582816200056e565b82525050565b620005938162000280565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620005c48262000599565b9050919050565b620005d681620005b8565b82525050565b5f60a082019050620005f15f83018862000577565b62000600602083018762000577565b6200060f604083018662000577565b6200061e606083018562000588565b6200062d6080830184620005cb565b9695505050505050565b60805160a05160c0516115b0620006625f395f6106d301525f61069f01525f61067a01526115b05ff3fe608060405234801561000f575f80fd5b50600436106100cd575f3560e01c806340c10f191161008a57806395d89b411161006457806395d89b4114610225578063a9059cbb14610243578063d505accf14610273578063dd62ed3e1461028f576100cd565b806340c10f19146101a957806370a08231146101c55780637ecebe00146101f5576100cd565b806306fdde03146100d1578063095ea7b3146100ef57806318160ddd1461011f57806323b872dd1461013d578063313ce5671461016d5780633644e5151461018b575b5f80fd5b6100d96102bf565b6040516100e69190610e03565b60405180910390f35b61010960048036038101906101049190610eb4565b61034a565b6040516101169190610f0c565b60405180910390f35b610127610437565b6040516101349190610f34565b60405180910390f35b61015760048036038101906101529190610f4d565b61043d565b6040516101649190610f0c565b60405180910390f35b610175610678565b6040516101829190610fb8565b60405180910390f35b61019361069c565b6040516101a09190610fe9565b60405180910390f35b6101c360048036038101906101be9190610eb4565b6106f8565b005b6101df60048036038101906101da9190611002565b610754565b6040516101ec9190610f34565b60405180910390f35b61020f600480360381019061020a9190611002565b610769565b60405161021c9190610f34565b60405180910390f35b61022d61077e565b60405161023a9190610e03565b60405180910390f35b61025d60048036038101906102589190610eb4565b61080a565b60405161026a9190610f0c565b60405180910390f35b61028d60048036038101906102889190611081565b610917565b005b6102a960048036038101906102a4919061111e565b610c04565b6040516102b69190610f34565b60405180910390f35b5f80546102cb90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546102f790611189565b80156103425780601f1061031957610100808354040283529160200191610342565b820191905f5260205f20905b81548152906001019060200180831161032557829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516104259190610f34565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461056a5782816104ed91906111e6565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105b691906111e6565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516106649190610f34565b60405180910390a360019150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146106d1576106cc610c24565b6106f3565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b6107028282610cae565b8173ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885826040516107489190610f34565b60405180910390a25050565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461078b90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546107b790611189565b80156108025780601f106107d957610100808354040283529160200191610802565b820191905f5260205f20905b8154815290600101906020018083116107e557829003601f168201915b505050505081565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461085791906111e6565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109059190610f34565b60405180910390a36001905092915050565b4284101561095a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095190611263565b60405180910390fd5b5f600161096561069c565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b6040516020016109ea96959493929190611290565b60405160208183030381529060405280519060200120604051602001610a11929190611363565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610a469493929190611399565b6020604051602081039080840390855afa158015610a66573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015610ad957508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90611426565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051610bf39190610f34565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f604051610c5491906114e0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc64630604051602001610c939594939291906114f6565b60405160208183030381529060405280519060200120905090565b8060025f828254610cbf9190611547565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d6d9190610f34565b60405180910390a35050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610db0578082015181840152602081019050610d95565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610dd582610d79565b610ddf8185610d83565b9350610def818560208601610d93565b610df881610dbb565b840191505092915050565b5f6020820190508181035f830152610e1b8184610dcb565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e5082610e27565b9050919050565b610e6081610e46565b8114610e6a575f80fd5b50565b5f81359050610e7b81610e57565b92915050565b5f819050919050565b610e9381610e81565b8114610e9d575f80fd5b50565b5f81359050610eae81610e8a565b92915050565b5f8060408385031215610eca57610ec9610e23565b5b5f610ed785828601610e6d565b9250506020610ee885828601610ea0565b9150509250929050565b5f8115159050919050565b610f0681610ef2565b82525050565b5f602082019050610f1f5f830184610efd565b92915050565b610f2e81610e81565b82525050565b5f602082019050610f475f830184610f25565b92915050565b5f805f60608486031215610f6457610f63610e23565b5b5f610f7186828701610e6d565b9350506020610f8286828701610e6d565b9250506040610f9386828701610ea0565b9150509250925092565b5f60ff82169050919050565b610fb281610f9d565b82525050565b5f602082019050610fcb5f830184610fa9565b92915050565b5f819050919050565b610fe381610fd1565b82525050565b5f602082019050610ffc5f830184610fda565b92915050565b5f6020828403121561101757611016610e23565b5b5f61102484828501610e6d565b91505092915050565b61103681610f9d565b8114611040575f80fd5b50565b5f813590506110518161102d565b92915050565b61106081610fd1565b811461106a575f80fd5b50565b5f8135905061107b81611057565b92915050565b5f805f805f805f60e0888a03121561109c5761109b610e23565b5b5f6110a98a828b01610e6d565b97505060206110ba8a828b01610e6d565b96505060406110cb8a828b01610ea0565b95505060606110dc8a828b01610ea0565b94505060806110ed8a828b01611043565b93505060a06110fe8a828b0161106d565b92505060c061110f8a828b0161106d565b91505092959891949750929550565b5f806040838503121561113457611133610e23565b5b5f61114185828601610e6d565b925050602061115285828601610e6d565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806111a057607f821691505b6020821081036111b3576111b261115c565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6111f082610e81565b91506111fb83610e81565b9250828203905081811115611213576112126111b9565b5b92915050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f61124d601783610d83565b915061125882611219565b602082019050919050565b5f6020820190508181035f83015261127a81611241565b9050919050565b61128a81610e46565b82525050565b5f60c0820190506112a35f830189610fda565b6112b06020830188611281565b6112bd6040830187611281565b6112ca6060830186610f25565b6112d76080830185610f25565b6112e460a0830184610f25565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61132d6002836112ef565b9150611338826112f9565b600282019050919050565b5f819050919050565b61135d61135882610fd1565b611343565b82525050565b5f61136d82611321565b9150611379828561134c565b602082019150611389828461134c565b6020820191508190509392505050565b5f6080820190506113ac5f830187610fda565b6113b96020830186610fa9565b6113c66040830185610fda565b6113d36060830184610fda565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f611410600e83610d83565b915061141b826113dc565b602082019050919050565b5f6020820190508181035f83015261143d81611404565b9050919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461146c81611189565b6114768186611444565b9450600182165f811461149057600181146114a5576114d7565b60ff19831686528115158202860193506114d7565b6114ae8561144e565b5f5b838110156114cf578154818901526001820191506020810190506114b0565b838801955050505b50505092915050565b5f6114eb8284611460565b915081905092915050565b5f60a0820190506115095f830188610fda565b6115166020830187610fda565b6115236040830186610fda565b6115306060830185610f25565b61153d6080830184611281565b9695505050505050565b5f61155182610e81565b915061155c83610e81565b9250828201905080821115611574576115736111b9565b5b9291505056fea2646970667358221220561e30e936bfd35118ded14fe94698dde467ab2fc1b044b1e39f92a717be6d7c64736f6c63430008150033", } // SolmateERC20ABI is the input ABI used to generate the binding from. diff --git a/cosmos/config/mocks/app_options.go b/cosmos/config/mocks/app_options.go index 3dab32675..75bd3c1a4 100644 --- a/cosmos/config/mocks/app_options.go +++ b/cosmos/config/mocks/app_options.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.35.3. DO NOT EDIT. +// Code generated by mockery v2.35.4. DO NOT EDIT. package mocks diff --git a/cosmos/runtime/depinject.go b/cosmos/runtime/depinject.go deleted file mode 100644 index d6ada38e1..000000000 --- a/cosmos/runtime/depinject.go +++ /dev/null @@ -1,83 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package runtime - -import ( - "cosmossdk.io/depinject" - "cosmossdk.io/log" - - "pkg.berachain.dev/polaris/cosmos/config" - evmkeeper "pkg.berachain.dev/polaris/cosmos/x/evm/keeper" - ethlog "pkg.berachain.dev/polaris/eth/log" - "pkg.berachain.dev/polaris/eth/polar" -) - -// DepInjectInput is the input for the dep inject framework. -type DepInjectInput struct { - depinject.In - - Logger log.Logger - EVMKeeper *evmkeeper.Keeper - Config func() *config.Config -} - -// DepInjectOutput is the output for the dep inject framework. -type DepInjectOutput struct { - depinject.Out - - Polaris *Polaris -} - -// ProvidePolarisRuntime creates a new Polaris runtime from the provided -// dependencies. -func ProvidePolarisRuntime(input DepInjectInput) DepInjectOutput { - cfg := input.Config() - node, err := polar.NewGethNetworkingStack(&cfg.Node) - if err != nil { - panic(err) - } - - polaris := polar.NewWithNetworkingStack( - &cfg.Polar, input.EVMKeeper.Host, node, ethlog.FuncHandler( - func(r *ethlog.Record) error { - polarisGethLogger := input.Logger.With("module", "polaris-geth") - switch r.Lvl { //nolint:nolintlint,exhaustive // linter is bugged. - case ethlog.LvlTrace: - case ethlog.LvlDebug: - polarisGethLogger.Debug(r.Msg, r.Ctx...) - case ethlog.LvlInfo: - polarisGethLogger.Info(r.Msg, r.Ctx...) - case ethlog.LvlWarn: - case ethlog.LvlCrit: - case ethlog.LvlError: - polarisGethLogger.Error(r.Msg, r.Ctx...) - } - return nil - }), - ) - - return DepInjectOutput{ - Polaris: &Polaris{ - Polaris: polaris, - EVMKeeper: input.EVMKeeper, - }, - } -} diff --git a/eth/core/mock/config_plugin.go b/cosmos/runtime/logging.go similarity index 59% rename from eth/core/mock/config_plugin.go rename to cosmos/runtime/logging.go index 9d2a53bf6..5721a4b21 100644 --- a/eth/core/mock/config_plugin.go +++ b/cosmos/runtime/logging.go @@ -18,27 +18,29 @@ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND // TITLE. -package mock +package runtime import ( - "context" + "cosmossdk.io/log" - "pkg.berachain.dev/polaris/eth/params" + ethlog "pkg.berachain.dev/polaris/eth/log" ) -// const testBaseFee = 69 - -//go:generate moq -out ./config_plugin.mock.go -pkg mock ../ ConfigurationPlugin - -func NewConfigurationPluginMock() *ConfigurationPluginMock { - // make and configure a mocked core.ConfigurationPlugin - mockedConfigurationPlugin := &ConfigurationPluginMock{ - ChainConfigFunc: func() *params.ChainConfig { - return params.DefaultChainConfig - }, - PrepareFunc: func(contextMoqParam context.Context) { - // no-op - }, - } - return mockedConfigurationPlugin +// LoggerFuncHandler injects the cosmos-sdk logger into geth. +func LoggerFuncHandler(logger log.Logger) ethlog.Handler { + return ethlog.FuncHandler(func(r *ethlog.Record) error { + polarisGethLogger := logger.With("module", "polaris-geth") + switch r.Lvl { //nolint:nolintlint,exhaustive // linter is bugged. + case ethlog.LvlTrace: + case ethlog.LvlDebug: + polarisGethLogger.Debug(r.Msg, r.Ctx...) + case ethlog.LvlInfo: + polarisGethLogger.Info(r.Msg, r.Ctx...) + case ethlog.LvlWarn: + case ethlog.LvlCrit: + case ethlog.LvlError: + polarisGethLogger.Error(r.Msg, r.Ctx...) + } + return nil + }) } diff --git a/cosmos/runtime/runtime.go b/cosmos/runtime/runtime.go index 6e217e18e..9a3182691 100644 --- a/cosmos/runtime/runtime.go +++ b/cosmos/runtime/runtime.go @@ -31,52 +31,78 @@ import ( "github.com/ethereum/go-ethereum/beacon/engine" "github.com/ethereum/go-ethereum/node" + "pkg.berachain.dev/polaris/cosmos/config" libtx "pkg.berachain.dev/polaris/cosmos/lib/tx" "pkg.berachain.dev/polaris/cosmos/miner" "pkg.berachain.dev/polaris/cosmos/txpool" evmkeeper "pkg.berachain.dev/polaris/cosmos/x/evm/keeper" - enginep "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/engine" evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types" + "pkg.berachain.dev/polaris/eth/core" coretypes "pkg.berachain.dev/polaris/eth/core/types" "pkg.berachain.dev/polaris/eth/polar" ) +// EVMKeeper is an interface that defines the methods needed for the EVM setup. +type EVMKeeper interface { + // Setup initializes the EVM keeper. + Setup(evmkeeper.Blockchain) error + + // TODO: remove. + StartEnginePlugin(client.Context) +} + +// Polaris is a struct that wraps the Polaris struct from the polar package. +// It also includes wrapped versions of the Geth Miner and TxPool. type Polaris struct { *polar.Polaris - // polaris keepers - EVMKeeper *evmkeeper.Keeper - - // polaris componets - WrappedMiner *miner.Miner + // WrappedMiner is a wrapped version of the Miner component. + WrappedMiner *miner.Miner + // WrappedTxPool is a wrapped version of the Mempool component. WrappedTxPool *txpool.Mempool } -func (p *Polaris) Setup(bApp *baseapp.BaseApp) error { - // SetupPrecompiles is used to setup the precompile contracts post depinject. - if err := p.EVMKeeper.SetupPrecompiles(); err != nil { - return err +// ProvidePolarisRuntime creates a new Polaris runtime from the provided +// dependencies. +func New(cfg *config.Config, logger log.Logger, host core.PolarisHostChain) *Polaris { + node, err := polar.NewGethNetworkingStack(&cfg.Node) + if err != nil { + panic(err) } - // Init is used to setup the polaris struct. - if err := p.Polaris.Init(); err != nil { - return err + polaris := polar.NewWithNetworkingStack( + &cfg.Polar, host, node, LoggerFuncHandler(logger), + ) + + return &Polaris{ + Polaris: polaris, } +} - // Setup TxPool Wrapper +// Setup is a function that sets up the Polaris struct. +// It takes a BaseApp and an EVMKeeper as arguments. +// It returns an error if the setup fails. +func (p *Polaris) Setup(bApp *baseapp.BaseApp, ek EVMKeeper) error { p.WrappedTxPool = txpool.New(p.TxPool()) bApp.SetMempool(p.WrappedTxPool) p.WrappedMiner = miner.New(p.Miner()) bApp.SetPrepareProposal(p.WrappedMiner.PrepareProposal) - // TODO: deprecate this - p.EVMKeeper.SetBlockchain(p.Blockchain()) + if err := ek.Setup(p.Blockchain()); err != nil { + return err + } + + // Set the ante handler to nil, since it is not needed. + bApp.SetAnteHandler(nil) return nil } -func (p *Polaris) Init(clientCtx client.Context, logger log.Logger) error { +// Init is a function that initializes the Polaris struct. +// It takes a client context and a logger as arguments. +// It returns an error if the initialization fails. +func (p *Polaris) Init(clientCtx client.Context, logger log.Logger, ek EVMKeeper) error { // Initialize services. p.WrappedMiner.Init(libtx.NewSerializer[*engine.ExecutionPayloadEnvelope]( clientCtx.TxConfig, evmtypes.WrapPayload)) @@ -88,15 +114,16 @@ func (p *Polaris) Init(clientCtx client.Context, logger log.Logger) error { p.RegisterServices(clientCtx, []node.Lifecycle{ p.WrappedTxPool, }) + + // + ek.StartEnginePlugin(clientCtx) return nil } -// Register Services allows for the application to register lifecycles with the evm -// networking stack. -func (p *Polaris) RegisterServices(clientContext client.Context, lcs []node.Lifecycle) { - // TODO: probably get rid of engine plugin or something and handle rpc methods better. - p.EVMKeeper.Host.GetEnginePlugin().(enginep.Plugin).Start(clientContext) - +// RegisterServices is a function that allows for the application to register lifecycles with +// the evm networking stack. It takes a client context and a slice of node.Lifecycle +// as arguments. +func (p *Polaris) RegisterServices(_ client.Context, lcs []node.Lifecycle) { // Register the services with polaris. for _, lc := range lcs { p.RegisterService(lc) @@ -108,6 +135,9 @@ func (p *Polaris) RegisterServices(clientContext client.Context, lcs []node.Life } } +// LoadLastState is a function that loads the last state of the Polaris struct. +// It takes a CommitMultiStore and an appHeight as arguments. +// It returns an error if the loading fails. func (p *Polaris) LoadLastState(cms storetypes.CommitMultiStore, appHeight uint64) error { cmsCtx := sdk.Context{}. WithMultiStore(cms). diff --git a/cosmos/txpool/mocks/geth_tx_pool.go b/cosmos/txpool/mocks/geth_tx_pool.go index d07f24ab9..13e883702 100644 --- a/cosmos/txpool/mocks/geth_tx_pool.go +++ b/cosmos/txpool/mocks/geth_tx_pool.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.35.3. DO NOT EDIT. +// Code generated by mockery v2.35.4. DO NOT EDIT. package mocks diff --git a/cosmos/txpool/mocks/lifecycle.go b/cosmos/txpool/mocks/lifecycle.go index d298fc6ed..10149b667 100644 --- a/cosmos/txpool/mocks/lifecycle.go +++ b/cosmos/txpool/mocks/lifecycle.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.35.3. DO NOT EDIT. +// Code generated by mockery v2.35.4. DO NOT EDIT. package mocks diff --git a/cosmos/txpool/mocks/sdk_tx.go b/cosmos/txpool/mocks/sdk_tx.go index fb4978bad..7dada2b96 100644 --- a/cosmos/txpool/mocks/sdk_tx.go +++ b/cosmos/txpool/mocks/sdk_tx.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.35.3. DO NOT EDIT. +// Code generated by mockery v2.35.4. DO NOT EDIT. package mocks diff --git a/cosmos/txpool/mocks/subscription.go b/cosmos/txpool/mocks/subscription.go index 40e832bda..ce56bd877 100644 --- a/cosmos/txpool/mocks/subscription.go +++ b/cosmos/txpool/mocks/subscription.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.35.3. DO NOT EDIT. +// Code generated by mockery v2.35.4. DO NOT EDIT. package mocks diff --git a/cosmos/txpool/mocks/tx_broadcaster.go b/cosmos/txpool/mocks/tx_broadcaster.go index 005dac8dd..ad301bbf8 100644 --- a/cosmos/txpool/mocks/tx_broadcaster.go +++ b/cosmos/txpool/mocks/tx_broadcaster.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.35.3. DO NOT EDIT. +// Code generated by mockery v2.35.4. DO NOT EDIT. package mocks diff --git a/cosmos/txpool/mocks/tx_serializer.go b/cosmos/txpool/mocks/tx_serializer.go index 5d23bf571..5cf02ba74 100644 --- a/cosmos/txpool/mocks/tx_serializer.go +++ b/cosmos/txpool/mocks/tx_serializer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.35.3. DO NOT EDIT. +// Code generated by mockery v2.35.4. DO NOT EDIT. package mocks diff --git a/cosmos/txpool/mocks/tx_sub_provider.go b/cosmos/txpool/mocks/tx_sub_provider.go index 84c81460f..92f098976 100644 --- a/cosmos/txpool/mocks/tx_sub_provider.go +++ b/cosmos/txpool/mocks/tx_sub_provider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.35.3. DO NOT EDIT. +// Code generated by mockery v2.35.4. DO NOT EDIT. package mocks diff --git a/cosmos/x/evm/depinject.go b/cosmos/x/evm/depinject.go index 7f9da636b..dbee502d4 100644 --- a/cosmos/x/evm/depinject.go +++ b/cosmos/x/evm/depinject.go @@ -57,7 +57,6 @@ type DepInjectInput struct { QueryContextFn func() func(height int64, prove bool) (sdk.Context, error) AccountKeeper AccountKeeper - StakingKeeper StakingKeeper } // DepInjectOutput is the output for the dep inject framework. @@ -77,7 +76,6 @@ func ProvideModule(in DepInjectInput) DepInjectOutput { k := keeper.NewKeeper( in.AccountKeeper, - in.StakingKeeper, in.Key, in.CustomPrecompiles, in.QueryContextFn, diff --git a/cosmos/x/evm/genesis_test.go b/cosmos/x/evm/genesis_test.go index e0ce86b08..8f0157702 100644 --- a/cosmos/x/evm/genesis_test.go +++ b/cosmos/x/evm/genesis_test.go @@ -29,14 +29,11 @@ import ( "cosmossdk.io/log" - "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/ethereum/go-ethereum/consensus/beacon" "pkg.berachain.dev/polaris/cosmos/config" - "pkg.berachain.dev/polaris/cosmos/precompile/staking" testutil "pkg.berachain.dev/polaris/cosmos/testutil" "pkg.berachain.dev/polaris/cosmos/x/evm" "pkg.berachain.dev/polaris/cosmos/x/evm/keeper" @@ -60,29 +57,25 @@ func TestGenesis(t *testing.T) { var _ = Describe("", func() { var ( - cdc codec.JSONCodec ctx sdk.Context - sc ethprecompile.StatefulImpl ak state.AccountKeeper - sk stakingkeeper.Keeper k *keeper.Keeper am evm.AppModule err error ) BeforeEach(func() { - ctx, ak, _, sk = testutil.SetupMinimalKeepers(log.NewTestLogger(GinkgoT())) + ctx, ak, _, _ = testutil.SetupMinimalKeepers(log.NewTestLogger(GinkgoT())) ctx = ctx.WithBlockHeight(0) - sc = staking.NewPrecompileContract(ak, &sk) cfg := config.DefaultConfig() ethGen.Config = params.DefaultChainConfig cfg.Node.DataDir = GinkgoT().TempDir() cfg.Node.KeyStoreDir = GinkgoT().TempDir() k = keeper.NewKeeper( - ak, sk, + ak, testutil.EvmKey, func() *ethprecompile.Injector { - return ethprecompile.NewPrecompiles([]ethprecompile.Registrable{sc}...) + return ethprecompile.NewPrecompiles([]ethprecompile.Registrable{}...) }, func() func(height int64, prove bool) (sdk.Context, error) { return func(height int64, prove bool) (sdk.Context, error) { @@ -93,7 +86,7 @@ var _ = Describe("", func() { cfg, ) k.SetBlockchain( - core.NewChain(k.Host, beacon.NewFaker()), + core.NewChain(k.Host, params.DefaultChainConfig, beacon.NewFaker()), ) err = k.SetupPrecompiles() @@ -110,7 +103,7 @@ var _ = Describe("", func() { if err != nil { panic(err) } - am.InitGenesis(ctx, cdc, bz) + am.InitGenesis(ctx, nil, bz) }) When("the genesis is valid", func() { @@ -161,9 +154,9 @@ var _ = Describe("", func() { if err != nil { panic(err) } - am.InitGenesis(ctx, cdc, bz) + am.InitGenesis(ctx, nil, bz) - data := am.ExportGenesis(ctx, cdc) + data := am.ExportGenesis(ctx, nil) if data == nil { panic(fmt.Errorf("data is nil")) } diff --git a/cosmos/x/evm/interfaces.go b/cosmos/x/evm/interfaces.go index 8b47b0676..eb1c7a989 100644 --- a/cosmos/x/evm/interfaces.go +++ b/cosmos/x/evm/interfaces.go @@ -26,7 +26,6 @@ import ( addresscodec "cosmossdk.io/core/address" sdk "github.com/cosmos/cosmos-sdk/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) // AccountKeeper defines the expected account keeper. @@ -41,8 +40,3 @@ type AccountKeeper interface { RemoveAccount(ctx context.Context, account sdk.AccountI) IterateAccounts(ctx context.Context, cb func(account sdk.AccountI) bool) } - -type StakingKeeper interface { - GetValidatorByConsAddr(context.Context, sdk.ConsAddress) (stakingtypes.Validator, error) - ValidatorAddressCodec() addresscodec.Codec -} diff --git a/cosmos/x/evm/keeper/genesis.go b/cosmos/x/evm/keeper/genesis.go index cedf97f0a..1928a5205 100644 --- a/cosmos/x/evm/keeper/genesis.go +++ b/cosmos/x/evm/keeper/genesis.go @@ -31,7 +31,7 @@ import ( // InitGenesis is called during the InitGenesis. func (k *Keeper) InitGenesis(ctx sdk.Context, genState *core.Genesis) error { // TODO: Feels jank as fuck lol, but it works. - genState.Config = k.Host.GetConfigurationPlugin().ChainConfig() + genState.Config = k.chain.Config() // Initialize all the plugins. for _, plugin := range k.Host.GetAllPlugins() { diff --git a/cosmos/x/evm/keeper/host.go b/cosmos/x/evm/keeper/host.go index 3437b469c..997dbe50f 100644 --- a/cosmos/x/evm/keeper/host.go +++ b/cosmos/x/evm/keeper/host.go @@ -28,7 +28,6 @@ import ( "pkg.berachain.dev/polaris/cosmos/config" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/block" - "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/configuration" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/engine" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/historical" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/precompile" @@ -44,17 +43,13 @@ var _ core.PolarisHostChain = (*Host)(nil) type Host struct { // The various plugins that are are used to implement core.PolarisHostChain. bp block.Plugin - cp configuration.Plugin ep engine.Plugin hp historical.Plugin pp precompile.Plugin sp state.Plugin logger log.Logger - ak state.AccountKeeper - storeKey storetypes.StoreKey - pcs func() *ethprecompile.Injector - qc func() func(height int64, prove bool) (sdk.Context, error) + pcs func() *ethprecompile.Injector } // Newhost creates new instances of the plugin host. @@ -62,31 +57,24 @@ func NewHost( cfg config.Config, storeKey storetypes.StoreKey, ak state.AccountKeeper, - sk block.StakingKeeper, precompiles func() *ethprecompile.Injector, qc func() func(height int64, prove bool) (sdk.Context, error), logger log.Logger, ) *Host { // We setup the host with some Cosmos standard sauce. - h := &Host{} - - // Build the Plugins - h.bp = block.NewPlugin(storeKey, sk) - h.cp = configuration.NewPlugin(&cfg.Polar.Chain) - h.ep = engine.NewPlugin() - h.pcs = precompiles - h.storeKey = storeKey - h.ak = ak - h.qc = qc - h.logger = logger - - // Setup the state, precompile, historical, and txpool plugins - h.hp = historical.NewPlugin(h.cp, h.bp, nil, h.storeKey) - h.pp = precompile.NewPlugin() - h.sp = state.NewPlugin(h.ak, h.storeKey, nil) - h.bp.SetQueryContextFn(h.qc) - h.sp.SetQueryContextFn(h.qc) + h := &Host{ + bp: block.NewPlugin( + storeKey, qc, + ), + ep: engine.NewPlugin(), + pcs: precompiles, + pp: precompile.NewPlugin(), + sp: state.NewPlugin(ak, storeKey, qc, nil), + logger: logger, + } + // historical plugin requires block plugin. + h.hp = historical.NewPlugin(&cfg.Polar.Chain, h.bp, nil, storeKey) return h } @@ -108,15 +96,12 @@ func (h *Host) GetBlockPlugin() core.BlockPlugin { return h.bp } -// GetConfigurationPlugin returns the configuration plugin. -func (h *Host) GetConfigurationPlugin() core.ConfigurationPlugin { - return h.cp -} - // GetEnginePlugin returns the engine plugin. func (h *Host) GetEnginePlugin() core.EnginePlugin { return h.ep } + +// GetHistoricalPlugin returns the historical plugin. func (h *Host) GetHistoricalPlugin() core.HistoricalPlugin { return h.hp } @@ -133,5 +118,5 @@ func (h *Host) GetStatePlugin() core.StatePlugin { // GetAllPlugins returns all the plugins. func (h *Host) GetAllPlugins() []any { - return []any{h.bp, h.cp, h.hp, h.pp, h.sp} + return []any{h.bp, h.hp, h.pp, h.sp} } diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index 8823510a3..aee1c4d0a 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -26,18 +26,20 @@ import ( "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" "pkg.berachain.dev/polaris/cosmos/config" - "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/block" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state" "pkg.berachain.dev/polaris/cosmos/x/evm/types" "pkg.berachain.dev/polaris/eth/core" ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile" + "pkg.berachain.dev/polaris/eth/params" ) type Blockchain interface { PreparePlugins(context.Context) + Config() *params.ChainConfig core.ChainWriter core.ChainReader } @@ -56,7 +58,6 @@ type Keeper struct { // NewKeeper creates new instances of the polaris Keeper. func NewKeeper( ak state.AccountKeeper, - sk block.StakingKeeper, storeKey storetypes.StoreKey, pcs func() *ethprecompile.Injector, qc func() func(height int64, prove bool) (sdk.Context, error), @@ -67,7 +68,6 @@ func NewKeeper( *polarisCfg, storeKey, ak, - sk, pcs, qc, logger, @@ -78,6 +78,15 @@ func NewKeeper( } } +func (k *Keeper) Setup(chain Blockchain) error { + k.chain = chain + return k.SetupPrecompiles() +} + +func (k *Keeper) StartEnginePlugin(ctx client.Context) { + k.ep.Start(ctx) +} + // SetBlock sets the underlying ethereum blockchain on the keeper. func (k *Keeper) SetBlockchain(chain Blockchain) { k.chain = chain diff --git a/cosmos/x/evm/keeper/processor.go b/cosmos/x/evm/keeper/processor.go index 536454047..da949bc79 100644 --- a/cosmos/x/evm/keeper/processor.go +++ b/cosmos/x/evm/keeper/processor.go @@ -35,9 +35,11 @@ import ( func (k *Keeper) ProcessPayloadEnvelope( ctx context.Context, msg *evmtypes.WrappedPayloadEnvelope, ) (*evmtypes.WrappedPayloadEnvelopeResponse, error) { - var err error - var block *types.Block - + var ( + err error + block *types.Block + envelope engine.ExecutionPayloadEnvelope + ) // TODO: maybe we just consume the block gas limit and call it a day? sCtx := sdk.UnwrapSDKContext(ctx) gasMeter := sCtx.GasMeter() @@ -48,14 +50,11 @@ func (k *Keeper) ProcessPayloadEnvelope( blockGasMeter.RefundGas(blockGasMeter.GasConsumed(), "reset before evm block") defer gasMeter.ConsumeGas(gasMeter.GasConsumed(), "reset after evm") - envelope := engine.ExecutionPayloadEnvelope{} - err = envelope.UnmarshalJSON(msg.Data) - if err != nil { + if err = envelope.UnmarshalJSON(msg.Data); err != nil { return nil, fmt.Errorf("failed to unmarshal payload envelope: %w", err) } - block, err = engine.ExecutableDataToBlock(*envelope.ExecutionPayload, nil, nil) - if err != nil { + if block, err = engine.ExecutableDataToBlock(*envelope.ExecutionPayload, nil, nil); err != nil { k.Logger(sCtx).Error("failed to build evm block", "err", err) return nil, err } diff --git a/cosmos/x/evm/plugins/block/header.go b/cosmos/x/evm/plugins/block/header.go index 06a0f37b2..5a21b31e0 100644 --- a/cosmos/x/evm/plugins/block/header.go +++ b/cosmos/x/evm/plugins/block/header.go @@ -25,8 +25,6 @@ import ( "fmt" "math/big" - sdk "github.com/cosmos/cosmos-sdk/types" - "pkg.berachain.dev/polaris/cosmos/x/evm/types" "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core" @@ -37,15 +35,6 @@ import ( // prevHeaderHashes is the number of previous header hashes being stored on chain. const prevHeaderHashes = 256 -// =========================================================================== -// Polaris Block Header Tracking -// ===========================================================================. - -// SetQueryContextFn sets the query context func for the plugin. -func (p *plugin) SetQueryContextFn(fn func() func(height int64, prove bool) (sdk.Context, error)) { - p.getQueryContext = fn -} - // GetHeaderByNumber returns the header at the given height, using the plugin's query context. // // GetHeaderByNumber implements core.BlockPlugin. diff --git a/cosmos/x/evm/plugins/block/header_test.go b/cosmos/x/evm/plugins/block/header_test.go index 87212a5fd..6ea4cc17b 100644 --- a/cosmos/x/evm/plugins/block/header_test.go +++ b/cosmos/x/evm/plugins/block/header_test.go @@ -45,13 +45,11 @@ var _ = Describe("Header", func() { var p *plugin BeforeEach(func() { - _, _, _, sk := testutil.SetupMinimalKeepers(log.NewTestLogger(GinkgoT())) ctx = testutil.NewContext( log.NewTestLogger(GinkgoT())). WithBlockGasMeter(storetypes.NewGasMeter(uint64(10000))) - p = utils.MustGetAs[*plugin](NewPlugin(testutil.EvmKey, sk)) - p.SetQueryContextFn( - func() func(height int64, prove bool) (sdk.Context, error) { return mockQueryContext }) + p = utils.MustGetAs[*plugin](NewPlugin(testutil.EvmKey, + func() func(height int64, prove bool) (sdk.Context, error) { return mockQueryContext })) p.Prepare(ctx) // on block 0 (genesis) }) diff --git a/cosmos/x/evm/plugins/block/interfaces.go b/cosmos/x/evm/plugins/block/interfaces.go deleted file mode 100644 index de6e54412..000000000 --- a/cosmos/x/evm/plugins/block/interfaces.go +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package block - -import ( - "context" - - addresscodec "cosmossdk.io/core/address" - - sdk "github.com/cosmos/cosmos-sdk/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" -) - -type StakingKeeper interface { - GetValidatorByConsAddr(context.Context, sdk.ConsAddress) (stakingtypes.Validator, error) - ValidatorAddressCodec() addresscodec.Codec -} - -type Validator interface { - GetOperator() sdk.ValAddress // operator address to receive/return validators coins -} diff --git a/cosmos/x/evm/plugins/block/plugin.go b/cosmos/x/evm/plugins/block/plugin.go index f6984ea91..316dddc01 100644 --- a/cosmos/x/evm/plugins/block/plugin.go +++ b/cosmos/x/evm/plugins/block/plugin.go @@ -22,24 +22,18 @@ package block import ( "context" - "fmt" - "math/big" storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins" - "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core" ) type Plugin interface { plugins.HasGenesis core.BlockPlugin - - // SetQueryContextFn sets the function used for querying historical block headers. - SetQueryContextFn(fn func() func(height int64, prove bool) (sdk.Context, error)) } type plugin struct { @@ -49,14 +43,15 @@ type plugin struct { storekey storetypes.StoreKey // getQueryContext allows for querying block headers. getQueryContext func() func(height int64, prove bool) (sdk.Context, error) - // sk represents the cosmos staking keeper. - sk StakingKeeper } -func NewPlugin(storekey storetypes.StoreKey, sk StakingKeeper) Plugin { +func NewPlugin( + storekey storetypes.StoreKey, + qfn func() func(height int64, prove bool) (sdk.Context, error), +) Plugin { return &plugin{ - storekey: storekey, - sk: sk, + storekey: storekey, + getQueryContext: qfn, } } @@ -64,27 +59,3 @@ func NewPlugin(storekey storetypes.StoreKey, sk StakingKeeper) Plugin { func (p *plugin) Prepare(ctx context.Context) { p.ctx = sdk.UnwrapSDKContext(ctx) } - -// BaseFee implements core.BlockPlugin. -func (p *plugin) BaseFee() *big.Int { - return big.NewInt(-1) // we defer to polaris' built in eip-1559 for the base fee. -} - -// GetNewBlockMetadata returns the host chain block metadata for the given block height. It returns -// the coinbase address, the timestamp of the block. -func (p *plugin) GetNewBlockMetadata(number uint64) (common.Address, uint64) { - cometHeader := p.ctx.BlockHeader() - if uint64(cometHeader.Height) != number { - panic(fmt.Errorf("block height mismatch. got: %d, expected %d", cometHeader.Height, number)) - } - - val, err := p.sk.GetValidatorByConsAddr(p.ctx, cometHeader.ProposerAddress) - if err != nil { - panic(err) - } - valBz, err := p.sk.ValidatorAddressCodec().StringToBytes(val.GetOperator()) - if err != nil { - panic(err) - } - return common.BytesToAddress(valBz), uint64(cometHeader.Time.UTC().Unix()) -} diff --git a/cosmos/x/evm/plugins/configuration/plugin.go b/cosmos/x/evm/plugins/configuration/plugin.go deleted file mode 100644 index 5e34e8c08..000000000 --- a/cosmos/x/evm/plugins/configuration/plugin.go +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package configuration - -import ( - "context" - - "pkg.berachain.dev/polaris/eth/core" - "pkg.berachain.dev/polaris/eth/params" -) - -// Plugin is the interface that must be implemented by the plugin. -type Plugin interface { - core.ConfigurationPlugin -} - -// plugin implements the core.ConfigurationPlugin interface. -type plugin struct { - chainConfig *params.ChainConfig -} - -// NewPlugin returns a new plugin instance. -func NewPlugin(chainConfig *params.ChainConfig) Plugin { - return &plugin{ - chainConfig: chainConfig, - } -} - -func (p *plugin) Prepare(context.Context) { - // no-op -} - -// GetChainConfig is used to get the genesis info of the Ethereum chain. -func (p *plugin) ChainConfig() *params.ChainConfig { - return p.chainConfig -} diff --git a/cosmos/x/evm/plugins/historical/historical_data.go b/cosmos/x/evm/plugins/historical/historical_data.go index 53957fdd5..5854f2fe5 100644 --- a/cosmos/x/evm/plugins/historical/historical_data.go +++ b/cosmos/x/evm/plugins/historical/historical_data.go @@ -185,5 +185,5 @@ func (p *plugin) GetReceiptsByHash(blockHash common.Hash) (coretypes.Receipts, e return nil, err } - return coretypes.DeriveReceiptsFromBlock(p.cp.ChainConfig(), receipts, block) + return coretypes.DeriveReceiptsFromBlock(p.chainConfig, receipts, block) } diff --git a/cosmos/x/evm/plugins/historical/interfaces.go b/cosmos/x/evm/plugins/historical/interfaces.go deleted file mode 100644 index f4cdd4e37..000000000 --- a/cosmos/x/evm/plugins/historical/interfaces.go +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package historical - -type StakingKeeper interface { - // TODO: coinbase stuff -} diff --git a/cosmos/x/evm/plugins/historical/plugin.go b/cosmos/x/evm/plugins/historical/plugin.go index fdc32e26b..335c80017 100644 --- a/cosmos/x/evm/plugins/historical/plugin.go +++ b/cosmos/x/evm/plugins/historical/plugin.go @@ -29,6 +29,7 @@ import ( "pkg.berachain.dev/polaris/cosmos/x/evm/plugins" "pkg.berachain.dev/polaris/eth/core" + "pkg.berachain.dev/polaris/eth/params" ) // Plugin is the interface that must be implemented by the plugin. @@ -41,8 +42,8 @@ type Plugin interface { type plugin struct { // ctx is the current block context, used for accessing current block info and kv stores. ctx sdk.Context - // cp is used to get the current chain config. - cp core.ConfigurationPlugin + // chainConfig stores the chain configuration for the evm chain.make + chainConfig *params.ChainConfig // bp represents the block plugin, used for accessing historical block headers. bp core.BlockPlugin // storekey is the store key for the header store. @@ -51,13 +52,13 @@ type plugin struct { // NewPlugin creates a new instance of the block plugin from the given context. func NewPlugin( - cp core.ConfigurationPlugin, bp core.BlockPlugin, + chainConfig *params.ChainConfig, bp core.BlockPlugin, _ storetypes.StoreKey, storekey storetypes.StoreKey, ) Plugin { return &plugin{ - cp: cp, - bp: bp, - storeKey: storekey, + chainConfig: chainConfig, + bp: bp, + storeKey: storekey, } } diff --git a/cosmos/x/evm/plugins/historical/plugin_test.go b/cosmos/x/evm/plugins/historical/plugin_test.go index e6f52e89f..dd318558e 100644 --- a/cosmos/x/evm/plugins/historical/plugin_test.go +++ b/cosmos/x/evm/plugins/historical/plugin_test.go @@ -34,6 +34,7 @@ import ( "pkg.berachain.dev/polaris/eth/core" "pkg.berachain.dev/polaris/eth/core/mock" coretypes "pkg.berachain.dev/polaris/eth/core/types" + "pkg.berachain.dev/polaris/eth/params" "pkg.berachain.dev/polaris/lib/utils" . "github.com/onsi/ginkgo/v2" @@ -48,10 +49,9 @@ var _ = Describe("Historical Data", func() { BeforeEach(func() { ctx = testutil.NewContext(log.NewTestLogger(GinkgoT())).WithBlockHeight(0) - cp := mock.NewConfigurationPluginMock() bp := mock.NewBlockPluginMock() - p = utils.MustGetAs[*plugin](NewPlugin(cp, bp, nil, testutil.EvmKey)) + p = utils.MustGetAs[*plugin](NewPlugin(params.DefaultChainConfig, bp, nil, testutil.EvmKey)) Expect(p.InitGenesis(ctx, core.DefaultGenesis)).To(Succeed()) }) diff --git a/cosmos/x/evm/plugins/precompile/plugin_test.go b/cosmos/x/evm/plugins/precompile/plugin_test.go index 135be6f22..b848d8a1b 100644 --- a/cosmos/x/evm/plugins/precompile/plugin_test.go +++ b/cosmos/x/evm/plugins/precompile/plugin_test.go @@ -130,7 +130,7 @@ type mockSDB struct { func (ms *mockSDB) GetPlugin() ethstate.Plugin { return state.NewPlugin( - nil, nil, nil, + nil, nil, nil, nil, ) } diff --git a/cosmos/x/evm/plugins/state/genesis_test.go b/cosmos/x/evm/plugins/state/genesis_test.go index 81818fbeb..e7b7456b1 100644 --- a/cosmos/x/evm/plugins/state/genesis_test.go +++ b/cosmos/x/evm/plugins/state/genesis_test.go @@ -47,7 +47,7 @@ var _ = Describe("Genesis", func() { BeforeEach(func() { var ak state.AccountKeeper ctx, ak, _, _ = testutil.SetupMinimalKeepers(log.NewTestLogger(GinkgoT())) - sp = state.NewPlugin(ak, testutil.EvmKey, &mockPLF{}) + sp = state.NewPlugin(ak, testutil.EvmKey, nil, &mockPLF{}) // Create account for alice, bob acc := ak.NewAccountWithAddress(ctx, bob[:]) diff --git a/cosmos/x/evm/plugins/state/plugin.go b/cosmos/x/evm/plugins/state/plugin.go index 1ee99123f..8b1091294 100644 --- a/cosmos/x/evm/plugins/state/plugin.go +++ b/cosmos/x/evm/plugins/state/plugin.go @@ -55,8 +55,6 @@ var ( type Plugin interface { plugins.HasGenesis core.StatePlugin - // SetQueryContextFn sets the query context func for the plugin. - SetQueryContextFn(fn func() func(height int64, prove bool) (sdk.Context, error)) // IterateBalances iterates over the balances of all accounts and calls the callback function. IterateBalances(fn func(common.Address, *big.Int) bool) // IterateState iterates over the state of all accounts and calls the callback function. @@ -107,8 +105,8 @@ type plugin struct { // keepers used for balance and account information. ak AccountKeeper - // getQueryContext allows for querying state a historical height. - getQueryContext func() func(height int64, prove bool) (sdk.Context, error) + // qfn allows for querying state a historical height. + qfn func() func(height int64, prove bool) (sdk.Context, error) // dbErr stores any error that is returned from state modifications on the underlying // keepers. @@ -123,6 +121,7 @@ type plugin struct { func NewPlugin( ak AccountKeeper, storeKey storetypes.StoreKey, + qfn func() func(height int64, prove bool) (sdk.Context, error), plf events.PrecompileLogFactory, ) Plugin { return &plugin{ @@ -130,6 +129,7 @@ func NewPlugin( ak: ak, plf: plf, mu: sync.Mutex{}, + qfn: qfn, } } @@ -524,17 +524,12 @@ func (p *plugin) IterateBalances(fn func(common.Address, *big.Int) bool) { // Historical State // ============================================================================= -// SetQueryContextFn sets the query context func for the plugin. -func (p *plugin) SetQueryContextFn(fn func() func(height int64, prove bool) (sdk.Context, error)) { - p.getQueryContext = fn -} - // StateAtBlockNumber implements `core.StatePlugin`. func (p *plugin) StateAtBlockNumber(number uint64) (core.StatePlugin, error) { var ctx sdk.Context // Ensure the query context function is set. - if p.getQueryContext == nil { + if p.qfn == nil { return nil, errors.New("no query context function set in host chain") } @@ -551,14 +546,14 @@ func (p *plugin) StateAtBlockNumber(number uint64) (core.StatePlugin, error) { } else { // Get the query context at the given height. var err error - ctx, err = p.getQueryContext()(int64Number, false) + ctx, err = p.qfn()(int64Number, false) if err != nil { return nil, err } } // Create a State Plugin with the requested chain height. - sp := NewPlugin(p.ak, p.storeKey, p.plf) + sp := NewPlugin(p.ak, p.storeKey, p.qfn, p.plf) // TODO: Manager properly if p.latestState.MultiStore() != nil { sp.Reset(ctx) @@ -572,7 +567,7 @@ func (p *plugin) StateAtBlockNumber(number uint64) (core.StatePlugin, error) { // Clone implements libtypes.Cloneable. func (p *plugin) Clone() ethstate.Plugin { - sp := NewPlugin(p.ak, p.storeKey, p.plf) + sp := NewPlugin(p.ak, p.storeKey, p.qfn, p.plf) // TODO: Manager properly if p.ctx.MultiStore() != nil { cacheCtx, _ := p.ctx.CacheContext() diff --git a/cosmos/x/evm/plugins/state/plugin_benchmark_test.go b/cosmos/x/evm/plugins/state/plugin_benchmark_test.go index 1be40c1c2..0155a1994 100644 --- a/cosmos/x/evm/plugins/state/plugin_benchmark_test.go +++ b/cosmos/x/evm/plugins/state/plugin_benchmark_test.go @@ -40,7 +40,7 @@ var ( func GetNewStatePlugin() core.StatePlugin { ctx, ak, _, _ := testutil.SetupMinimalKeepers(log.NewTestLogger(&testing.B{})) - sp := state.NewPlugin(ak, testutil.EvmKey, nil) + sp := state.NewPlugin(ak, testutil.EvmKey, nil, nil) sp.Reset(ctx) return sp } diff --git a/cosmos/x/evm/plugins/state/plugin_test.go b/cosmos/x/evm/plugins/state/plugin_test.go index a506dcd65..2a80548e2 100644 --- a/cosmos/x/evm/plugins/state/plugin_test.go +++ b/cosmos/x/evm/plugins/state/plugin_test.go @@ -50,7 +50,7 @@ var _ = Describe("State Plugin", func() { BeforeEach(func() { ctx, ak, _, _ = testutil.SetupMinimalKeepers(log.NewTestLogger(GinkgoT())) - sp = state.NewPlugin(ak, testutil.EvmKey, &mockPLF{}) + sp = state.NewPlugin(ak, testutil.EvmKey, nil, &mockPLF{}) sp.Reset(ctx) }) diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index 9337c96a8..54ed11508 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -57,8 +57,19 @@ import ( evmconfig "pkg.berachain.dev/polaris/cosmos/config" signinglib "pkg.berachain.dev/polaris/cosmos/lib/signing" polarruntime "pkg.berachain.dev/polaris/cosmos/runtime" + evmkeeper "pkg.berachain.dev/polaris/cosmos/x/evm/keeper" ) +//nolint:gochecknoinits // from sdk. +func init() { + userHomeDir, err := os.UserHomeDir() + if err != nil { + panic(err) + } + + DefaultNodeHome = filepath.Join(userHomeDir, ".polard") +} + // DefaultNodeHome default home directories for the application daemon. var DefaultNodeHome string @@ -72,6 +83,7 @@ var ( // capabilities aren't needed for testing. type SimApp struct { *runtime.App + *polarruntime.Polaris legacyAmino *codec.LegacyAmino appCodec codec.Codec txConfig client.TxConfig @@ -90,19 +102,8 @@ type SimApp struct { EvidenceKeeper evidencekeeper.Keeper ConsensusParamsKeeper consensuskeeper.Keeper - // polaris contains all the required components for the - // polaris evm. - polaris *polarruntime.Polaris -} - -//nolint:gochecknoinits // from sdk. -func init() { - userHomeDir, err := os.UserHomeDir() - if err != nil { - panic(err) - } - - DefaultNodeHome = filepath.Join(userHomeDir, ".polard") + // polaris required keeper + EVMKeeper *evmkeeper.Keeper } // NewPolarisApp returns a reference to an initialized SimApp. @@ -118,7 +119,7 @@ func NewPolarisApp( baseAppOptions ...func(*baseapp.BaseApp), ) *SimApp { var ( - app = &SimApp{polaris: &polarruntime.Polaris{}} + app = &SimApp{} appBuilder *runtime.AppBuilder // merge the AppConfig and other configuration in one config appConfig = depinject.Configs( @@ -126,7 +127,6 @@ func NewPolarisApp( depinject.Provide( signinglib.ProvideNoopGetSigners[*evmv1alpha1.WrappedEthereumTransaction], signinglib.ProvideNoopGetSigners[*evmv1alpha1.WrappedPayloadEnvelope], - polarruntime.ProvidePolarisRuntime, ), depinject.Supply( // supply the application options @@ -178,23 +178,22 @@ func NewPolarisApp( &app.UpgradeKeeper, &app.EvidenceKeeper, &app.ConsensusParamsKeeper, - &app.polaris, - &app.polaris.EVMKeeper, + &app.EVMKeeper, ); err != nil { panic(err) } // Build the app using the app builder. app.App = appBuilder.Build(db, traceStore, baseAppOptions...) + app.Polaris = polarruntime.New( + evmconfig.MustReadConfigFromAppOpts(appOpts), app.Logger(), app.EVMKeeper.Host, + ) - // Initialize Polaris Runtime. - if err := app.polaris.Setup(app.BaseApp); err != nil { + // Setup Polaris Runtime. + if err := app.Polaris.Setup(app.BaseApp, app.EVMKeeper); err != nil { panic(err) } - // Set the ante handler to nil, since it is not needed. - app.SetAnteHandler(nil) - // register streaming services if err := app.RegisterStreamingServices(appOpts, app.kvStoreKeys()); err != nil { panic(err) @@ -212,7 +211,7 @@ func NewPolarisApp( } // Load the last state of the polaris evm. - if err := app.polaris.LoadLastState( + if err := app.Polaris.LoadLastState( app.CommitMultiStore(), uint64(app.LastBlockHeight()), ); err != nil { panic(err) @@ -259,14 +258,14 @@ func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICon panic(err) } - if err := app.polaris.Init(apiSvr.ClientCtx, app.Logger()); err != nil { + if err := app.Polaris.Init(apiSvr.ClientCtx, app.Logger(), app.EVMKeeper); err != nil { panic(err) } } // Close shuts down the application. func (app *SimApp) Close() error { - if pl := app.polaris; pl != nil { + if pl := app.Polaris; pl != nil { return pl.Close() } return app.BaseApp.Close() diff --git a/e2e/testapp/polard/cmd/root.go b/e2e/testapp/polard/cmd/root.go index 322878a9d..fa1f9a002 100644 --- a/e2e/testapp/polard/cmd/root.go +++ b/e2e/testapp/polard/cmd/root.go @@ -64,7 +64,6 @@ import ( evmv1alpha1 "pkg.berachain.dev/polaris/cosmos/api/polaris/evm/v1alpha1" evmconfig "pkg.berachain.dev/polaris/cosmos/config" signinglib "pkg.berachain.dev/polaris/cosmos/lib/signing" - polarruntime "pkg.berachain.dev/polaris/cosmos/runtime" testapp "pkg.berachain.dev/polaris/e2e/testapp" ) @@ -91,7 +90,6 @@ func NewRootCmd() *cobra.Command { simtestutil.NewAppOptionsWithFlagHome(tempDir()), ), depinject.Provide( - polarruntime.ProvidePolarisRuntime, signinglib.ProvideNoopGetSigners[*evmv1alpha1.WrappedEthereumTransaction], signinglib.ProvideNoopGetSigners[*evmv1alpha1.WrappedPayloadEnvelope]), ), diff --git a/eth/core/chain.go b/eth/core/chain.go index 5f7092858..c3e6f6807 100644 --- a/eth/core/chain.go +++ b/eth/core/chain.go @@ -46,9 +46,9 @@ const defaultCacheSize = 1024 // Compile-time check to ensure that `blockchain` implements the `Blockchain` api. var _ Blockchain = (*blockchain)(nil) +// Blockchain interface defines the methods that a blockchain must have. type Blockchain interface { PreparePlugins(ctx context.Context) - Config() *params.ChainConfig ChainReader ChainWriter ChainSubscriber @@ -60,7 +60,6 @@ type Blockchain interface { type blockchain struct { // the host chain plugins that the Polaris EVM is running on. bp BlockPlugin - cp ConfigurationPlugin hp HistoricalPlugin pp PrecompilePlugin sp StatePlugin @@ -73,6 +72,9 @@ type blockchain struct { // vmConfig is the configuration used to create the EVM. vmConfig *vm.Config + // config represents the chain config. + config *params.ChainConfig + // currentBlock is the current/pending block. currentBlock atomic.Pointer[types.Block] // finalizedBlock is the finalized/latest block. @@ -112,14 +114,14 @@ type blockchain struct { // NewChain creates and returns a `api.Chain` with the given EVM chain configuration and host. func NewChain( - host PolarisHostChain, engine consensus.Engine, + host PolarisHostChain, config *params.ChainConfig, engine consensus.Engine, ) *blockchain { //nolint:revive // only used as `api.Chain`. bc := &blockchain{ bp: host.GetBlockPlugin(), - cp: host.GetConfigurationPlugin(), hp: host.GetHistoricalPlugin(), pp: host.GetPrecompilePlugin(), sp: host.GetStatePlugin(), + config: config, vmConfig: &vm.Config{}, receiptsCache: lru.NewCache[common.Hash, types.Receipts](defaultCacheSize), blockNumCache: lru.NewCache[uint64, *types.Block](defaultCacheSize), @@ -131,7 +133,7 @@ func NewChain( engine: engine, } bc.statedb = state.NewStateDB(bc.sp, bc.pp) - bc.processor = core.NewStateProcessor(bc.cp.ChainConfig(), bc, bc.engine) + bc.processor = core.NewStateProcessor(bc.config, bc, bc.engine) // TODO: hmm... bc.currentBlock.Store( types.NewBlock(&types.Header{Time: 0, Number: big.NewInt(0), @@ -151,7 +153,6 @@ func (bc *blockchain) PreparePlugins(ctx context.Context) { bc.sp.Prepare(ctx) bc.sp.Reset(ctx) bc.bp.Prepare(ctx) - bc.cp.Prepare(ctx) if bc.hp != nil { bc.hp.Prepare(ctx) } @@ -159,7 +160,7 @@ func (bc *blockchain) PreparePlugins(ctx context.Context) { // ChainConfig returns the Ethereum chain config of the chain. func (bc *blockchain) Config() *params.ChainConfig { - return bc.cp.ChainConfig() + return bc.config } // loadLastState loads the last known chain state from the database. This method diff --git a/eth/core/chain_resources.go b/eth/core/chain_resources.go index 9627211b6..95b67cb42 100644 --- a/eth/core/chain_resources.go +++ b/eth/core/chain_resources.go @@ -26,6 +26,7 @@ import ( "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core/state" "pkg.berachain.dev/polaris/eth/core/vm" + "pkg.berachain.dev/polaris/eth/params" ) // ChainResources is the interface that defines functions for code paths within the chain to @@ -34,6 +35,7 @@ type ChainResources interface { StateAtBlockNumber(uint64) (state.StateDB, error) StateAt(root common.Hash) (state.StateDB, error) GetVMConfig() *vm.Config + Config() *params.ChainConfig } // StateAt returns a statedb configured to read what the state of the blockchain is/was at a given. diff --git a/eth/core/chain_writer.go b/eth/core/chain_writer.go index 1afa721e7..e96ae7b97 100644 --- a/eth/core/chain_writer.go +++ b/eth/core/chain_writer.go @@ -73,7 +73,7 @@ func (bc *blockchain) InsertBlock( var err error if _, err = bc.statedb.Commit( block.NumberU64(), - bc.cp.ChainConfig().IsEIP158(block.Header().Number), + bc.config.IsEIP158(block.Header().Number), ); err != nil { return err } diff --git a/eth/core/host.go b/eth/core/host.go index e17e432c1..395e69ad1 100644 --- a/eth/core/host.go +++ b/eth/core/host.go @@ -22,7 +22,6 @@ package core import ( "context" - "math/big" "github.com/ethereum/go-ethereum" @@ -30,7 +29,6 @@ import ( "pkg.berachain.dev/polaris/eth/core/precompile" "pkg.berachain.dev/polaris/eth/core/state" "pkg.berachain.dev/polaris/eth/core/types" - "pkg.berachain.dev/polaris/eth/params" libtypes "pkg.berachain.dev/polaris/lib/types" ) @@ -38,8 +36,6 @@ import ( type PolarisHostChain interface { // GetBlockPlugin returns the `BlockPlugin` of the Polaris host chain. GetBlockPlugin() BlockPlugin - // GetConfigurationPlugin returns the `ConfigurationPlugin` of the Polaris host chain. - GetConfigurationPlugin() ConfigurationPlugin // GetEnginePlugin() returns the `EnginePlugin` of the Polaris host chain. GetEnginePlugin() EnginePlugin // GetHistoricalPlugin returns the OPTIONAL `HistoricalPlugin` of the Polaris host chain. @@ -63,27 +59,12 @@ type ( // BlockPlugin implements `libtypes.Preparable`. Calling `Prepare` should reset the // BlockPlugin to a default state. libtypes.Preparable - // GetNewBlockMetadata returns a new block metadata (coinbase, timestamp) for the given - // block number. - GetNewBlockMetadata(uint64) (common.Address, uint64) // GetHeaderByNumber returns the block header at the given block number. GetHeaderByNumber(uint64) (*types.Header, error) // GetHeaderByHash returns the block header with the given block hash. GetHeaderByHash(common.Hash) (*types.Header, error) // StoreHeader stores the block header at the given block number. StoreHeader(*types.Header) error - // BaseFee returns the base fee of the current block. - BaseFee() *big.Int - } - - // ConfigurationPlugin defines the methods that the chain running Polaris EVM should - // implement in order to configuration the parameters of the Polaris EVM. - ConfigurationPlugin interface { - // ConfigurationPlugin implements `libtypes.Preparable`. Calling `Prepare` should reset - // the `ConfigurationPlugin` to a default state. - libtypes.Preparable - // ChainConfig returns the current chain configuration of the Polaris EVM. - ChainConfig() *params.ChainConfig } // EnginePlugin defines methods that allow the chain to have insight into the underlying diff --git a/eth/core/mock/block_plugin.mock.go b/eth/core/mock/block_plugin.mock.go index e421995fd..4f944abd3 100644 --- a/eth/core/mock/block_plugin.mock.go +++ b/eth/core/mock/block_plugin.mock.go @@ -7,7 +7,6 @@ import ( "context" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "math/big" "pkg.berachain.dev/polaris/eth/core" "sync" ) @@ -22,18 +21,12 @@ var _ core.BlockPlugin = &BlockPluginMock{} // // // make and configure a mocked core.BlockPlugin // mockedBlockPlugin := &BlockPluginMock{ -// BaseFeeFunc: func() *big.Int { -// panic("mock out the BaseFee method") -// }, // GetHeaderByHashFunc: func(hash common.Hash) (*types.Header, error) { // panic("mock out the GetHeaderByHash method") // }, // GetHeaderByNumberFunc: func(v uint64) (*types.Header, error) { // panic("mock out the GetHeaderByNumber method") // }, -// GetNewBlockMetadataFunc: func(v uint64) (common.Address, uint64) { -// panic("mock out the GetNewBlockMetadata method") -// }, // PrepareFunc: func(contextMoqParam context.Context) { // panic("mock out the Prepare method") // }, @@ -47,18 +40,12 @@ var _ core.BlockPlugin = &BlockPluginMock{} // // } type BlockPluginMock struct { - // BaseFeeFunc mocks the BaseFee method. - BaseFeeFunc func() *big.Int - // GetHeaderByHashFunc mocks the GetHeaderByHash method. GetHeaderByHashFunc func(hash common.Hash) (*types.Header, error) // GetHeaderByNumberFunc mocks the GetHeaderByNumber method. GetHeaderByNumberFunc func(v uint64) (*types.Header, error) - // GetNewBlockMetadataFunc mocks the GetNewBlockMetadata method. - GetNewBlockMetadataFunc func(v uint64) (common.Address, uint64) - // PrepareFunc mocks the Prepare method. PrepareFunc func(contextMoqParam context.Context) @@ -67,9 +54,6 @@ type BlockPluginMock struct { // calls tracks calls to the methods. calls struct { - // BaseFee holds details about calls to the BaseFee method. - BaseFee []struct { - } // GetHeaderByHash holds details about calls to the GetHeaderByHash method. GetHeaderByHash []struct { // Hash is the hash argument value. @@ -80,11 +64,6 @@ type BlockPluginMock struct { // V is the v argument value. V uint64 } - // GetNewBlockMetadata holds details about calls to the GetNewBlockMetadata method. - GetNewBlockMetadata []struct { - // V is the v argument value. - V uint64 - } // Prepare holds details about calls to the Prepare method. Prepare []struct { // ContextMoqParam is the contextMoqParam argument value. @@ -96,39 +75,10 @@ type BlockPluginMock struct { Header *types.Header } } - lockBaseFee sync.RWMutex - lockGetHeaderByHash sync.RWMutex - lockGetHeaderByNumber sync.RWMutex - lockGetNewBlockMetadata sync.RWMutex - lockPrepare sync.RWMutex - lockStoreHeader sync.RWMutex -} - -// BaseFee calls BaseFeeFunc. -func (mock *BlockPluginMock) BaseFee() *big.Int { - if mock.BaseFeeFunc == nil { - panic("BlockPluginMock.BaseFeeFunc: method is nil but BlockPlugin.BaseFee was just called") - } - callInfo := struct { - }{} - mock.lockBaseFee.Lock() - mock.calls.BaseFee = append(mock.calls.BaseFee, callInfo) - mock.lockBaseFee.Unlock() - return mock.BaseFeeFunc() -} - -// BaseFeeCalls gets all the calls that were made to BaseFee. -// Check the length with: -// -// len(mockedBlockPlugin.BaseFeeCalls()) -func (mock *BlockPluginMock) BaseFeeCalls() []struct { -} { - var calls []struct { - } - mock.lockBaseFee.RLock() - calls = mock.calls.BaseFee - mock.lockBaseFee.RUnlock() - return calls + lockGetHeaderByHash sync.RWMutex + lockGetHeaderByNumber sync.RWMutex + lockPrepare sync.RWMutex + lockStoreHeader sync.RWMutex } // GetHeaderByHash calls GetHeaderByHashFunc. @@ -195,38 +145,6 @@ func (mock *BlockPluginMock) GetHeaderByNumberCalls() []struct { return calls } -// GetNewBlockMetadata calls GetNewBlockMetadataFunc. -func (mock *BlockPluginMock) GetNewBlockMetadata(v uint64) (common.Address, uint64) { - if mock.GetNewBlockMetadataFunc == nil { - panic("BlockPluginMock.GetNewBlockMetadataFunc: method is nil but BlockPlugin.GetNewBlockMetadata was just called") - } - callInfo := struct { - V uint64 - }{ - V: v, - } - mock.lockGetNewBlockMetadata.Lock() - mock.calls.GetNewBlockMetadata = append(mock.calls.GetNewBlockMetadata, callInfo) - mock.lockGetNewBlockMetadata.Unlock() - return mock.GetNewBlockMetadataFunc(v) -} - -// GetNewBlockMetadataCalls gets all the calls that were made to GetNewBlockMetadata. -// Check the length with: -// -// len(mockedBlockPlugin.GetNewBlockMetadataCalls()) -func (mock *BlockPluginMock) GetNewBlockMetadataCalls() []struct { - V uint64 -} { - var calls []struct { - V uint64 - } - mock.lockGetNewBlockMetadata.RLock() - calls = mock.calls.GetNewBlockMetadata - mock.lockGetNewBlockMetadata.RUnlock() - return calls -} - // Prepare calls PrepareFunc. func (mock *BlockPluginMock) Prepare(contextMoqParam context.Context) { if mock.PrepareFunc == nil { diff --git a/eth/core/mock/config_plugin.mock.go b/eth/core/mock/config_plugin.mock.go deleted file mode 100644 index 40302b501..000000000 --- a/eth/core/mock/config_plugin.mock.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by moq; DO NOT EDIT. -// github.com/matryer/moq - -package mock - -import ( - "context" - "github.com/ethereum/go-ethereum/params" - "pkg.berachain.dev/polaris/eth/core" - "sync" -) - -// Ensure, that ConfigurationPluginMock does implement core.ConfigurationPlugin. -// If this is not the case, regenerate this file with moq. -var _ core.ConfigurationPlugin = &ConfigurationPluginMock{} - -// ConfigurationPluginMock is a mock implementation of core.ConfigurationPlugin. -// -// func TestSomethingThatUsesConfigurationPlugin(t *testing.T) { -// -// // make and configure a mocked core.ConfigurationPlugin -// mockedConfigurationPlugin := &ConfigurationPluginMock{ -// ChainConfigFunc: func() *params.ChainConfig { -// panic("mock out the ChainConfig method") -// }, -// PrepareFunc: func(contextMoqParam context.Context) { -// panic("mock out the Prepare method") -// }, -// } -// -// // use mockedConfigurationPlugin in code that requires core.ConfigurationPlugin -// // and then make assertions. -// -// } -type ConfigurationPluginMock struct { - // ChainConfigFunc mocks the ChainConfig method. - ChainConfigFunc func() *params.ChainConfig - - // PrepareFunc mocks the Prepare method. - PrepareFunc func(contextMoqParam context.Context) - - // calls tracks calls to the methods. - calls struct { - // ChainConfig holds details about calls to the ChainConfig method. - ChainConfig []struct { - } - // Prepare holds details about calls to the Prepare method. - Prepare []struct { - // ContextMoqParam is the contextMoqParam argument value. - ContextMoqParam context.Context - } - } - lockChainConfig sync.RWMutex - lockPrepare sync.RWMutex -} - -// ChainConfig calls ChainConfigFunc. -func (mock *ConfigurationPluginMock) ChainConfig() *params.ChainConfig { - if mock.ChainConfigFunc == nil { - panic("ConfigurationPluginMock.ChainConfigFunc: method is nil but ConfigurationPlugin.ChainConfig was just called") - } - callInfo := struct { - }{} - mock.lockChainConfig.Lock() - mock.calls.ChainConfig = append(mock.calls.ChainConfig, callInfo) - mock.lockChainConfig.Unlock() - return mock.ChainConfigFunc() -} - -// ChainConfigCalls gets all the calls that were made to ChainConfig. -// Check the length with: -// -// len(mockedConfigurationPlugin.ChainConfigCalls()) -func (mock *ConfigurationPluginMock) ChainConfigCalls() []struct { -} { - var calls []struct { - } - mock.lockChainConfig.RLock() - calls = mock.calls.ChainConfig - mock.lockChainConfig.RUnlock() - return calls -} - -// Prepare calls PrepareFunc. -func (mock *ConfigurationPluginMock) Prepare(contextMoqParam context.Context) { - if mock.PrepareFunc == nil { - panic("ConfigurationPluginMock.PrepareFunc: method is nil but ConfigurationPlugin.Prepare was just called") - } - callInfo := struct { - ContextMoqParam context.Context - }{ - ContextMoqParam: contextMoqParam, - } - mock.lockPrepare.Lock() - mock.calls.Prepare = append(mock.calls.Prepare, callInfo) - mock.lockPrepare.Unlock() - mock.PrepareFunc(contextMoqParam) -} - -// PrepareCalls gets all the calls that were made to Prepare. -// Check the length with: -// -// len(mockedConfigurationPlugin.PrepareCalls()) -func (mock *ConfigurationPluginMock) PrepareCalls() []struct { - ContextMoqParam context.Context -} { - var calls []struct { - ContextMoqParam context.Context - } - mock.lockPrepare.RLock() - calls = mock.calls.Prepare - mock.lockPrepare.RUnlock() - return calls -} diff --git a/eth/core/mock/host.go b/eth/core/mock/host.go deleted file mode 100644 index bd22be85f..000000000 --- a/eth/core/mock/host.go +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package mock - -import "pkg.berachain.dev/polaris/eth/core" - -//go:generate moq -out ./host.mock.go -pkg mock ../ PolarisHostChain - -func NewMockHostAndPlugins() ( - *PolarisHostChainMock, *BlockPluginMock, *ConfigurationPluginMock, - *HistoricalPluginMock, *PrecompilePluginMock, *StatePluginMock, -) { - bp := NewBlockPluginMock() - cp := NewConfigurationPluginMock() - hp := NewHistoricalPluginMock() - pp := NewPrecompilePluginMock() - sp := NewStatePluginMock() - mockedPolarisHostChain := &PolarisHostChainMock{ - GetBlockPluginFunc: func() core.BlockPlugin { - return bp - }, - GetConfigurationPluginFunc: func() core.ConfigurationPlugin { - return cp - }, - GetHistoricalPluginFunc: func() core.HistoricalPlugin { - return hp - }, - GetPrecompilePluginFunc: func() core.PrecompilePlugin { - return pp - }, - GetStatePluginFunc: func() core.StatePlugin { - return sp - }, - } - return mockedPolarisHostChain, bp, cp, hp, pp, sp -} diff --git a/eth/core/mock/host.mock.go b/eth/core/mock/host.mock.go deleted file mode 100644 index da08fdf97..000000000 --- a/eth/core/mock/host.mock.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by moq; DO NOT EDIT. -// github.com/matryer/moq - -package mock - -import ( - "pkg.berachain.dev/polaris/eth/core" - "pkg.berachain.dev/polaris/eth/core/precompile" - "sync" -) - -// Ensure, that PolarisHostChainMock does implement core.PolarisHostChain. -// If this is not the case, regenerate this file with moq. -var _ core.PolarisHostChain = &PolarisHostChainMock{} - -// PolarisHostChainMock is a mock implementation of core.PolarisHostChain. -// -// func TestSomethingThatUsesPolarisHostChain(t *testing.T) { -// -// // make and configure a mocked core.PolarisHostChain -// mockedPolarisHostChain := &PolarisHostChainMock{ -// GetBlockPluginFunc: func() core.BlockPlugin { -// panic("mock out the GetBlockPlugin method") -// }, -// GetConfigurationPluginFunc: func() core.ConfigurationPlugin { -// panic("mock out the GetConfigurationPlugin method") -// }, -// GetEnginePluginFunc: func() core.EnginePlugin { -// panic("mock out the GetEnginePlugin method") -// }, -// GetHistoricalPluginFunc: func() core.HistoricalPlugin { -// panic("mock out the GetHistoricalPlugin method") -// }, -// GetPrecompilePluginFunc: func() precompile.Plugin { -// panic("mock out the GetPrecompilePlugin method") -// }, -// GetStatePluginFunc: func() core.StatePlugin { -// panic("mock out the GetStatePlugin method") -// }, -// } -// -// // use mockedPolarisHostChain in code that requires core.PolarisHostChain -// // and then make assertions. -// -// } -type PolarisHostChainMock struct { - // GetBlockPluginFunc mocks the GetBlockPlugin method. - GetBlockPluginFunc func() core.BlockPlugin - - // GetConfigurationPluginFunc mocks the GetConfigurationPlugin method. - GetConfigurationPluginFunc func() core.ConfigurationPlugin - - // GetEnginePluginFunc mocks the GetEnginePlugin method. - GetEnginePluginFunc func() core.EnginePlugin - - // GetHistoricalPluginFunc mocks the GetHistoricalPlugin method. - GetHistoricalPluginFunc func() core.HistoricalPlugin - - // GetPrecompilePluginFunc mocks the GetPrecompilePlugin method. - GetPrecompilePluginFunc func() precompile.Plugin - - // GetStatePluginFunc mocks the GetStatePlugin method. - GetStatePluginFunc func() core.StatePlugin - - // calls tracks calls to the methods. - calls struct { - // GetBlockPlugin holds details about calls to the GetBlockPlugin method. - GetBlockPlugin []struct { - } - // GetConfigurationPlugin holds details about calls to the GetConfigurationPlugin method. - GetConfigurationPlugin []struct { - } - // GetEnginePlugin holds details about calls to the GetEnginePlugin method. - GetEnginePlugin []struct { - } - // GetHistoricalPlugin holds details about calls to the GetHistoricalPlugin method. - GetHistoricalPlugin []struct { - } - // GetPrecompilePlugin holds details about calls to the GetPrecompilePlugin method. - GetPrecompilePlugin []struct { - } - // GetStatePlugin holds details about calls to the GetStatePlugin method. - GetStatePlugin []struct { - } - } - lockGetBlockPlugin sync.RWMutex - lockGetConfigurationPlugin sync.RWMutex - lockGetEnginePlugin sync.RWMutex - lockGetHistoricalPlugin sync.RWMutex - lockGetPrecompilePlugin sync.RWMutex - lockGetStatePlugin sync.RWMutex -} - -// GetBlockPlugin calls GetBlockPluginFunc. -func (mock *PolarisHostChainMock) GetBlockPlugin() core.BlockPlugin { - if mock.GetBlockPluginFunc == nil { - panic("PolarisHostChainMock.GetBlockPluginFunc: method is nil but PolarisHostChain.GetBlockPlugin was just called") - } - callInfo := struct { - }{} - mock.lockGetBlockPlugin.Lock() - mock.calls.GetBlockPlugin = append(mock.calls.GetBlockPlugin, callInfo) - mock.lockGetBlockPlugin.Unlock() - return mock.GetBlockPluginFunc() -} - -// GetBlockPluginCalls gets all the calls that were made to GetBlockPlugin. -// Check the length with: -// -// len(mockedPolarisHostChain.GetBlockPluginCalls()) -func (mock *PolarisHostChainMock) GetBlockPluginCalls() []struct { -} { - var calls []struct { - } - mock.lockGetBlockPlugin.RLock() - calls = mock.calls.GetBlockPlugin - mock.lockGetBlockPlugin.RUnlock() - return calls -} - -// GetConfigurationPlugin calls GetConfigurationPluginFunc. -func (mock *PolarisHostChainMock) GetConfigurationPlugin() core.ConfigurationPlugin { - if mock.GetConfigurationPluginFunc == nil { - panic("PolarisHostChainMock.GetConfigurationPluginFunc: method is nil but PolarisHostChain.GetConfigurationPlugin was just called") - } - callInfo := struct { - }{} - mock.lockGetConfigurationPlugin.Lock() - mock.calls.GetConfigurationPlugin = append(mock.calls.GetConfigurationPlugin, callInfo) - mock.lockGetConfigurationPlugin.Unlock() - return mock.GetConfigurationPluginFunc() -} - -// GetConfigurationPluginCalls gets all the calls that were made to GetConfigurationPlugin. -// Check the length with: -// -// len(mockedPolarisHostChain.GetConfigurationPluginCalls()) -func (mock *PolarisHostChainMock) GetConfigurationPluginCalls() []struct { -} { - var calls []struct { - } - mock.lockGetConfigurationPlugin.RLock() - calls = mock.calls.GetConfigurationPlugin - mock.lockGetConfigurationPlugin.RUnlock() - return calls -} - -// GetEnginePlugin calls GetEnginePluginFunc. -func (mock *PolarisHostChainMock) GetEnginePlugin() core.EnginePlugin { - if mock.GetEnginePluginFunc == nil { - panic("PolarisHostChainMock.GetEnginePluginFunc: method is nil but PolarisHostChain.GetEnginePlugin was just called") - } - callInfo := struct { - }{} - mock.lockGetEnginePlugin.Lock() - mock.calls.GetEnginePlugin = append(mock.calls.GetEnginePlugin, callInfo) - mock.lockGetEnginePlugin.Unlock() - return mock.GetEnginePluginFunc() -} - -// GetEnginePluginCalls gets all the calls that were made to GetEnginePlugin. -// Check the length with: -// -// len(mockedPolarisHostChain.GetEnginePluginCalls()) -func (mock *PolarisHostChainMock) GetEnginePluginCalls() []struct { -} { - var calls []struct { - } - mock.lockGetEnginePlugin.RLock() - calls = mock.calls.GetEnginePlugin - mock.lockGetEnginePlugin.RUnlock() - return calls -} - -// GetHistoricalPlugin calls GetHistoricalPluginFunc. -func (mock *PolarisHostChainMock) GetHistoricalPlugin() core.HistoricalPlugin { - if mock.GetHistoricalPluginFunc == nil { - panic("PolarisHostChainMock.GetHistoricalPluginFunc: method is nil but PolarisHostChain.GetHistoricalPlugin was just called") - } - callInfo := struct { - }{} - mock.lockGetHistoricalPlugin.Lock() - mock.calls.GetHistoricalPlugin = append(mock.calls.GetHistoricalPlugin, callInfo) - mock.lockGetHistoricalPlugin.Unlock() - return mock.GetHistoricalPluginFunc() -} - -// GetHistoricalPluginCalls gets all the calls that were made to GetHistoricalPlugin. -// Check the length with: -// -// len(mockedPolarisHostChain.GetHistoricalPluginCalls()) -func (mock *PolarisHostChainMock) GetHistoricalPluginCalls() []struct { -} { - var calls []struct { - } - mock.lockGetHistoricalPlugin.RLock() - calls = mock.calls.GetHistoricalPlugin - mock.lockGetHistoricalPlugin.RUnlock() - return calls -} - -// GetPrecompilePlugin calls GetPrecompilePluginFunc. -func (mock *PolarisHostChainMock) GetPrecompilePlugin() precompile.Plugin { - if mock.GetPrecompilePluginFunc == nil { - panic("PolarisHostChainMock.GetPrecompilePluginFunc: method is nil but PolarisHostChain.GetPrecompilePlugin was just called") - } - callInfo := struct { - }{} - mock.lockGetPrecompilePlugin.Lock() - mock.calls.GetPrecompilePlugin = append(mock.calls.GetPrecompilePlugin, callInfo) - mock.lockGetPrecompilePlugin.Unlock() - return mock.GetPrecompilePluginFunc() -} - -// GetPrecompilePluginCalls gets all the calls that were made to GetPrecompilePlugin. -// Check the length with: -// -// len(mockedPolarisHostChain.GetPrecompilePluginCalls()) -func (mock *PolarisHostChainMock) GetPrecompilePluginCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPrecompilePlugin.RLock() - calls = mock.calls.GetPrecompilePlugin - mock.lockGetPrecompilePlugin.RUnlock() - return calls -} - -// GetStatePlugin calls GetStatePluginFunc. -func (mock *PolarisHostChainMock) GetStatePlugin() core.StatePlugin { - if mock.GetStatePluginFunc == nil { - panic("PolarisHostChainMock.GetStatePluginFunc: method is nil but PolarisHostChain.GetStatePlugin was just called") - } - callInfo := struct { - }{} - mock.lockGetStatePlugin.Lock() - mock.calls.GetStatePlugin = append(mock.calls.GetStatePlugin, callInfo) - mock.lockGetStatePlugin.Unlock() - return mock.GetStatePluginFunc() -} - -// GetStatePluginCalls gets all the calls that were made to GetStatePlugin. -// Check the length with: -// -// len(mockedPolarisHostChain.GetStatePluginCalls()) -func (mock *PolarisHostChainMock) GetStatePluginCalls() []struct { -} { - var calls []struct { - } - mock.lockGetStatePlugin.RLock() - calls = mock.calls.GetStatePlugin - mock.lockGetStatePlugin.RUnlock() - return calls -} diff --git a/eth/core/state/journal/mocks/accesslist.go b/eth/core/state/journal/mocks/accesslist.go index 0ecc9f0b1..7ed5837f9 100644 --- a/eth/core/state/journal/mocks/accesslist.go +++ b/eth/core/state/journal/mocks/accesslist.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.35.3. DO NOT EDIT. +// Code generated by mockery v2.35.4. DO NOT EDIT. package mocks diff --git a/eth/core/state/journal/mocks/log.go b/eth/core/state/journal/mocks/log.go index 005d3584a..709639650 100644 --- a/eth/core/state/journal/mocks/log.go +++ b/eth/core/state/journal/mocks/log.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.35.3. DO NOT EDIT. +// Code generated by mockery v2.35.4. DO NOT EDIT. package mocks diff --git a/eth/core/state/journal/mocks/refund.go b/eth/core/state/journal/mocks/refund.go index 1f4aa681e..d8cb61ad8 100644 --- a/eth/core/state/journal/mocks/refund.go +++ b/eth/core/state/journal/mocks/refund.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.35.3. DO NOT EDIT. +// Code generated by mockery v2.35.4. DO NOT EDIT. package mocks diff --git a/eth/core/state/journal/mocks/self_destruct_state_plugin.go b/eth/core/state/journal/mocks/self_destruct_state_plugin.go index 038ead225..59d14f165 100644 --- a/eth/core/state/journal/mocks/self_destruct_state_plugin.go +++ b/eth/core/state/journal/mocks/self_destruct_state_plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.35.3. DO NOT EDIT. +// Code generated by mockery v2.35.4. DO NOT EDIT. package mocks diff --git a/eth/core/state/journal/mocks/self_destructs.go b/eth/core/state/journal/mocks/self_destructs.go index 64f0e7bc9..b38c383a8 100644 --- a/eth/core/state/journal/mocks/self_destructs.go +++ b/eth/core/state/journal/mocks/self_destructs.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.35.3. DO NOT EDIT. +// Code generated by mockery v2.35.4. DO NOT EDIT. package mocks diff --git a/eth/core/state/journal/mocks/transient_storage.go b/eth/core/state/journal/mocks/transient_storage.go index 27dde8ee5..c3e3bda1e 100644 --- a/eth/core/state/journal/mocks/transient_storage.go +++ b/eth/core/state/journal/mocks/transient_storage.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.35.3. DO NOT EDIT. +// Code generated by mockery v2.35.4. DO NOT EDIT. package mocks diff --git a/eth/core/state/mocks/plugin.go b/eth/core/state/mocks/plugin.go index efc5426ea..c624b3d00 100644 --- a/eth/core/state/mocks/plugin.go +++ b/eth/core/state/mocks/plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.35.3. DO NOT EDIT. +// Code generated by mockery v2.35.4. DO NOT EDIT. package mocks diff --git a/eth/core/state/mocks/polar_state_db.go b/eth/core/state/mocks/polar_state_db.go index 7171448e2..8383e6889 100644 --- a/eth/core/state/mocks/polar_state_db.go +++ b/eth/core/state/mocks/polar_state_db.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.35.3. DO NOT EDIT. +// Code generated by mockery v2.35.4. DO NOT EDIT. package mocks diff --git a/eth/core/state/mocks/precompile_plugin.go b/eth/core/state/mocks/precompile_plugin.go index 71b4b7ea1..b066d0422 100644 --- a/eth/core/state/mocks/precompile_plugin.go +++ b/eth/core/state/mocks/precompile_plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.35.3. DO NOT EDIT. +// Code generated by mockery v2.35.4. DO NOT EDIT. package mocks diff --git a/eth/core/types/transaction.rlpgen.go b/eth/core/types/transaction.rlpgen.go index c335ec137..5006261ca 100644 --- a/eth/core/types/transaction.rlpgen.go +++ b/eth/core/types/transaction.rlpgen.go @@ -1,8 +1,5 @@ // Code generated by rlpgen. DO NOT EDIT. -//go:build !norlpgen -// +build !norlpgen - package types import "github.com/ethereum/go-ethereum/common" diff --git a/eth/crypto/imported.go b/eth/crypto/imported.go index fb327ca94..8d1009768 100644 --- a/eth/crypto/imported.go +++ b/eth/crypto/imported.go @@ -25,23 +25,15 @@ import ( ) var ( - SigToPub = crypto.SigToPub - Ecrecover = crypto.Ecrecover - CreateAddress = crypto.CreateAddress - UnmarshalPubkey = crypto.UnmarshalPubkey - CompressPubkey = crypto.CompressPubkey - DecompressPubkey = crypto.DecompressPubkey - DigestLength = crypto.DigestLength - EthSign = crypto.Sign - LoadECDSA = crypto.LoadECDSA - FromECDSA = crypto.FromECDSA - GenerateEthKey = crypto.GenerateKey - ValidateSignatureValues = crypto.ValidateSignatureValues - Keccak256 = crypto.Keccak256 - Keccak256Hash = crypto.Keccak256Hash - PubkeyToAddress = crypto.PubkeyToAddress - SignatureLength = crypto.SignatureLength - ToECDSA = crypto.ToECDSA - VerifySignature = crypto.VerifySignature - FromECDSAPub = crypto.FromECDSAPub + // GenerateEthKey is a function that generates a new Ethereum key. + GenerateEthKey = crypto.GenerateKey + // Keccak256 is a function that computes and returns the Keccak256 hash of the input data. + Keccak256 = crypto.Keccak256 + // Keccak256Hash is a function that computes and returns the Keccak256 hash of the input data, + // but the return type is Hash. + Keccak256Hash = crypto.Keccak256Hash + // PubkeyToAddress is a function that derives the Ethereum address from the given public key. + PubkeyToAddress = crypto.PubkeyToAddress + // LoadECDSA is a function that loads a private key from a given file. + LoadECDSA = crypto.LoadECDSA ) diff --git a/eth/params/imported.go b/eth/params/imported.go index 30b029768..ad3d10f97 100644 --- a/eth/params/imported.go +++ b/eth/params/imported.go @@ -30,9 +30,6 @@ type ( ) var ( - // BloomBitsBlocks is the number of blocks a single bloom bit section vector - // contains on the server side. - BloomBitsBlocks = params.BloomBitsBlocks // VersionWithMeta holds the textual version string including the metadata. VersionWithMeta = params.VersionWithMeta // VersionWithCommit holds the textual version string including the commit hash. diff --git a/eth/polar/backend.go b/eth/polar/backend.go index cf9f3ff05..61c141213 100644 --- a/eth/polar/backend.go +++ b/eth/polar/backend.go @@ -109,7 +109,7 @@ func NewWithNetworkingStack( engine := beacon.New(&consensus.DummyEthOne{}) pl := &Polaris{ config: config, - blockchain: core.NewChain(host, engine), + blockchain: core.NewChain(host, &config.Chain, engine), stack: stack, host: host, enginePlugin: host.GetEnginePlugin(), @@ -128,13 +128,6 @@ func NewWithNetworkingStack( pl.backend = NewBackend(pl, pl.config) - return pl -} - -// Init initializes the Polaris struct. -func (pl *Polaris) Init() error { - var err error - // Run safety message for feedback to the user if they are running // with development configs. pl.config.SafetyMessage() @@ -145,27 +138,21 @@ func (pl *Polaris) Init() error { ) // Setup the transaction pool and attach the legacyPool. + var err error if pl.txPool, err = txpool.New( new(big.Int).SetUint64(pl.config.LegacyTxPool.PriceLimit), pl.blockchain, []txpool.SubPool{legacyPool}, ); err != nil { - return err + panic(err) } mux := new(event.TypeMux) //nolint:staticcheck // deprecated but still in geth. // TODO: miner config to app.toml pl.miner = miner.New(pl, &pl.config.Miner, - pl.host.GetConfigurationPlugin().ChainConfig(), mux, pl.engine, pl.isLocalBlock) - // extra data must be nil until 1 block 1 transaction. - // eth.miner.SetExtra(makeExtraData(config.Miner.ExtraData)) - // Build and set the RPC Backend and other services. - - // if pl.APIBackend.allowUnprotectedTxs { - // log.Info("Unprotected transactions allowed") - // } + &pl.config.Chain, mux, pl.engine, pl.isLocalBlock) - return nil + return pl } // APIs return the collection of RPC services the polar package offers.