diff --git a/CHANGELOG.md b/CHANGELOG.md index e9d5bb793..6861c98a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,14 +67,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#2145](https://github.com/NibiruChain/nibiru/pull/2145) - chore(token-registry): add xNIBI Astrovault LST to registry - [#2147](https://github.com/NibiruChain/nibiru/pull/2147) - fix(simapp): manually add x/vesting Cosmos-SDK module types to the codec in simulation tests since they are expected by default - [#2149](https://github.com/NibiruChain/nibiru/pull/2149) - feat(evm-oracle): -add Solidity contract that we can use to expose the Nibiru Oracle in the -ChainLink interface. Publish all precompiled contracts and ABIs on npm under -the `@nibiruchain/solidity` package. + add Solidity contract that we can use to expose the Nibiru Oracle in the + ChainLink interface. Publish all precompiled contracts and ABIs on npm under + the `@nibiruchain/solidity` package. - [#2151](https://github.com/NibiruChain/nibiru/pull/2151) - feat(evm): randao support for evm - [#2152](https://github.com/NibiruChain/nibiru/pull/2152) - fix(precompile): consume gas for precompile calls regardless of error - [#2154](https://github.com/NibiruChain/nibiru/pull/2154) - fix(evm): -JSON encoding for the `EIP55Addr` struct was not following the Go conventions and -needed to include double quotes around the hexadecimal string. + JSON encoding for the `EIP55Addr` struct was not following the Go conventions and + needed to include double quotes around the hexadecimal string. - [#2156](https://github.com/NibiruChain/nibiru/pull/2156) - test(evm-e2e): add E2E test using the Nibiru Oracle's ChainLink impl - [#2157](https://github.com/NibiruChain/nibiru/pull/2157) - fix(evm): Fix unit inconsistency related to AuthInfo.Fee and txData.Fee using effective fee - [#2159](https://github.com/NibiruChain/nibiru/pull/2159) - chore(evm): Augment the Wasm msg handler so that wasm contracts cannot send MsgEthereumTx @@ -93,7 +93,9 @@ needed to include double quotes around the hexadecimal string. - [#2180](https://github.com/NibiruChain/nibiru/pull/2180) - fix(evm): apply gas consumption across the entire EVM codebase at `CallContractWithInput` - [#2183](https://github.com/NibiruChain/nibiru/pull/2183) - fix(evm): bank keeper extension gas meter type - [#2184](https://github.com/NibiruChain/nibiru/pull/2184) - test(evm): e2e tests configuration enhancements -- +- [#2150](https://github.com/NibiruChain/nibiru/pull/2150) - feat(evm): prevent funtoken from erc20 contract to be created with non-complete contracts +- + #### Nibiru EVM | Before Audit 2 - 2024-12-06 The codebase went through a third-party [Code4rena diff --git a/eth/rpc/backend/backend_suite_test.go b/eth/rpc/backend/backend_suite_test.go index dec06920f..eeb3c2b18 100644 --- a/eth/rpc/backend/backend_suite_test.go +++ b/eth/rpc/backend/backend_suite_test.go @@ -177,7 +177,7 @@ func SendTransaction(s *BackendSuite, tx *gethcore.LegacyTx, waitForNextBlock bo // WaitForReceipt waits for a transaction to be included in a block, returns block number, block hash and receipt func WaitForReceipt(s *BackendSuite, txHash gethcommon.Hash) (*big.Int, *gethcommon.Hash, *backend.TransactionReceipt) { - ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) + ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() for { diff --git a/eth/rpc/backend/gas_used_test.go b/eth/rpc/backend/gas_used_test.go index 8362d599f..92895bfab 100644 --- a/eth/rpc/backend/gas_used_test.go +++ b/eth/rpc/backend/gas_used_test.go @@ -84,7 +84,7 @@ func (s *BackendSuite) TestGasUsedFunTokens() { FromErc20: &erc20Addr, }) s.Require().NoError(err) - s.Require().NotNil(txResp) + s.Require().NotNil(txResp) // This is no guarantee that tx was included in the block s.Require().NoError(s.network.WaitForNextBlock()) randomNibiAddress := testutil.AccAddress() @@ -103,7 +103,7 @@ func (s *BackendSuite) TestGasUsedFunTokens() { Nonce: nonce, To: &precompile.PrecompileAddr_FunToken, Data: packedArgsPass, - Gas: 1_500_000, + Gas: 3_500_000, GasPrice: big.NewInt(1), }, false, diff --git a/eth/rpc/backend/tx_logs_test.go b/eth/rpc/backend/tx_logs_test.go index 6bd1132cf..4558f55ae 100644 --- a/eth/rpc/backend/tx_logs_test.go +++ b/eth/rpc/backend/tx_logs_test.go @@ -106,7 +106,7 @@ func (s *BackendSuite) TestLogs() { Nonce: s.getCurrentNonce(s.fundedAccEthAddr), To: &precompile.PrecompileAddr_FunToken, Data: packedArgsPass, - Gas: 1_500_000, + Gas: 2_500_000, GasPrice: big.NewInt(1), }, false, diff --git a/evm-e2e/contracts/TestERC20.sol b/evm-e2e/contracts/TestERC20.sol index bea532843..fdc768846 100644 --- a/evm-e2e/contracts/TestERC20.sol +++ b/evm-e2e/contracts/TestERC20.sol @@ -2,15 +2,18 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol'; contract TestERC20 is ERC20 { + // Define the supply of TestERC20: 1,000,000 + uint256 constant initialSupply = 1000000 * (10 ** 18); - // Define the supply of TestERC20: 1,000,000 - uint256 constant initialSupply = 1000000 * (10**18); + // Constructor will be called on contract creation + constructor() ERC20('TestERC20', 'FOO') { + _mint(msg.sender, initialSupply); + } - // Constructor will be called on contract creation - constructor() ERC20("TestERC20", "FOO") { - _mint(msg.sender, initialSupply); - } + function mint(address to, uint256 amount) public { + _mint(to, amount); + } } diff --git a/x/common/testutil/testnetwork/tx.go b/x/common/testutil/testnetwork/tx.go index 279381a2a..6ddd853b2 100644 --- a/x/common/testutil/testnetwork/tx.go +++ b/x/common/testutil/testnetwork/tx.go @@ -143,8 +143,8 @@ func (chain *Network) BroadcastMsgs( return nil, err } - txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(cfg.BondDenom, math.NewInt(1000)))) - txBuilder.SetGasLimit(uint64(10 * common.TO_MICRO)) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(cfg.BondDenom, math.NewInt(100_000)))) + txBuilder.SetGasLimit(uint64(1_000 * common.TO_MICRO)) acc, err := cfg.AccountRetriever.GetAccount(chain.Validators[0].ClientCtx, from) if err != nil { diff --git a/x/evm/embeds/abi/DSAuth.json b/x/evm/embeds/abi/DSAuth.json new file mode 100644 index 000000000..b189824ea --- /dev/null +++ b/x/evm/embeds/abi/DSAuth.json @@ -0,0 +1,88 @@ +[ + { + "constant": false, + "inputs": [ + { + "name": "owner_", + "type": "address" + } + ], + "name": "setOwner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "authority_", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "authority", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "authority", + "type": "address" + } + ], + "name": "LogSetAuthority", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + } + ], + "name": "LogSetOwner", + "type": "event" + } +] \ No newline at end of file diff --git a/x/evm/embeds/abi/DSAuthEvents.json b/x/evm/embeds/abi/DSAuthEvents.json new file mode 100644 index 000000000..4aad801f0 --- /dev/null +++ b/x/evm/embeds/abi/DSAuthEvents.json @@ -0,0 +1,26 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "authority", + "type": "address" + } + ], + "name": "LogSetAuthority", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + } + ], + "name": "LogSetOwner", + "type": "event" + } +] \ No newline at end of file diff --git a/x/evm/embeds/abi/DSAuthority.json b/x/evm/embeds/abi/DSAuthority.json new file mode 100644 index 000000000..02117b2de --- /dev/null +++ b/x/evm/embeds/abi/DSAuthority.json @@ -0,0 +1,29 @@ +[ + { + "constant": true, + "inputs": [ + { + "name": "src", + "type": "address" + }, + { + "name": "dst", + "type": "address" + }, + { + "name": "sig", + "type": "bytes4" + } + ], + "name": "canCall", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/x/evm/embeds/abi/DSMath.json b/x/evm/embeds/abi/DSMath.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/x/evm/embeds/abi/DSMath.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/x/evm/embeds/abi/DSNote.json b/x/evm/embeds/abi/DSNote.json new file mode 100644 index 000000000..7d2994fc4 --- /dev/null +++ b/x/evm/embeds/abi/DSNote.json @@ -0,0 +1,39 @@ +[ + { + "anonymous": true, + "inputs": [ + { + "indexed": true, + "name": "sig", + "type": "bytes4" + }, + { + "indexed": true, + "name": "guy", + "type": "address" + }, + { + "indexed": true, + "name": "foo", + "type": "bytes32" + }, + { + "indexed": true, + "name": "bar", + "type": "bytes32" + }, + { + "indexed": false, + "name": "wad", + "type": "uint256" + }, + { + "indexed": false, + "name": "fax", + "type": "bytes" + } + ], + "name": "LogNote", + "type": "event" + } +] \ No newline at end of file diff --git a/x/evm/embeds/abi/DSStop.json b/x/evm/embeds/abi/DSStop.json new file mode 100644 index 000000000..c353a5fe4 --- /dev/null +++ b/x/evm/embeds/abi/DSStop.json @@ -0,0 +1,151 @@ +[ + { + "constant": false, + "inputs": [], + "name": "stop", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "owner_", + "type": "address" + } + ], + "name": "setOwner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "stopped", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "authority_", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "start", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "authority", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "authority", + "type": "address" + } + ], + "name": "LogSetAuthority", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + } + ], + "name": "LogSetOwner", + "type": "event" + }, + { + "anonymous": true, + "inputs": [ + { + "indexed": true, + "name": "sig", + "type": "bytes4" + }, + { + "indexed": true, + "name": "guy", + "type": "address" + }, + { + "indexed": true, + "name": "foo", + "type": "bytes32" + }, + { + "indexed": true, + "name": "bar", + "type": "bytes32" + }, + { + "indexed": false, + "name": "wad", + "type": "uint256" + }, + { + "indexed": false, + "name": "fax", + "type": "bytes" + } + ], + "name": "LogNote", + "type": "event" + } +] \ No newline at end of file diff --git a/x/evm/embeds/abi/DSThing.json b/x/evm/embeds/abi/DSThing.json new file mode 100644 index 000000000..eea62d4f0 --- /dev/null +++ b/x/evm/embeds/abi/DSThing.json @@ -0,0 +1,119 @@ +[ + { + "constant": false, + "inputs": [ + { + "name": "owner_", + "type": "address" + } + ], + "name": "setOwner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "authority_", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "authority", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": true, + "inputs": [ + { + "indexed": true, + "name": "sig", + "type": "bytes4" + }, + { + "indexed": true, + "name": "guy", + "type": "address" + }, + { + "indexed": true, + "name": "foo", + "type": "bytes32" + }, + { + "indexed": true, + "name": "bar", + "type": "bytes32" + }, + { + "indexed": false, + "name": "wad", + "type": "uint256" + }, + { + "indexed": false, + "name": "fax", + "type": "bytes" + } + ], + "name": "LogNote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "authority", + "type": "address" + } + ], + "name": "LogSetAuthority", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + } + ], + "name": "LogSetOwner", + "type": "event" + } +] \ No newline at end of file diff --git a/x/evm/embeds/abi/DSToken.json b/x/evm/embeds/abi/DSToken.json new file mode 100644 index 000000000..b5181d280 --- /dev/null +++ b/x/evm/embeds/abi/DSToken.json @@ -0,0 +1,566 @@ +[ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "stop", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "guy", + "type": "address" + }, + { + "name": "wad", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "owner_", + "type": "address" + } + ], + "name": "setOwner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "src", + "type": "address" + }, + { + "name": "dst", + "type": "address" + }, + { + "name": "wad", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "guy", + "type": "address" + }, + { + "name": "wad", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "wad", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "name_", + "type": "bytes32" + } + ], + "name": "setName", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "src", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "stopped", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "authority_", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "guy", + "type": "address" + }, + { + "name": "wad", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "wad", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "dst", + "type": "address" + }, + { + "name": "wad", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "dst", + "type": "address" + }, + { + "name": "wad", + "type": "uint256" + } + ], + "name": "push", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "src", + "type": "address" + }, + { + "name": "dst", + "type": "address" + }, + { + "name": "wad", + "type": "uint256" + } + ], + "name": "move", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "start", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "authority", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "guy", + "type": "address" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "src", + "type": "address" + }, + { + "name": "guy", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "src", + "type": "address" + }, + { + "name": "wad", + "type": "uint256" + } + ], + "name": "pull", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "symbol_", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "guy", + "type": "address" + }, + { + "indexed": false, + "name": "wad", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "guy", + "type": "address" + }, + { + "indexed": false, + "name": "wad", + "type": "uint256" + } + ], + "name": "Burn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "authority", + "type": "address" + } + ], + "name": "LogSetAuthority", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + } + ], + "name": "LogSetOwner", + "type": "event" + }, + { + "anonymous": true, + "inputs": [ + { + "indexed": true, + "name": "sig", + "type": "bytes4" + }, + { + "indexed": true, + "name": "guy", + "type": "address" + }, + { + "indexed": true, + "name": "foo", + "type": "bytes32" + }, + { + "indexed": true, + "name": "bar", + "type": "bytes32" + }, + { + "indexed": false, + "name": "wad", + "type": "uint256" + }, + { + "indexed": false, + "name": "fax", + "type": "bytes" + } + ], + "name": "LogNote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } +] \ No newline at end of file diff --git a/x/evm/embeds/abi/DSTokenBase.json b/x/evm/embeds/abi/DSTokenBase.json new file mode 100644 index 000000000..de6c77c76 --- /dev/null +++ b/x/evm/embeds/abi/DSTokenBase.json @@ -0,0 +1,186 @@ +[ + { + "constant": false, + "inputs": [ + { + "name": "guy", + "type": "address" + }, + { + "name": "wad", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "src", + "type": "address" + }, + { + "name": "dst", + "type": "address" + }, + { + "name": "wad", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "src", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "dst", + "type": "address" + }, + { + "name": "wad", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "src", + "type": "address" + }, + { + "name": "guy", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "supply", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } +] \ No newline at end of file diff --git a/x/evm/embeds/abi/ERC20.json b/x/evm/embeds/abi/ERC20.json new file mode 100644 index 000000000..5362c73fc --- /dev/null +++ b/x/evm/embeds/abi/ERC20.json @@ -0,0 +1,175 @@ +[ + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "ok", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "supply", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "ok", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "value", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "ok", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "_allowance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } +] \ No newline at end of file diff --git a/x/evm/embeds/artifacts/contracts/TestERC20.sol/TestERC20.json b/x/evm/embeds/artifacts/contracts/TestERC20.sol/TestERC20.json index a1e9d4222..52f4e01f1 100644 --- a/x/evm/embeds/artifacts/contracts/TestERC20.sol/TestERC20.json +++ b/x/evm/embeds/artifacts/contracts/TestERC20.sol/TestERC20.json @@ -279,8 +279,8 @@ "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b506040518060400160405280600981526020017f54657374455243323000000000000000000000000000000000000000000000008152506040518060400160405280600381526020017f464f4f000000000000000000000000000000000000000000000000000000000081525081600390816200008f9190620004b7565b508060049081620000a19190620004b7565b505050620000c03369d3c21bcecceda1000000620000c660201b60201c565b620006b9565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160362000138576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200012f90620005ff565b60405180910390fd5b6200014c600083836200023360201b60201c565b806002600082825462000160919062000650565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200021391906200069c565b60405180910390a36200022f600083836200023860201b60201c565b5050565b505050565b505050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620002bf57607f821691505b602082108103620002d557620002d462000277565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200033f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000300565b6200034b868362000300565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b600062000398620003926200038c8462000363565b6200036d565b62000363565b9050919050565b6000819050919050565b620003b48362000377565b620003cc620003c3826200039f565b8484546200030d565b825550505050565b600090565b620003e3620003d4565b620003f0818484620003a9565b505050565b5b8181101562000418576200040c600082620003d9565b600181019050620003f6565b5050565b601f82111562000467576200043181620002db565b6200043c84620002f0565b810160208510156200044c578190505b620004646200045b85620002f0565b830182620003f5565b50505b505050565b600082821c905092915050565b60006200048c600019846008026200046c565b1980831691505092915050565b6000620004a7838362000479565b9150826002028217905092915050565b620004c2826200023d565b67ffffffffffffffff811115620004de57620004dd62000248565b5b620004ea8254620002a6565b620004f78282856200041c565b600060209050601f8311600181146200052f57600084156200051a578287015190505b62000526858262000499565b86555062000596565b601f1984166200053f86620002db565b60005b82811015620005695784890151825560018201915060208501945060208101905062000542565b8683101562000589578489015162000585601f89168262000479565b8355505b6001600288020188555050505b505050505050565b600082825260208201905092915050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000620005e7601f836200059e565b9150620005f482620005af565b602082019050919050565b600060208201905081810360008301526200061a81620005d8565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006200065d8262000363565b91506200066a8362000363565b925082820190508082111562000685576200068462000621565b5b92915050565b620006968162000363565b82525050565b6000602082019050620006b360008301846200068b565b92915050565b61122f80620006c96000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b0c565b60405180910390f35b6100e660048036038101906100e19190610bc7565b610308565b6040516100f39190610c22565b60405180910390f35b61010461032b565b6040516101119190610c4c565b60405180910390f35b610134600480360381019061012f9190610c67565b610335565b6040516101419190610c22565b60405180910390f35b610152610364565b60405161015f9190610cd6565b60405180910390f35b610182600480360381019061017d9190610bc7565b61036d565b60405161018f9190610c22565b60405180910390f35b6101b260048036038101906101ad9190610cf1565b6103a4565b6040516101bf9190610c4c565b60405180910390f35b6101d06103ec565b6040516101dd9190610b0c565b60405180910390f35b61020060048036038101906101fb9190610bc7565b61047e565b60405161020d9190610c22565b60405180910390f35b610230600480360381019061022b9190610bc7565b6104f5565b60405161023d9190610c22565b60405180910390f35b610260600480360381019061025b9190610d1e565b610518565b60405161026d9190610c4c565b60405180910390f35b60606003805461028590610d8d565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610d8d565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610770565b6103588585856107fc565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610ded565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610d8d565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610d8d565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e93565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fc565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060d90610f25565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067c90610fb7565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107639190610c4c565b60405180910390a3505050565b600061077c8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f657818110156107e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107df90611023565b60405180910390fd5b6107f584848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361086b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610862906110b5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d190611147565b60405180910390fd5b6108e5838383610a72565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610962906111d9565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a599190610c4c565b60405180910390a3610a6c848484610a77565b50505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610ab6578082015181840152602081019050610a9b565b60008484015250505050565b6000601f19601f8301169050919050565b6000610ade82610a7c565b610ae88185610a87565b9350610af8818560208601610a98565b610b0181610ac2565b840191505092915050565b60006020820190508181036000830152610b268184610ad3565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610b5e82610b33565b9050919050565b610b6e81610b53565b8114610b7957600080fd5b50565b600081359050610b8b81610b65565b92915050565b6000819050919050565b610ba481610b91565b8114610baf57600080fd5b50565b600081359050610bc181610b9b565b92915050565b60008060408385031215610bde57610bdd610b2e565b5b6000610bec85828601610b7c565b9250506020610bfd85828601610bb2565b9150509250929050565b60008115159050919050565b610c1c81610c07565b82525050565b6000602082019050610c376000830184610c13565b92915050565b610c4681610b91565b82525050565b6000602082019050610c616000830184610c3d565b92915050565b600080600060608486031215610c8057610c7f610b2e565b5b6000610c8e86828701610b7c565b9350506020610c9f86828701610b7c565b9250506040610cb086828701610bb2565b9150509250925092565b600060ff82169050919050565b610cd081610cba565b82525050565b6000602082019050610ceb6000830184610cc7565b92915050565b600060208284031215610d0757610d06610b2e565b5b6000610d1584828501610b7c565b91505092915050565b60008060408385031215610d3557610d34610b2e565b5b6000610d4385828601610b7c565b9250506020610d5485828601610b7c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610da557607f821691505b602082108103610db857610db7610d5e565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610df882610b91565b9150610e0383610b91565b9250828201905080821115610e1b57610e1a610dbe565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610e7d602583610a87565b9150610e8882610e21565b604082019050919050565b60006020820190508181036000830152610eac81610e70565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000610f0f602483610a87565b9150610f1a82610eb3565b604082019050919050565b60006020820190508181036000830152610f3e81610f02565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000610fa1602283610a87565b9150610fac82610f45565b604082019050919050565b60006020820190508181036000830152610fd081610f94565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061100d601d83610a87565b915061101882610fd7565b602082019050919050565b6000602082019050818103600083015261103c81611000565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061109f602583610a87565b91506110aa82611043565b604082019050919050565b600060208201905081810360008301526110ce81611092565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611131602383610a87565b915061113c826110d5565b604082019050919050565b6000602082019050818103600083015261116081611124565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006111c3602683610a87565b91506111ce82611167565b604082019050919050565b600060208201905081810360008301526111f2816111b6565b905091905056fea26469706673582212209daf0c2b0a4ff52e932f2c8ac4b752a1b3d828de9c9661a370cb5d05214e85b664736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b0c565b60405180910390f35b6100e660048036038101906100e19190610bc7565b610308565b6040516100f39190610c22565b60405180910390f35b61010461032b565b6040516101119190610c4c565b60405180910390f35b610134600480360381019061012f9190610c67565b610335565b6040516101419190610c22565b60405180910390f35b610152610364565b60405161015f9190610cd6565b60405180910390f35b610182600480360381019061017d9190610bc7565b61036d565b60405161018f9190610c22565b60405180910390f35b6101b260048036038101906101ad9190610cf1565b6103a4565b6040516101bf9190610c4c565b60405180910390f35b6101d06103ec565b6040516101dd9190610b0c565b60405180910390f35b61020060048036038101906101fb9190610bc7565b61047e565b60405161020d9190610c22565b60405180910390f35b610230600480360381019061022b9190610bc7565b6104f5565b60405161023d9190610c22565b60405180910390f35b610260600480360381019061025b9190610d1e565b610518565b60405161026d9190610c4c565b60405180910390f35b60606003805461028590610d8d565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610d8d565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610770565b6103588585856107fc565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610ded565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610d8d565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610d8d565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e93565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fc565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060d90610f25565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067c90610fb7565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107639190610c4c565b60405180910390a3505050565b600061077c8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f657818110156107e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107df90611023565b60405180910390fd5b6107f584848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361086b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610862906110b5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d190611147565b60405180910390fd5b6108e5838383610a72565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610962906111d9565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a599190610c4c565b60405180910390a3610a6c848484610a77565b50505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610ab6578082015181840152602081019050610a9b565b60008484015250505050565b6000601f19601f8301169050919050565b6000610ade82610a7c565b610ae88185610a87565b9350610af8818560208601610a98565b610b0181610ac2565b840191505092915050565b60006020820190508181036000830152610b268184610ad3565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610b5e82610b33565b9050919050565b610b6e81610b53565b8114610b7957600080fd5b50565b600081359050610b8b81610b65565b92915050565b6000819050919050565b610ba481610b91565b8114610baf57600080fd5b50565b600081359050610bc181610b9b565b92915050565b60008060408385031215610bde57610bdd610b2e565b5b6000610bec85828601610b7c565b9250506020610bfd85828601610bb2565b9150509250929050565b60008115159050919050565b610c1c81610c07565b82525050565b6000602082019050610c376000830184610c13565b92915050565b610c4681610b91565b82525050565b6000602082019050610c616000830184610c3d565b92915050565b600080600060608486031215610c8057610c7f610b2e565b5b6000610c8e86828701610b7c565b9350506020610c9f86828701610b7c565b9250506040610cb086828701610bb2565b9150509250925092565b600060ff82169050919050565b610cd081610cba565b82525050565b6000602082019050610ceb6000830184610cc7565b92915050565b600060208284031215610d0757610d06610b2e565b5b6000610d1584828501610b7c565b91505092915050565b60008060408385031215610d3557610d34610b2e565b5b6000610d4385828601610b7c565b9250506020610d5485828601610b7c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610da557607f821691505b602082108103610db857610db7610d5e565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610df882610b91565b9150610e0383610b91565b9250828201905080821115610e1b57610e1a610dbe565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610e7d602583610a87565b9150610e8882610e21565b604082019050919050565b60006020820190508181036000830152610eac81610e70565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000610f0f602483610a87565b9150610f1a82610eb3565b604082019050919050565b60006020820190508181036000830152610f3e81610f02565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000610fa1602283610a87565b9150610fac82610f45565b604082019050919050565b60006020820190508181036000830152610fd081610f94565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061100d601d83610a87565b915061101882610fd7565b602082019050919050565b6000602082019050818103600083015261103c81611000565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061109f602583610a87565b91506110aa82611043565b604082019050919050565b600060208201905081810360008301526110ce81611092565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611131602383610a87565b915061113c826110d5565b604082019050919050565b6000602082019050818103600083015261116081611124565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006111c3602683610a87565b91506111ce82611167565b604082019050919050565b600060208201905081810360008301526111f2816111b6565b905091905056fea26469706673582212209daf0c2b0a4ff52e932f2c8ac4b752a1b3d828de9c9661a370cb5d05214e85b664736f6c63430008180033", + "bytecode": "0x60806040523480156200001157600080fd5b506040518060400160405280600981526020017f54657374455243323000000000000000000000000000000000000000000000008152506040518060400160405280600381526020017f464f4f000000000000000000000000000000000000000000000000000000000081525081600390816200008f9190620004b7565b508060049081620000a19190620004b7565b505050620000c03369d3c21bcecceda1000000620000c660201b60201c565b620006b9565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160362000138576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200012f90620005ff565b60405180910390fd5b6200014c600083836200023360201b60201c565b806002600082825462000160919062000650565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200021391906200069c565b60405180910390a36200022f600083836200023860201b60201c565b5050565b505050565b505050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620002bf57607f821691505b602082108103620002d557620002d462000277565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200033f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000300565b6200034b868362000300565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b600062000398620003926200038c8462000363565b6200036d565b62000363565b9050919050565b6000819050919050565b620003b48362000377565b620003cc620003c3826200039f565b8484546200030d565b825550505050565b600090565b620003e3620003d4565b620003f0818484620003a9565b505050565b5b8181101562000418576200040c600082620003d9565b600181019050620003f6565b5050565b601f82111562000467576200043181620002db565b6200043c84620002f0565b810160208510156200044c578190505b620004646200045b85620002f0565b830182620003f5565b50505b505050565b600082821c905092915050565b60006200048c600019846008026200046c565b1980831691505092915050565b6000620004a7838362000479565b9150826002028217905092915050565b620004c2826200023d565b67ffffffffffffffff811115620004de57620004dd62000248565b5b620004ea8254620002a6565b620004f78282856200041c565b600060209050601f8311600181146200052f57600084156200051a578287015190505b62000526858262000499565b86555062000596565b601f1984166200053f86620002db565b60005b82811015620005695784890151825560018201915060208501945060208101905062000542565b8683101562000589578489015162000585601f89168262000479565b8355505b6001600288020188555050505b505050505050565b600082825260208201905092915050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000620005e7601f836200059e565b9150620005f482620005af565b602082019050919050565b600060208201905081810360008301526200061a81620005d8565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006200065d8262000363565b91506200066a8362000363565b925082820190508082111562000685576200068462000621565b5b92915050565b620006968162000363565b82525050565b6000602082019050620006b360008301846200068b565b92915050565b61122f80620006c96000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b0c565b60405180910390f35b6100e660048036038101906100e19190610bc7565b610308565b6040516100f39190610c22565b60405180910390f35b61010461032b565b6040516101119190610c4c565b60405180910390f35b610134600480360381019061012f9190610c67565b610335565b6040516101419190610c22565b60405180910390f35b610152610364565b60405161015f9190610cd6565b60405180910390f35b610182600480360381019061017d9190610bc7565b61036d565b60405161018f9190610c22565b60405180910390f35b6101b260048036038101906101ad9190610cf1565b6103a4565b6040516101bf9190610c4c565b60405180910390f35b6101d06103ec565b6040516101dd9190610b0c565b60405180910390f35b61020060048036038101906101fb9190610bc7565b61047e565b60405161020d9190610c22565b60405180910390f35b610230600480360381019061022b9190610bc7565b6104f5565b60405161023d9190610c22565b60405180910390f35b610260600480360381019061025b9190610d1e565b610518565b60405161026d9190610c4c565b60405180910390f35b60606003805461028590610d8d565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610d8d565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610770565b6103588585856107fc565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610ded565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610d8d565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610d8d565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e93565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fc565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060d90610f25565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067c90610fb7565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107639190610c4c565b60405180910390a3505050565b600061077c8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f657818110156107e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107df90611023565b60405180910390fd5b6107f584848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361086b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610862906110b5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d190611147565b60405180910390fd5b6108e5838383610a72565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610962906111d9565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a599190610c4c565b60405180910390a3610a6c848484610a77565b50505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610ab6578082015181840152602081019050610a9b565b60008484015250505050565b6000601f19601f8301169050919050565b6000610ade82610a7c565b610ae88185610a87565b9350610af8818560208601610a98565b610b0181610ac2565b840191505092915050565b60006020820190508181036000830152610b268184610ad3565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610b5e82610b33565b9050919050565b610b6e81610b53565b8114610b7957600080fd5b50565b600081359050610b8b81610b65565b92915050565b6000819050919050565b610ba481610b91565b8114610baf57600080fd5b50565b600081359050610bc181610b9b565b92915050565b60008060408385031215610bde57610bdd610b2e565b5b6000610bec85828601610b7c565b9250506020610bfd85828601610bb2565b9150509250929050565b60008115159050919050565b610c1c81610c07565b82525050565b6000602082019050610c376000830184610c13565b92915050565b610c4681610b91565b82525050565b6000602082019050610c616000830184610c3d565b92915050565b600080600060608486031215610c8057610c7f610b2e565b5b6000610c8e86828701610b7c565b9350506020610c9f86828701610b7c565b9250506040610cb086828701610bb2565b9150509250925092565b600060ff82169050919050565b610cd081610cba565b82525050565b6000602082019050610ceb6000830184610cc7565b92915050565b600060208284031215610d0757610d06610b2e565b5b6000610d1584828501610b7c565b91505092915050565b60008060408385031215610d3557610d34610b2e565b5b6000610d4385828601610b7c565b9250506020610d5485828601610b7c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610da557607f821691505b602082108103610db857610db7610d5e565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610df882610b91565b9150610e0383610b91565b9250828201905080821115610e1b57610e1a610dbe565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610e7d602583610a87565b9150610e8882610e21565b604082019050919050565b60006020820190508181036000830152610eac81610e70565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000610f0f602483610a87565b9150610f1a82610eb3565b604082019050919050565b60006020820190508181036000830152610f3e81610f02565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000610fa1602283610a87565b9150610fac82610f45565b604082019050919050565b60006020820190508181036000830152610fd081610f94565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061100d601d83610a87565b915061101882610fd7565b602082019050919050565b6000602082019050818103600083015261103c81611000565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061109f602583610a87565b91506110aa82611043565b604082019050919050565b600060208201905081810360008301526110ce81611092565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611131602383610a87565b915061113c826110d5565b604082019050919050565b6000602082019050818103600083015261116081611124565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006111c3602683610a87565b91506111ce82611167565b604082019050919050565b600060208201905081810360008301526111f2816111b6565b905091905056fea2646970667358221220daf38aa4e25974cd4298a73645176a105cbb35e4e5f05836ccfc3184c2389ada64736f6c63430008180033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b0c565b60405180910390f35b6100e660048036038101906100e19190610bc7565b610308565b6040516100f39190610c22565b60405180910390f35b61010461032b565b6040516101119190610c4c565b60405180910390f35b610134600480360381019061012f9190610c67565b610335565b6040516101419190610c22565b60405180910390f35b610152610364565b60405161015f9190610cd6565b60405180910390f35b610182600480360381019061017d9190610bc7565b61036d565b60405161018f9190610c22565b60405180910390f35b6101b260048036038101906101ad9190610cf1565b6103a4565b6040516101bf9190610c4c565b60405180910390f35b6101d06103ec565b6040516101dd9190610b0c565b60405180910390f35b61020060048036038101906101fb9190610bc7565b61047e565b60405161020d9190610c22565b60405180910390f35b610230600480360381019061022b9190610bc7565b6104f5565b60405161023d9190610c22565b60405180910390f35b610260600480360381019061025b9190610d1e565b610518565b60405161026d9190610c4c565b60405180910390f35b60606003805461028590610d8d565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610d8d565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610770565b6103588585856107fc565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610ded565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610d8d565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610d8d565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e93565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fc565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060d90610f25565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067c90610fb7565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107639190610c4c565b60405180910390a3505050565b600061077c8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f657818110156107e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107df90611023565b60405180910390fd5b6107f584848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361086b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610862906110b5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d190611147565b60405180910390fd5b6108e5838383610a72565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610962906111d9565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a599190610c4c565b60405180910390a3610a6c848484610a77565b50505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610ab6578082015181840152602081019050610a9b565b60008484015250505050565b6000601f19601f8301169050919050565b6000610ade82610a7c565b610ae88185610a87565b9350610af8818560208601610a98565b610b0181610ac2565b840191505092915050565b60006020820190508181036000830152610b268184610ad3565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610b5e82610b33565b9050919050565b610b6e81610b53565b8114610b7957600080fd5b50565b600081359050610b8b81610b65565b92915050565b6000819050919050565b610ba481610b91565b8114610baf57600080fd5b50565b600081359050610bc181610b9b565b92915050565b60008060408385031215610bde57610bdd610b2e565b5b6000610bec85828601610b7c565b9250506020610bfd85828601610bb2565b9150509250929050565b60008115159050919050565b610c1c81610c07565b82525050565b6000602082019050610c376000830184610c13565b92915050565b610c4681610b91565b82525050565b6000602082019050610c616000830184610c3d565b92915050565b600080600060608486031215610c8057610c7f610b2e565b5b6000610c8e86828701610b7c565b9350506020610c9f86828701610b7c565b9250506040610cb086828701610bb2565b9150509250925092565b600060ff82169050919050565b610cd081610cba565b82525050565b6000602082019050610ceb6000830184610cc7565b92915050565b600060208284031215610d0757610d06610b2e565b5b6000610d1584828501610b7c565b91505092915050565b60008060408385031215610d3557610d34610b2e565b5b6000610d4385828601610b7c565b9250506020610d5485828601610b7c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610da557607f821691505b602082108103610db857610db7610d5e565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610df882610b91565b9150610e0383610b91565b9250828201905080821115610e1b57610e1a610dbe565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610e7d602583610a87565b9150610e8882610e21565b604082019050919050565b60006020820190508181036000830152610eac81610e70565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000610f0f602483610a87565b9150610f1a82610eb3565b604082019050919050565b60006020820190508181036000830152610f3e81610f02565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000610fa1602283610a87565b9150610fac82610f45565b604082019050919050565b60006020820190508181036000830152610fd081610f94565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061100d601d83610a87565b915061101882610fd7565b602082019050919050565b6000602082019050818103600083015261103c81611000565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061109f602583610a87565b91506110aa82611043565b604082019050919050565b600060208201905081810360008301526110ce81611092565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611131602383610a87565b915061113c826110d5565b604082019050919050565b6000602082019050818103600083015261116081611124565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006111c3602683610a87565b91506111ce82611167565b604082019050919050565b600060208201905081810360008301526111f2816111b6565b905091905056fea2646970667358221220daf38aa4e25974cd4298a73645176a105cbb35e4e5f05836ccfc3184c2389ada64736f6c63430008180033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/x/evm/embeds/artifacts/contracts/TestERC20InvalidFunction.sol/TestERC20InvalidFunction.json b/x/evm/embeds/artifacts/contracts/TestERC20InvalidFunction.sol/TestERC20InvalidFunction.json new file mode 100644 index 000000000..9758cf271 --- /dev/null +++ b/x/evm/embeds/artifacts/contracts/TestERC20InvalidFunction.sol/TestERC20InvalidFunction.json @@ -0,0 +1,122 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TestERC20InvalidFunction", + "sourceName": "contracts/TestERC20InvalidFunction.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000bb738038062000bb783398181016040528101906200003791906200024a565b60008160ff16036200004c5760006002819055505b82600390816200005d91906200052f565b5081600490816200006f91906200052f565b5050505062000616565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620000e28262000097565b810181811067ffffffffffffffff82111715620001045762000103620000a8565b5b80604052505050565b60006200011962000079565b9050620001278282620000d7565b919050565b600067ffffffffffffffff8211156200014a5762000149620000a8565b5b620001558262000097565b9050602081019050919050565b60005b838110156200018257808201518184015260208101905062000165565b60008484015250505050565b6000620001a56200019f846200012c565b6200010d565b905082815260208101848484011115620001c457620001c362000092565b5b620001d184828562000162565b509392505050565b600082601f830112620001f157620001f06200008d565b5b8151620002038482602086016200018e565b91505092915050565b600060ff82169050919050565b62000224816200020c565b81146200023057600080fd5b50565b600081519050620002448162000219565b92915050565b60008060006060848603121562000266576200026562000083565b5b600084015167ffffffffffffffff81111562000287576200028662000088565b5b6200029586828701620001d9565b935050602084015167ffffffffffffffff811115620002b957620002b862000088565b5b620002c786828701620001d9565b9250506040620002da8682870162000233565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200033757607f821691505b6020821081036200034d576200034c620002ef565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620003b77fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000378565b620003c3868362000378565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004106200040a6200040484620003db565b620003e5565b620003db565b9050919050565b6000819050919050565b6200042c83620003ef565b620004446200043b8262000417565b84845462000385565b825550505050565b600090565b6200045b6200044c565b6200046881848462000421565b505050565b5b8181101562000490576200048460008262000451565b6001810190506200046e565b5050565b601f821115620004df57620004a98162000353565b620004b48462000368565b81016020851015620004c4578190505b620004dc620004d38562000368565b8301826200046d565b50505b505050565b600082821c905092915050565b60006200050460001984600802620004e4565b1980831691505092915050565b60006200051f8383620004f1565b9150826002028217905092915050565b6200053a82620002e4565b67ffffffffffffffff811115620005565762000555620000a8565b5b6200056282546200031e565b6200056f82828562000494565b600060209050601f831160018114620005a7576000841562000592578287015190505b6200059e858262000511565b8655506200060e565b601f198416620005b78662000353565b60005b82811015620005e157848901518255600182019150602085019450602081019050620005ba565b86831015620006015784890151620005fd601f891682620004f1565b8355505b6001600288020188555050505b505050505050565b61059180620006266000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806306fdde031461006757806318160ddd146100855780631a695230146100a3578063313ce567146100d357806370a08231146100f157806395d89b4114610121575b600080fd5b61006f61013f565b60405161007c91906103a8565b60405180910390f35b61008d6101d1565b60405161009a91906103e3565b60405180910390f35b6100bd60048036038101906100b89190610461565b6101db565b6040516100ca91906104a9565b60405180910390f35b6100db61022c565b6040516100e891906104e0565b60405180910390f35b61010b60048036038101906101069190610461565b610235565b60405161011891906103e3565b60405180910390f35b61012961027d565b60405161013691906103a8565b60405180910390f35b60606003805461014e9061052a565b80601f016020809104026020016040519081016040528092919081815260200182805461017a9061052a565b80156101c75780601f1061019c576101008083540402835291602001916101c7565b820191906000526020600020905b8154815290600101906020018083116101aa57829003601f168201915b5050505050905090565b6000600254905090565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036102195760009050610227565b61022161030f565b50600190505b919050565b60006012905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60606004805461028c9061052a565b80601f01602080910402602001604051908101604052809291908181526020018280546102b89061052a565b80156103055780601f106102da57610100808354040283529160200191610305565b820191906000526020600020905b8154815290600101906020018083116102e857829003601f168201915b5050505050905090565b60006001905090565b600081519050919050565b600082825260208201905092915050565b60005b83811015610352578082015181840152602081019050610337565b60008484015250505050565b6000601f19601f8301169050919050565b600061037a82610318565b6103848185610323565b9350610394818560208601610334565b61039d8161035e565b840191505092915050565b600060208201905081810360008301526103c2818461036f565b905092915050565b6000819050919050565b6103dd816103ca565b82525050565b60006020820190506103f860008301846103d4565b92915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061042e82610403565b9050919050565b61043e81610423565b811461044957600080fd5b50565b60008135905061045b81610435565b92915050565b600060208284031215610477576104766103fe565b5b60006104858482850161044c565b91505092915050565b60008115159050919050565b6104a38161048e565b82525050565b60006020820190506104be600083018461049a565b92915050565b600060ff82169050919050565b6104da816104c4565b82525050565b60006020820190506104f560008301846104d1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061054257607f821691505b602082108103610555576105546104fb565b5b5091905056fea264697066735822122013bee8b5d8399b122519fbc165a574256b89d0c16b256a8d0326eddc9ef5546364736f6c63430008180033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100625760003560e01c806306fdde031461006757806318160ddd146100855780631a695230146100a3578063313ce567146100d357806370a08231146100f157806395d89b4114610121575b600080fd5b61006f61013f565b60405161007c91906103a8565b60405180910390f35b61008d6101d1565b60405161009a91906103e3565b60405180910390f35b6100bd60048036038101906100b89190610461565b6101db565b6040516100ca91906104a9565b60405180910390f35b6100db61022c565b6040516100e891906104e0565b60405180910390f35b61010b60048036038101906101069190610461565b610235565b60405161011891906103e3565b60405180910390f35b61012961027d565b60405161013691906103a8565b60405180910390f35b60606003805461014e9061052a565b80601f016020809104026020016040519081016040528092919081815260200182805461017a9061052a565b80156101c75780601f1061019c576101008083540402835291602001916101c7565b820191906000526020600020905b8154815290600101906020018083116101aa57829003601f168201915b5050505050905090565b6000600254905090565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036102195760009050610227565b61022161030f565b50600190505b919050565b60006012905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60606004805461028c9061052a565b80601f01602080910402602001604051908101604052809291908181526020018280546102b89061052a565b80156103055780601f106102da57610100808354040283529160200191610305565b820191906000526020600020905b8154815290600101906020018083116102e857829003601f168201915b5050505050905090565b60006001905090565b600081519050919050565b600082825260208201905092915050565b60005b83811015610352578082015181840152602081019050610337565b60008484015250505050565b6000601f19601f8301169050919050565b600061037a82610318565b6103848185610323565b9350610394818560208601610334565b61039d8161035e565b840191505092915050565b600060208201905081810360008301526103c2818461036f565b905092915050565b6000819050919050565b6103dd816103ca565b82525050565b60006020820190506103f860008301846103d4565b92915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061042e82610403565b9050919050565b61043e81610423565b811461044957600080fd5b50565b60008135905061045b81610435565b92915050565b600060208284031215610477576104766103fe565b5b60006104858482850161044c565b91505092915050565b60008115159050919050565b6104a38161048e565b82525050565b60006020820190506104be600083018461049a565b92915050565b600060ff82169050919050565b6104da816104c4565b82525050565b60006020820190506104f560008301846104d1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061054257607f821691505b602082108103610555576105546104fb565b5b5091905056fea264697066735822122013bee8b5d8399b122519fbc165a574256b89d0c16b256a8d0326eddc9ef5546364736f6c63430008180033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/x/evm/embeds/artifacts/contracts/TestERC20MaliciousTransfer.sol/TestERC20MaliciousTransfer.json b/x/evm/embeds/artifacts/contracts/TestERC20MaliciousTransfer.sol/TestERC20MaliciousTransfer.json index 48019e35d..a8b650a52 100644 --- a/x/evm/embeds/artifacts/contracts/TestERC20MaliciousTransfer.sol/TestERC20MaliciousTransfer.json +++ b/x/evm/embeds/artifacts/contracts/TestERC20MaliciousTransfer.sol/TestERC20MaliciousTransfer.json @@ -295,8 +295,8 @@ "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b5060405162001c5538038062001c558339818101604052810190620000379190620003cc565b828281600390816200004a9190620006b1565b5080600490816200005c9190620006b1565b5050506200007b3369d3c21bcecceda10000006200008460201b60201c565b505050620008b3565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603620000f6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000ed90620007f9565b60405180910390fd5b6200010a60008383620001f160201b60201c565b80600260008282546200011e91906200084a565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620001d1919062000896565b60405180910390a3620001ed60008383620001f660201b60201c565b5050565b505050565b505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620002648262000219565b810181811067ffffffffffffffff821117156200028657620002856200022a565b5b80604052505050565b60006200029b620001fb565b9050620002a9828262000259565b919050565b600067ffffffffffffffff821115620002cc57620002cb6200022a565b5b620002d78262000219565b9050602081019050919050565b60005b8381101562000304578082015181840152602081019050620002e7565b60008484015250505050565b6000620003276200032184620002ae565b6200028f565b90508281526020810184848401111562000346576200034562000214565b5b62000353848285620002e4565b509392505050565b600082601f8301126200037357620003726200020f565b5b81516200038584826020860162000310565b91505092915050565b600060ff82169050919050565b620003a6816200038e565b8114620003b257600080fd5b50565b600081519050620003c6816200039b565b92915050565b600080600060608486031215620003e857620003e762000205565b5b600084015167ffffffffffffffff8111156200040957620004086200020a565b5b62000417868287016200035b565b935050602084015167ffffffffffffffff8111156200043b576200043a6200020a565b5b62000449868287016200035b565b92505060406200045c86828701620003b5565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620004b957607f821691505b602082108103620004cf57620004ce62000471565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620005397fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620004fa565b620005458683620004fa565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620005926200058c62000586846200055d565b62000567565b6200055d565b9050919050565b6000819050919050565b620005ae8362000571565b620005c6620005bd8262000599565b84845462000507565b825550505050565b600090565b620005dd620005ce565b620005ea818484620005a3565b505050565b5b81811015620006125762000606600082620005d3565b600181019050620005f0565b5050565b601f82111562000661576200062b81620004d5565b6200063684620004ea565b8101602085101562000646578190505b6200065e6200065585620004ea565b830182620005ef565b50505b505050565b600082821c905092915050565b6000620006866000198460080262000666565b1980831691505092915050565b6000620006a1838362000673565b9150826002028217905092915050565b620006bc8262000466565b67ffffffffffffffff811115620006d857620006d76200022a565b5b620006e48254620004a0565b620006f182828562000616565b600060209050601f83116001811462000729576000841562000714578287015190505b62000720858262000693565b86555062000790565b601f1984166200073986620004d5565b60005b8281101562000763578489015182556001820191506020850194506020810190506200073c565b868310156200078357848901516200077f601f89168262000673565b8355505b6001600288020188555050505b505050505050565b600082825260208201905092915050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000620007e1601f8362000798565b9150620007ee82620007a9565b602082019050919050565b600060208201905081810360008301526200081481620007d2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600062000857826200055d565b915062000864836200055d565b92508282019050808211156200087f576200087e6200081b565b5b92915050565b62000890816200055d565b82525050565b6000602082019050620008ad600083018462000885565b92915050565b61139280620008c36000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b9e565b60405180910390f35b6100e660048036038101906100e19190610c59565b610308565b6040516100f39190610cb4565b60405180910390f35b61010461032b565b6040516101119190610cde565b60405180910390f35b610134600480360381019061012f9190610cf9565b610335565b6040516101419190610cb4565b60405180910390f35b610152610364565b60405161015f9190610d68565b60405180910390f35b610182600480360381019061017d9190610c59565b61036d565b60405161018f9190610cb4565b60405180910390f35b6101b260048036038101906101ad9190610d83565b6103a4565b6040516101bf9190610cde565b60405180910390f35b6101d06103ec565b6040516101dd9190610b9e565b60405180910390f35b61020060048036038101906101fb9190610c59565b61047e565b60405161020d9190610cb4565b60405180910390f35b610230600480360381019061022b9190610c59565b6104f5565b60405161023d9190610cb4565b60405180910390f35b610260600480360381019061025b9190610db0565b610511565b60405161026d9190610cde565b60405180910390f35b60606003805461028590610e1f565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610e1f565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b600080610313610598565b90506103208185856105a0565b600191505092915050565b6000600254905090565b600080610340610598565b905061034d858285610769565b6103588585856107f5565b60019150509392505050565b60006012905090565b600080610378610598565b905061039981858561038a8589610511565b6103949190610e7f565b6105a0565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610e1f565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610e1f565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b600080610489610598565b905060006104978286610511565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610f25565b60405180910390fd5b6104e982868684036105a0565b60019250505092915050565b60006104ff610a6b565b6105098383610ae1565b905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361060f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060690610fb7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361067e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067590611049565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161075c9190610cde565b60405180910390a3505050565b60006107758484610511565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107ef57818110156107e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d8906110b5565b60405180910390fd5b6107ee84848484036105a0565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610864576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085b90611147565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ca906111d9565b60405180910390fd5b6108de838383610b04565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610964576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095b9061126b565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a529190610cde565b60405180910390a3610a65848484610b09565b50505050565b60006001905060005b620186a0811015610acc576001600283610a8e919061128b565b610a989190610e7f565b9150600282610aa791906112fc565b9150600182901b8218915067ffffffffffffffff821691508080600101915050610a74565b5060008103610ade57610add61132d565b5b50565b600080610aec610598565b9050610af98185856107f5565b600191505092915050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610b48578082015181840152602081019050610b2d565b60008484015250505050565b6000601f19601f8301169050919050565b6000610b7082610b0e565b610b7a8185610b19565b9350610b8a818560208601610b2a565b610b9381610b54565b840191505092915050565b60006020820190508181036000830152610bb88184610b65565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610bf082610bc5565b9050919050565b610c0081610be5565b8114610c0b57600080fd5b50565b600081359050610c1d81610bf7565b92915050565b6000819050919050565b610c3681610c23565b8114610c4157600080fd5b50565b600081359050610c5381610c2d565b92915050565b60008060408385031215610c7057610c6f610bc0565b5b6000610c7e85828601610c0e565b9250506020610c8f85828601610c44565b9150509250929050565b60008115159050919050565b610cae81610c99565b82525050565b6000602082019050610cc96000830184610ca5565b92915050565b610cd881610c23565b82525050565b6000602082019050610cf36000830184610ccf565b92915050565b600080600060608486031215610d1257610d11610bc0565b5b6000610d2086828701610c0e565b9350506020610d3186828701610c0e565b9250506040610d4286828701610c44565b9150509250925092565b600060ff82169050919050565b610d6281610d4c565b82525050565b6000602082019050610d7d6000830184610d59565b92915050565b600060208284031215610d9957610d98610bc0565b5b6000610da784828501610c0e565b91505092915050565b60008060408385031215610dc757610dc6610bc0565b5b6000610dd585828601610c0e565b9250506020610de685828601610c0e565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610e3757607f821691505b602082108103610e4a57610e49610df0565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610e8a82610c23565b9150610e9583610c23565b9250828201905080821115610ead57610eac610e50565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610f0f602583610b19565b9150610f1a82610eb3565b604082019050919050565b60006020820190508181036000830152610f3e81610f02565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000610fa1602483610b19565b9150610fac82610f45565b604082019050919050565b60006020820190508181036000830152610fd081610f94565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000611033602283610b19565b915061103e82610fd7565b604082019050919050565b6000602082019050818103600083015261106281611026565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061109f601d83610b19565b91506110aa82611069565b602082019050919050565b600060208201905081810360008301526110ce81611092565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000611131602583610b19565b915061113c826110d5565b604082019050919050565b6000602082019050818103600083015261116081611124565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006111c3602383610b19565b91506111ce82611167565b604082019050919050565b600060208201905081810360008301526111f2816111b6565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000611255602683610b19565b9150611260826111f9565b604082019050919050565b6000602082019050818103600083015261128481611248565b9050919050565b600061129682610c23565b91506112a183610c23565b92508282026112af81610c23565b915082820484148315176112c6576112c5610e50565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061130782610c23565b915061131283610c23565b925082611322576113216112cd565b5b828204905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fdfea2646970667358221220e34d9015349ff6af20fee44587dc5ba21b370ca2a6239a1dc6440ecaddfd47a364736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b9e565b60405180910390f35b6100e660048036038101906100e19190610c59565b610308565b6040516100f39190610cb4565b60405180910390f35b61010461032b565b6040516101119190610cde565b60405180910390f35b610134600480360381019061012f9190610cf9565b610335565b6040516101419190610cb4565b60405180910390f35b610152610364565b60405161015f9190610d68565b60405180910390f35b610182600480360381019061017d9190610c59565b61036d565b60405161018f9190610cb4565b60405180910390f35b6101b260048036038101906101ad9190610d83565b6103a4565b6040516101bf9190610cde565b60405180910390f35b6101d06103ec565b6040516101dd9190610b9e565b60405180910390f35b61020060048036038101906101fb9190610c59565b61047e565b60405161020d9190610cb4565b60405180910390f35b610230600480360381019061022b9190610c59565b6104f5565b60405161023d9190610cb4565b60405180910390f35b610260600480360381019061025b9190610db0565b610511565b60405161026d9190610cde565b60405180910390f35b60606003805461028590610e1f565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610e1f565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b600080610313610598565b90506103208185856105a0565b600191505092915050565b6000600254905090565b600080610340610598565b905061034d858285610769565b6103588585856107f5565b60019150509392505050565b60006012905090565b600080610378610598565b905061039981858561038a8589610511565b6103949190610e7f565b6105a0565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610e1f565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610e1f565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b600080610489610598565b905060006104978286610511565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610f25565b60405180910390fd5b6104e982868684036105a0565b60019250505092915050565b60006104ff610a6b565b6105098383610ae1565b905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361060f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060690610fb7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361067e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067590611049565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161075c9190610cde565b60405180910390a3505050565b60006107758484610511565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107ef57818110156107e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d8906110b5565b60405180910390fd5b6107ee84848484036105a0565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610864576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085b90611147565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ca906111d9565b60405180910390fd5b6108de838383610b04565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610964576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095b9061126b565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a529190610cde565b60405180910390a3610a65848484610b09565b50505050565b60006001905060005b620186a0811015610acc576001600283610a8e919061128b565b610a989190610e7f565b9150600282610aa791906112fc565b9150600182901b8218915067ffffffffffffffff821691508080600101915050610a74565b5060008103610ade57610add61132d565b5b50565b600080610aec610598565b9050610af98185856107f5565b600191505092915050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610b48578082015181840152602081019050610b2d565b60008484015250505050565b6000601f19601f8301169050919050565b6000610b7082610b0e565b610b7a8185610b19565b9350610b8a818560208601610b2a565b610b9381610b54565b840191505092915050565b60006020820190508181036000830152610bb88184610b65565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610bf082610bc5565b9050919050565b610c0081610be5565b8114610c0b57600080fd5b50565b600081359050610c1d81610bf7565b92915050565b6000819050919050565b610c3681610c23565b8114610c4157600080fd5b50565b600081359050610c5381610c2d565b92915050565b60008060408385031215610c7057610c6f610bc0565b5b6000610c7e85828601610c0e565b9250506020610c8f85828601610c44565b9150509250929050565b60008115159050919050565b610cae81610c99565b82525050565b6000602082019050610cc96000830184610ca5565b92915050565b610cd881610c23565b82525050565b6000602082019050610cf36000830184610ccf565b92915050565b600080600060608486031215610d1257610d11610bc0565b5b6000610d2086828701610c0e565b9350506020610d3186828701610c0e565b9250506040610d4286828701610c44565b9150509250925092565b600060ff82169050919050565b610d6281610d4c565b82525050565b6000602082019050610d7d6000830184610d59565b92915050565b600060208284031215610d9957610d98610bc0565b5b6000610da784828501610c0e565b91505092915050565b60008060408385031215610dc757610dc6610bc0565b5b6000610dd585828601610c0e565b9250506020610de685828601610c0e565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610e3757607f821691505b602082108103610e4a57610e49610df0565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610e8a82610c23565b9150610e9583610c23565b9250828201905080821115610ead57610eac610e50565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610f0f602583610b19565b9150610f1a82610eb3565b604082019050919050565b60006020820190508181036000830152610f3e81610f02565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000610fa1602483610b19565b9150610fac82610f45565b604082019050919050565b60006020820190508181036000830152610fd081610f94565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000611033602283610b19565b915061103e82610fd7565b604082019050919050565b6000602082019050818103600083015261106281611026565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061109f601d83610b19565b91506110aa82611069565b602082019050919050565b600060208201905081810360008301526110ce81611092565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000611131602583610b19565b915061113c826110d5565b604082019050919050565b6000602082019050818103600083015261116081611124565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006111c3602383610b19565b91506111ce82611167565b604082019050919050565b600060208201905081810360008301526111f2816111b6565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000611255602683610b19565b9150611260826111f9565b604082019050919050565b6000602082019050818103600083015261128481611248565b9050919050565b600061129682610c23565b91506112a183610c23565b92508282026112af81610c23565b915082820484148315176112c6576112c5610e50565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061130782610c23565b915061131283610c23565b925082611322576113216112cd565b5b828204905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fdfea2646970667358221220e34d9015349ff6af20fee44587dc5ba21b370ca2a6239a1dc6440ecaddfd47a364736f6c63430008180033", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162001c5538038062001c558339818101604052810190620000379190620003cc565b828281600390816200004a9190620006b1565b5080600490816200005c9190620006b1565b5050506200007b3369d3c21bcecceda10000006200008460201b60201c565b505050620008b3565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603620000f6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000ed90620007f9565b60405180910390fd5b6200010a60008383620001f160201b60201c565b80600260008282546200011e91906200084a565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620001d1919062000896565b60405180910390a3620001ed60008383620001f660201b60201c565b5050565b505050565b505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620002648262000219565b810181811067ffffffffffffffff821117156200028657620002856200022a565b5b80604052505050565b60006200029b620001fb565b9050620002a9828262000259565b919050565b600067ffffffffffffffff821115620002cc57620002cb6200022a565b5b620002d78262000219565b9050602081019050919050565b60005b8381101562000304578082015181840152602081019050620002e7565b60008484015250505050565b6000620003276200032184620002ae565b6200028f565b90508281526020810184848401111562000346576200034562000214565b5b62000353848285620002e4565b509392505050565b600082601f8301126200037357620003726200020f565b5b81516200038584826020860162000310565b91505092915050565b600060ff82169050919050565b620003a6816200038e565b8114620003b257600080fd5b50565b600081519050620003c6816200039b565b92915050565b600080600060608486031215620003e857620003e762000205565b5b600084015167ffffffffffffffff8111156200040957620004086200020a565b5b62000417868287016200035b565b935050602084015167ffffffffffffffff8111156200043b576200043a6200020a565b5b62000449868287016200035b565b92505060406200045c86828701620003b5565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620004b957607f821691505b602082108103620004cf57620004ce62000471565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620005397fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620004fa565b620005458683620004fa565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620005926200058c62000586846200055d565b62000567565b6200055d565b9050919050565b6000819050919050565b620005ae8362000571565b620005c6620005bd8262000599565b84845462000507565b825550505050565b600090565b620005dd620005ce565b620005ea818484620005a3565b505050565b5b81811015620006125762000606600082620005d3565b600181019050620005f0565b5050565b601f82111562000661576200062b81620004d5565b6200063684620004ea565b8101602085101562000646578190505b6200065e6200065585620004ea565b830182620005ef565b50505b505050565b600082821c905092915050565b6000620006866000198460080262000666565b1980831691505092915050565b6000620006a1838362000673565b9150826002028217905092915050565b620006bc8262000466565b67ffffffffffffffff811115620006d857620006d76200022a565b5b620006e48254620004a0565b620006f182828562000616565b600060209050601f83116001811462000729576000841562000714578287015190505b62000720858262000693565b86555062000790565b601f1984166200073986620004d5565b60005b8281101562000763578489015182556001820191506020850194506020810190506200073c565b868310156200078357848901516200077f601f89168262000673565b8355505b6001600288020188555050505b505050505050565b600082825260208201905092915050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000620007e1601f8362000798565b9150620007ee82620007a9565b602082019050919050565b600060208201905081810360008301526200081481620007d2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600062000857826200055d565b915062000864836200055d565b92508282019050808211156200087f576200087e6200081b565b5b92915050565b62000890816200055d565b82525050565b6000602082019050620008ad600083018462000885565b92915050565b61139280620008c36000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b9e565b60405180910390f35b6100e660048036038101906100e19190610c59565b610308565b6040516100f39190610cb4565b60405180910390f35b61010461032b565b6040516101119190610cde565b60405180910390f35b610134600480360381019061012f9190610cf9565b610335565b6040516101419190610cb4565b60405180910390f35b610152610364565b60405161015f9190610d68565b60405180910390f35b610182600480360381019061017d9190610c59565b61036d565b60405161018f9190610cb4565b60405180910390f35b6101b260048036038101906101ad9190610d83565b6103a4565b6040516101bf9190610cde565b60405180910390f35b6101d06103ec565b6040516101dd9190610b9e565b60405180910390f35b61020060048036038101906101fb9190610c59565b61047e565b60405161020d9190610cb4565b60405180910390f35b610230600480360381019061022b9190610c59565b6104f5565b60405161023d9190610cb4565b60405180910390f35b610260600480360381019061025b9190610db0565b610511565b60405161026d9190610cde565b60405180910390f35b60606003805461028590610e1f565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610e1f565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b600080610313610598565b90506103208185856105a0565b600191505092915050565b6000600254905090565b600080610340610598565b905061034d858285610769565b6103588585856107f5565b60019150509392505050565b60006012905090565b600080610378610598565b905061039981858561038a8589610511565b6103949190610e7f565b6105a0565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610e1f565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610e1f565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b600080610489610598565b905060006104978286610511565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610f25565b60405180910390fd5b6104e982868684036105a0565b60019250505092915050565b60006104ff610a6b565b6105098383610ae1565b905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361060f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060690610fb7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361067e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067590611049565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161075c9190610cde565b60405180910390a3505050565b60006107758484610511565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107ef57818110156107e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d8906110b5565b60405180910390fd5b6107ee84848484036105a0565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610864576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085b90611147565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ca906111d9565b60405180910390fd5b6108de838383610b04565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610964576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095b9061126b565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a529190610cde565b60405180910390a3610a65848484610b09565b50505050565b60006001905060005b620186a0811015610acc576001600283610a8e919061128b565b610a989190610e7f565b9150600282610aa791906112fc565b9150600182901b8218915067ffffffffffffffff821691508080600101915050610a74565b5060008103610ade57610add61132d565b5b50565b600080610aec610598565b9050610af98185856107f5565b600191505092915050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610b48578082015181840152602081019050610b2d565b60008484015250505050565b6000601f19601f8301169050919050565b6000610b7082610b0e565b610b7a8185610b19565b9350610b8a818560208601610b2a565b610b9381610b54565b840191505092915050565b60006020820190508181036000830152610bb88184610b65565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610bf082610bc5565b9050919050565b610c0081610be5565b8114610c0b57600080fd5b50565b600081359050610c1d81610bf7565b92915050565b6000819050919050565b610c3681610c23565b8114610c4157600080fd5b50565b600081359050610c5381610c2d565b92915050565b60008060408385031215610c7057610c6f610bc0565b5b6000610c7e85828601610c0e565b9250506020610c8f85828601610c44565b9150509250929050565b60008115159050919050565b610cae81610c99565b82525050565b6000602082019050610cc96000830184610ca5565b92915050565b610cd881610c23565b82525050565b6000602082019050610cf36000830184610ccf565b92915050565b600080600060608486031215610d1257610d11610bc0565b5b6000610d2086828701610c0e565b9350506020610d3186828701610c0e565b9250506040610d4286828701610c44565b9150509250925092565b600060ff82169050919050565b610d6281610d4c565b82525050565b6000602082019050610d7d6000830184610d59565b92915050565b600060208284031215610d9957610d98610bc0565b5b6000610da784828501610c0e565b91505092915050565b60008060408385031215610dc757610dc6610bc0565b5b6000610dd585828601610c0e565b9250506020610de685828601610c0e565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610e3757607f821691505b602082108103610e4a57610e49610df0565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610e8a82610c23565b9150610e9583610c23565b9250828201905080821115610ead57610eac610e50565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610f0f602583610b19565b9150610f1a82610eb3565b604082019050919050565b60006020820190508181036000830152610f3e81610f02565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000610fa1602483610b19565b9150610fac82610f45565b604082019050919050565b60006020820190508181036000830152610fd081610f94565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000611033602283610b19565b915061103e82610fd7565b604082019050919050565b6000602082019050818103600083015261106281611026565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061109f601d83610b19565b91506110aa82611069565b602082019050919050565b600060208201905081810360008301526110ce81611092565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000611131602583610b19565b915061113c826110d5565b604082019050919050565b6000602082019050818103600083015261116081611124565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006111c3602383610b19565b91506111ce82611167565b604082019050919050565b600060208201905081810360008301526111f2816111b6565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000611255602683610b19565b9150611260826111f9565b604082019050919050565b6000602082019050818103600083015261128481611248565b9050919050565b600061129682610c23565b91506112a183610c23565b92508282026112af81610c23565b915082820484148315176112c6576112c5610e50565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061130782610c23565b915061131283610c23565b925082611322576113216112cd565b5b828204905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fdfea2646970667358221220ea3c15829e321d0ee1e74118ada7f0f5736aa9d02213b2cce3e1120a0f67557764736f6c63430008180033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b9e565b60405180910390f35b6100e660048036038101906100e19190610c59565b610308565b6040516100f39190610cb4565b60405180910390f35b61010461032b565b6040516101119190610cde565b60405180910390f35b610134600480360381019061012f9190610cf9565b610335565b6040516101419190610cb4565b60405180910390f35b610152610364565b60405161015f9190610d68565b60405180910390f35b610182600480360381019061017d9190610c59565b61036d565b60405161018f9190610cb4565b60405180910390f35b6101b260048036038101906101ad9190610d83565b6103a4565b6040516101bf9190610cde565b60405180910390f35b6101d06103ec565b6040516101dd9190610b9e565b60405180910390f35b61020060048036038101906101fb9190610c59565b61047e565b60405161020d9190610cb4565b60405180910390f35b610230600480360381019061022b9190610c59565b6104f5565b60405161023d9190610cb4565b60405180910390f35b610260600480360381019061025b9190610db0565b610511565b60405161026d9190610cde565b60405180910390f35b60606003805461028590610e1f565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610e1f565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b600080610313610598565b90506103208185856105a0565b600191505092915050565b6000600254905090565b600080610340610598565b905061034d858285610769565b6103588585856107f5565b60019150509392505050565b60006012905090565b600080610378610598565b905061039981858561038a8589610511565b6103949190610e7f565b6105a0565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610e1f565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610e1f565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b600080610489610598565b905060006104978286610511565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610f25565b60405180910390fd5b6104e982868684036105a0565b60019250505092915050565b60006104ff610a6b565b6105098383610ae1565b905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361060f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060690610fb7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361067e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067590611049565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161075c9190610cde565b60405180910390a3505050565b60006107758484610511565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107ef57818110156107e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d8906110b5565b60405180910390fd5b6107ee84848484036105a0565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610864576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085b90611147565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ca906111d9565b60405180910390fd5b6108de838383610b04565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610964576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095b9061126b565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a529190610cde565b60405180910390a3610a65848484610b09565b50505050565b60006001905060005b620186a0811015610acc576001600283610a8e919061128b565b610a989190610e7f565b9150600282610aa791906112fc565b9150600182901b8218915067ffffffffffffffff821691508080600101915050610a74565b5060008103610ade57610add61132d565b5b50565b600080610aec610598565b9050610af98185856107f5565b600191505092915050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610b48578082015181840152602081019050610b2d565b60008484015250505050565b6000601f19601f8301169050919050565b6000610b7082610b0e565b610b7a8185610b19565b9350610b8a818560208601610b2a565b610b9381610b54565b840191505092915050565b60006020820190508181036000830152610bb88184610b65565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610bf082610bc5565b9050919050565b610c0081610be5565b8114610c0b57600080fd5b50565b600081359050610c1d81610bf7565b92915050565b6000819050919050565b610c3681610c23565b8114610c4157600080fd5b50565b600081359050610c5381610c2d565b92915050565b60008060408385031215610c7057610c6f610bc0565b5b6000610c7e85828601610c0e565b9250506020610c8f85828601610c44565b9150509250929050565b60008115159050919050565b610cae81610c99565b82525050565b6000602082019050610cc96000830184610ca5565b92915050565b610cd881610c23565b82525050565b6000602082019050610cf36000830184610ccf565b92915050565b600080600060608486031215610d1257610d11610bc0565b5b6000610d2086828701610c0e565b9350506020610d3186828701610c0e565b9250506040610d4286828701610c44565b9150509250925092565b600060ff82169050919050565b610d6281610d4c565b82525050565b6000602082019050610d7d6000830184610d59565b92915050565b600060208284031215610d9957610d98610bc0565b5b6000610da784828501610c0e565b91505092915050565b60008060408385031215610dc757610dc6610bc0565b5b6000610dd585828601610c0e565b9250506020610de685828601610c0e565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610e3757607f821691505b602082108103610e4a57610e49610df0565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610e8a82610c23565b9150610e9583610c23565b9250828201905080821115610ead57610eac610e50565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610f0f602583610b19565b9150610f1a82610eb3565b604082019050919050565b60006020820190508181036000830152610f3e81610f02565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000610fa1602483610b19565b9150610fac82610f45565b604082019050919050565b60006020820190508181036000830152610fd081610f94565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000611033602283610b19565b915061103e82610fd7565b604082019050919050565b6000602082019050818103600083015261106281611026565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061109f601d83610b19565b91506110aa82611069565b602082019050919050565b600060208201905081810360008301526110ce81611092565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000611131602583610b19565b915061113c826110d5565b604082019050919050565b6000602082019050818103600083015261116081611124565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006111c3602383610b19565b91506111ce82611167565b604082019050919050565b600060208201905081810360008301526111f2816111b6565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000611255602683610b19565b9150611260826111f9565b604082019050919050565b6000602082019050818103600083015261128481611248565b9050919050565b600061129682610c23565b91506112a183610c23565b92508282026112af81610c23565b915082820484148315176112c6576112c5610e50565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061130782610c23565b915061131283610c23565b925082611322576113216112cd565b5b828204905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fdfea2646970667358221220ea3c15829e321d0ee1e74118ada7f0f5736aa9d02213b2cce3e1120a0f67557764736f6c63430008180033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/x/evm/embeds/artifacts/contracts/TestERC20MissingFunction.sol/TestERC20MissingFunction.json b/x/evm/embeds/artifacts/contracts/TestERC20MissingFunction.sol/TestERC20MissingFunction.json new file mode 100644 index 000000000..cf786ca7d --- /dev/null +++ b/x/evm/embeds/artifacts/contracts/TestERC20MissingFunction.sol/TestERC20MissingFunction.json @@ -0,0 +1,108 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TestERC20MissingFunction", + "sourceName": "contracts/TestERC20MissingFunction.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000b2238038062000b22833981810160405281019062000037919062000235565b82600390816200004891906200051a565b5081600490816200005a91906200051a565b5050505062000601565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620000cd8262000082565b810181811067ffffffffffffffff82111715620000ef57620000ee62000093565b5b80604052505050565b60006200010462000064565b9050620001128282620000c2565b919050565b600067ffffffffffffffff82111562000135576200013462000093565b5b620001408262000082565b9050602081019050919050565b60005b838110156200016d57808201518184015260208101905062000150565b60008484015250505050565b6000620001906200018a8462000117565b620000f8565b905082815260208101848484011115620001af57620001ae6200007d565b5b620001bc8482856200014d565b509392505050565b600082601f830112620001dc57620001db62000078565b5b8151620001ee84826020860162000179565b91505092915050565b600060ff82169050919050565b6200020f81620001f7565b81146200021b57600080fd5b50565b6000815190506200022f8162000204565b92915050565b6000806000606084860312156200025157620002506200006e565b5b600084015167ffffffffffffffff81111562000272576200027162000073565b5b6200028086828701620001c4565b935050602084015167ffffffffffffffff811115620002a457620002a362000073565b5b620002b286828701620001c4565b9250506040620002c5868287016200021e565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200032257607f821691505b602082108103620003385762000337620002da565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620003a27fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000363565b620003ae868362000363565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003fb620003f5620003ef84620003c6565b620003d0565b620003c6565b9050919050565b6000819050919050565b6200041783620003da565b6200042f620004268262000402565b84845462000370565b825550505050565b600090565b6200044662000437565b620004538184846200040c565b505050565b5b818110156200047b576200046f6000826200043c565b60018101905062000459565b5050565b601f821115620004ca5762000494816200033e565b6200049f8462000353565b81016020851015620004af578190505b620004c7620004be8562000353565b83018262000458565b50505b505050565b600082821c905092915050565b6000620004ef60001984600802620004cf565b1980831691505092915050565b60006200050a8383620004dc565b9150826002028217905092915050565b6200052582620002cf565b67ffffffffffffffff81111562000541576200054062000093565b5b6200054d825462000309565b6200055a8282856200047f565b600060209050601f8311600181146200059257600084156200057d578287015190505b620005898582620004fc565b865550620005f9565b601f198416620005a2866200033e565b60005b82811015620005cc57848901518255600182019150602085019450602081019050620005a5565b86831015620005ec5784890151620005e8601f891682620004dc565b8355505b6001600288020188555050505b505050505050565b61051180620006116000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806306fdde031461005c57806318160ddd1461007a578063313ce5671461009857806395d89b41146100b6578063a9059cbb146100d4575b600080fd5b610064610104565b60405161007191906102e9565b60405180910390f35b610082610196565b60405161008f9190610324565b60405180910390f35b6100a06101a0565b6040516100ad919061035b565b60405180910390f35b6100be6101a9565b6040516100cb91906102e9565b60405180910390f35b6100ee60048036038101906100e99190610405565b61023b565b6040516100fb9190610460565b60405180910390f35b606060038054610113906104aa565b80601f016020809104026020016040519081016040528092919081815260200182805461013f906104aa565b801561018c5780601f106101615761010080835404028352916020019161018c565b820191906000526020600020905b81548152906001019060200180831161016f57829003601f168201915b5050505050905090565b6000600254905090565b60006012905090565b6060600480546101b8906104aa565b80601f01602080910402602001604051908101604052809291908181526020018280546101e4906104aa565b80156102315780601f1061020657610100808354040283529160200191610231565b820191906000526020600020905b81548152906001019060200180831161021457829003601f168201915b5050505050905090565b6000610245610250565b506001905092915050565b60006001905090565b600081519050919050565b600082825260208201905092915050565b60005b83811015610293578082015181840152602081019050610278565b60008484015250505050565b6000601f19601f8301169050919050565b60006102bb82610259565b6102c58185610264565b93506102d5818560208601610275565b6102de8161029f565b840191505092915050565b6000602082019050818103600083015261030381846102b0565b905092915050565b6000819050919050565b61031e8161030b565b82525050565b60006020820190506103396000830184610315565b92915050565b600060ff82169050919050565b6103558161033f565b82525050565b6000602082019050610370600083018461034c565b92915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006103a68261037b565b9050919050565b6103b68161039b565b81146103c157600080fd5b50565b6000813590506103d3816103ad565b92915050565b6103e28161030b565b81146103ed57600080fd5b50565b6000813590506103ff816103d9565b92915050565b6000806040838503121561041c5761041b610376565b5b600061042a858286016103c4565b925050602061043b858286016103f0565b9150509250929050565b60008115159050919050565b61045a81610445565b82525050565b60006020820190506104756000830184610451565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806104c257607f821691505b6020821081036104d5576104d461047b565b5b5091905056fea2646970667358221220a19534f82cd0dc270b9c4b446608cafa0d04a0942e9477d60206bd77bccbdf0a64736f6c63430008180033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c806306fdde031461005c57806318160ddd1461007a578063313ce5671461009857806395d89b41146100b6578063a9059cbb146100d4575b600080fd5b610064610104565b60405161007191906102e9565b60405180910390f35b610082610196565b60405161008f9190610324565b60405180910390f35b6100a06101a0565b6040516100ad919061035b565b60405180910390f35b6100be6101a9565b6040516100cb91906102e9565b60405180910390f35b6100ee60048036038101906100e99190610405565b61023b565b6040516100fb9190610460565b60405180910390f35b606060038054610113906104aa565b80601f016020809104026020016040519081016040528092919081815260200182805461013f906104aa565b801561018c5780601f106101615761010080835404028352916020019161018c565b820191906000526020600020905b81548152906001019060200180831161016f57829003601f168201915b5050505050905090565b6000600254905090565b60006012905090565b6060600480546101b8906104aa565b80601f01602080910402602001604051908101604052809291908181526020018280546101e4906104aa565b80156102315780601f1061020657610100808354040283529160200191610231565b820191906000526020600020905b81548152906001019060200180831161021457829003601f168201915b5050505050905090565b6000610245610250565b506001905092915050565b60006001905090565b600081519050919050565b600082825260208201905092915050565b60005b83811015610293578082015181840152602081019050610278565b60008484015250505050565b6000601f19601f8301169050919050565b60006102bb82610259565b6102c58185610264565b93506102d5818560208601610275565b6102de8161029f565b840191505092915050565b6000602082019050818103600083015261030381846102b0565b905092915050565b6000819050919050565b61031e8161030b565b82525050565b60006020820190506103396000830184610315565b92915050565b600060ff82169050919050565b6103558161033f565b82525050565b6000602082019050610370600083018461034c565b92915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006103a68261037b565b9050919050565b6103b68161039b565b81146103c157600080fd5b50565b6000813590506103d3816103ad565b92915050565b6103e28161030b565b81146103ed57600080fd5b50565b6000813590506103ff816103d9565b92915050565b6000806040838503121561041c5761041b610376565b5b600061042a858286016103c4565b925050602061043b858286016103f0565b9150509250929050565b60008115159050919050565b61045a81610445565b82525050565b60006020820190506104756000830184610451565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806104c257607f821691505b6020821081036104d5576104d461047b565b5b5091905056fea2646970667358221220a19534f82cd0dc270b9c4b446608cafa0d04a0942e9477d60206bd77bccbdf0a64736f6c63430008180033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/x/evm/embeds/artifacts/contracts/TestERC20TransferWithFee.sol/TestERC20TransferWithFee.json b/x/evm/embeds/artifacts/contracts/TestERC20TransferWithFee.sol/TestERC20TransferWithFee.json index a3ad2ea1e..126a693a6 100644 --- a/x/evm/embeds/artifacts/contracts/TestERC20TransferWithFee.sol/TestERC20TransferWithFee.json +++ b/x/evm/embeds/artifacts/contracts/TestERC20TransferWithFee.sol/TestERC20TransferWithFee.json @@ -290,8 +290,8 @@ "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b5060405162001c7b38038062001c7b833981810160405281019062000037919062000385565b818181600390816200004a919062000655565b5080600490816200005c919062000655565b50505062000073336103e86200007b60201b60201c565b505062000857565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603620000ed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000e4906200079d565b60405180910390fd5b6200010160008383620001e860201b60201c565b8060026000828254620001159190620007ee565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620001c891906200083a565b60405180910390a3620001e460008383620001ed60201b60201c565b5050565b505050565b505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200025b8262000210565b810181811067ffffffffffffffff821117156200027d576200027c62000221565b5b80604052505050565b600062000292620001f2565b9050620002a0828262000250565b919050565b600067ffffffffffffffff821115620002c357620002c262000221565b5b620002ce8262000210565b9050602081019050919050565b60005b83811015620002fb578082015181840152602081019050620002de565b60008484015250505050565b60006200031e6200031884620002a5565b62000286565b9050828152602081018484840111156200033d576200033c6200020b565b5b6200034a848285620002db565b509392505050565b600082601f8301126200036a576200036962000206565b5b81516200037c84826020860162000307565b91505092915050565b600080604083850312156200039f576200039e620001fc565b5b600083015167ffffffffffffffff811115620003c057620003bf62000201565b5b620003ce8582860162000352565b925050602083015167ffffffffffffffff811115620003f257620003f162000201565b5b620004008582860162000352565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200045d57607f821691505b60208210810362000473576200047262000415565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620004dd7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200049e565b620004e986836200049e565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b600062000536620005306200052a8462000501565b6200050b565b62000501565b9050919050565b6000819050919050565b620005528362000515565b6200056a62000561826200053d565b848454620004ab565b825550505050565b600090565b6200058162000572565b6200058e81848462000547565b505050565b5b81811015620005b657620005aa60008262000577565b60018101905062000594565b5050565b601f8211156200060557620005cf8162000479565b620005da846200048e565b81016020851015620005ea578190505b62000602620005f9856200048e565b83018262000593565b50505b505050565b600082821c905092915050565b60006200062a600019846008026200060a565b1980831691505092915050565b600062000645838362000617565b9150826002028217905092915050565b62000660826200040a565b67ffffffffffffffff8111156200067c576200067b62000221565b5b62000688825462000444565b62000695828285620005ba565b600060209050601f831160018114620006cd5760008415620006b8578287015190505b620006c4858262000637565b86555062000734565b601f198416620006dd8662000479565b60005b828110156200070757848901518255600182019150602085019450602081019050620006e0565b8683101562000727578489015162000723601f89168262000617565b8355505b6001600288020188555050505b505050505050565b600082825260208201905092915050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b600062000785601f836200073c565b915062000792826200074d565b602082019050919050565b60006020820190508181036000830152620007b88162000776565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000620007fb8262000501565b9150620008088362000501565b9250828201905080821115620008235762000822620007bf565b5b92915050565b620008348162000501565b82525050565b600060208201905062000851600083018462000829565b92915050565b61141480620008676000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b89565b60405180910390f35b6100e660048036038101906100e19190610c44565b610308565b6040516100f39190610c9f565b60405180910390f35b61010461032b565b6040516101119190610cc9565b60405180910390f35b610134600480360381019061012f9190610ce4565b610335565b6040516101419190610c9f565b60405180910390f35b610152610364565b60405161015f9190610d53565b60405180910390f35b610182600480360381019061017d9190610c44565b61036d565b60405161018f9190610c9f565b60405180910390f35b6101b260048036038101906101ad9190610d6e565b6103a4565b6040516101bf9190610cc9565b60405180910390f35b6101d06103ec565b6040516101dd9190610b89565b60405180910390f35b61020060048036038101906101fb9190610c44565b61047e565b60405161020d9190610c9f565b60405180910390f35b610230600480360381019061022b9190610c44565b6104f5565b60405161023d9190610c9f565b60405180910390f35b610260600480360381019061025b9190610d9b565b610595565b60405161026d9190610cc9565b60405180910390f35b60606003805461028590610e0a565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610e0a565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361061c565b9050610320818585610624565b600191505092915050565b6000600254905090565b60008061034061061c565b905061034d8582856107ed565b610358858585610879565b60019150509392505050565b60006012905090565b60008061037861061c565b905061039981858561038a8589610595565b6103949190610e6a565b610624565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610e0a565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610e0a565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961061c565b905060006104978286610595565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610f10565b60405180910390fd5b6104e98286868403610624565b60019250505092915050565b60008061050061061c565b905060008311610545576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053c90610fa2565b60405180910390fd5b60006064600a856105569190610fc2565b6105609190611033565b9050600081856105709190611064565b905061057d833084610879565b610588838783610879565b6001935050505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610693576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068a9061110a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610702576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f99061119c565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107e09190610cc9565b60405180910390a3505050565b60006107f98484610595565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146108735781811015610865576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085c90611208565b60405180910390fd5b6108728484848403610624565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036108e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108df9061129a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610957576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094e9061132c565b60405180910390fd5b610962838383610aef565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156109e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109df906113be565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610ad69190610cc9565b60405180910390a3610ae9848484610af4565b50505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610b33578082015181840152602081019050610b18565b60008484015250505050565b6000601f19601f8301169050919050565b6000610b5b82610af9565b610b658185610b04565b9350610b75818560208601610b15565b610b7e81610b3f565b840191505092915050565b60006020820190508181036000830152610ba38184610b50565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610bdb82610bb0565b9050919050565b610beb81610bd0565b8114610bf657600080fd5b50565b600081359050610c0881610be2565b92915050565b6000819050919050565b610c2181610c0e565b8114610c2c57600080fd5b50565b600081359050610c3e81610c18565b92915050565b60008060408385031215610c5b57610c5a610bab565b5b6000610c6985828601610bf9565b9250506020610c7a85828601610c2f565b9150509250929050565b60008115159050919050565b610c9981610c84565b82525050565b6000602082019050610cb46000830184610c90565b92915050565b610cc381610c0e565b82525050565b6000602082019050610cde6000830184610cba565b92915050565b600080600060608486031215610cfd57610cfc610bab565b5b6000610d0b86828701610bf9565b9350506020610d1c86828701610bf9565b9250506040610d2d86828701610c2f565b9150509250925092565b600060ff82169050919050565b610d4d81610d37565b82525050565b6000602082019050610d686000830184610d44565b92915050565b600060208284031215610d8457610d83610bab565b5b6000610d9284828501610bf9565b91505092915050565b60008060408385031215610db257610db1610bab565b5b6000610dc085828601610bf9565b9250506020610dd185828601610bf9565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610e2257607f821691505b602082108103610e3557610e34610ddb565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610e7582610c0e565b9150610e8083610c0e565b9250828201905080821115610e9857610e97610e3b565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610efa602583610b04565b9150610f0582610e9e565b604082019050919050565b60006020820190508181036000830152610f2981610eed565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b6000610f8c602983610b04565b9150610f9782610f30565b604082019050919050565b60006020820190508181036000830152610fbb81610f7f565b9050919050565b6000610fcd82610c0e565b9150610fd883610c0e565b9250828202610fe681610c0e565b91508282048414831517610ffd57610ffc610e3b565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061103e82610c0e565b915061104983610c0e565b92508261105957611058611004565b5b828204905092915050565b600061106f82610c0e565b915061107a83610c0e565b925082820390508181111561109257611091610e3b565b5b92915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006110f4602483610b04565b91506110ff82611098565b604082019050919050565b60006020820190508181036000830152611123816110e7565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000611186602283610b04565b91506111918261112a565b604082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b60006111f2601d83610b04565b91506111fd826111bc565b602082019050919050565b60006020820190508181036000830152611221816111e5565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000611284602583610b04565b915061128f82611228565b604082019050919050565b600060208201905081810360008301526112b381611277565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611316602383610b04565b9150611321826112ba565b604082019050919050565b6000602082019050818103600083015261134581611309565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006113a8602683610b04565b91506113b38261134c565b604082019050919050565b600060208201905081810360008301526113d78161139b565b905091905056fea2646970667358221220a163955cd8b44c46d18ec3c2ccad0a81dbb6f9a839f8fde7ac6328ed63ead16d64736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b89565b60405180910390f35b6100e660048036038101906100e19190610c44565b610308565b6040516100f39190610c9f565b60405180910390f35b61010461032b565b6040516101119190610cc9565b60405180910390f35b610134600480360381019061012f9190610ce4565b610335565b6040516101419190610c9f565b60405180910390f35b610152610364565b60405161015f9190610d53565b60405180910390f35b610182600480360381019061017d9190610c44565b61036d565b60405161018f9190610c9f565b60405180910390f35b6101b260048036038101906101ad9190610d6e565b6103a4565b6040516101bf9190610cc9565b60405180910390f35b6101d06103ec565b6040516101dd9190610b89565b60405180910390f35b61020060048036038101906101fb9190610c44565b61047e565b60405161020d9190610c9f565b60405180910390f35b610230600480360381019061022b9190610c44565b6104f5565b60405161023d9190610c9f565b60405180910390f35b610260600480360381019061025b9190610d9b565b610595565b60405161026d9190610cc9565b60405180910390f35b60606003805461028590610e0a565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610e0a565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361061c565b9050610320818585610624565b600191505092915050565b6000600254905090565b60008061034061061c565b905061034d8582856107ed565b610358858585610879565b60019150509392505050565b60006012905090565b60008061037861061c565b905061039981858561038a8589610595565b6103949190610e6a565b610624565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610e0a565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610e0a565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961061c565b905060006104978286610595565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610f10565b60405180910390fd5b6104e98286868403610624565b60019250505092915050565b60008061050061061c565b905060008311610545576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053c90610fa2565b60405180910390fd5b60006064600a856105569190610fc2565b6105609190611033565b9050600081856105709190611064565b905061057d833084610879565b610588838783610879565b6001935050505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610693576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068a9061110a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610702576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f99061119c565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107e09190610cc9565b60405180910390a3505050565b60006107f98484610595565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146108735781811015610865576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085c90611208565b60405180910390fd5b6108728484848403610624565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036108e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108df9061129a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610957576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094e9061132c565b60405180910390fd5b610962838383610aef565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156109e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109df906113be565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610ad69190610cc9565b60405180910390a3610ae9848484610af4565b50505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610b33578082015181840152602081019050610b18565b60008484015250505050565b6000601f19601f8301169050919050565b6000610b5b82610af9565b610b658185610b04565b9350610b75818560208601610b15565b610b7e81610b3f565b840191505092915050565b60006020820190508181036000830152610ba38184610b50565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610bdb82610bb0565b9050919050565b610beb81610bd0565b8114610bf657600080fd5b50565b600081359050610c0881610be2565b92915050565b6000819050919050565b610c2181610c0e565b8114610c2c57600080fd5b50565b600081359050610c3e81610c18565b92915050565b60008060408385031215610c5b57610c5a610bab565b5b6000610c6985828601610bf9565b9250506020610c7a85828601610c2f565b9150509250929050565b60008115159050919050565b610c9981610c84565b82525050565b6000602082019050610cb46000830184610c90565b92915050565b610cc381610c0e565b82525050565b6000602082019050610cde6000830184610cba565b92915050565b600080600060608486031215610cfd57610cfc610bab565b5b6000610d0b86828701610bf9565b9350506020610d1c86828701610bf9565b9250506040610d2d86828701610c2f565b9150509250925092565b600060ff82169050919050565b610d4d81610d37565b82525050565b6000602082019050610d686000830184610d44565b92915050565b600060208284031215610d8457610d83610bab565b5b6000610d9284828501610bf9565b91505092915050565b60008060408385031215610db257610db1610bab565b5b6000610dc085828601610bf9565b9250506020610dd185828601610bf9565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610e2257607f821691505b602082108103610e3557610e34610ddb565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610e7582610c0e565b9150610e8083610c0e565b9250828201905080821115610e9857610e97610e3b565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610efa602583610b04565b9150610f0582610e9e565b604082019050919050565b60006020820190508181036000830152610f2981610eed565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b6000610f8c602983610b04565b9150610f9782610f30565b604082019050919050565b60006020820190508181036000830152610fbb81610f7f565b9050919050565b6000610fcd82610c0e565b9150610fd883610c0e565b9250828202610fe681610c0e565b91508282048414831517610ffd57610ffc610e3b565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061103e82610c0e565b915061104983610c0e565b92508261105957611058611004565b5b828204905092915050565b600061106f82610c0e565b915061107a83610c0e565b925082820390508181111561109257611091610e3b565b5b92915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006110f4602483610b04565b91506110ff82611098565b604082019050919050565b60006020820190508181036000830152611123816110e7565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000611186602283610b04565b91506111918261112a565b604082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b60006111f2601d83610b04565b91506111fd826111bc565b602082019050919050565b60006020820190508181036000830152611221816111e5565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000611284602583610b04565b915061128f82611228565b604082019050919050565b600060208201905081810360008301526112b381611277565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611316602383610b04565b9150611321826112ba565b604082019050919050565b6000602082019050818103600083015261134581611309565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006113a8602683610b04565b91506113b38261134c565b604082019050919050565b600060208201905081810360008301526113d78161139b565b905091905056fea2646970667358221220a163955cd8b44c46d18ec3c2ccad0a81dbb6f9a839f8fde7ac6328ed63ead16d64736f6c63430008180033", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162001c7b38038062001c7b833981810160405281019062000037919062000385565b818181600390816200004a919062000655565b5080600490816200005c919062000655565b50505062000073336103e86200007b60201b60201c565b505062000857565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603620000ed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000e4906200079d565b60405180910390fd5b6200010160008383620001e860201b60201c565b8060026000828254620001159190620007ee565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620001c891906200083a565b60405180910390a3620001e460008383620001ed60201b60201c565b5050565b505050565b505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200025b8262000210565b810181811067ffffffffffffffff821117156200027d576200027c62000221565b5b80604052505050565b600062000292620001f2565b9050620002a0828262000250565b919050565b600067ffffffffffffffff821115620002c357620002c262000221565b5b620002ce8262000210565b9050602081019050919050565b60005b83811015620002fb578082015181840152602081019050620002de565b60008484015250505050565b60006200031e6200031884620002a5565b62000286565b9050828152602081018484840111156200033d576200033c6200020b565b5b6200034a848285620002db565b509392505050565b600082601f8301126200036a576200036962000206565b5b81516200037c84826020860162000307565b91505092915050565b600080604083850312156200039f576200039e620001fc565b5b600083015167ffffffffffffffff811115620003c057620003bf62000201565b5b620003ce8582860162000352565b925050602083015167ffffffffffffffff811115620003f257620003f162000201565b5b620004008582860162000352565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200045d57607f821691505b60208210810362000473576200047262000415565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620004dd7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200049e565b620004e986836200049e565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b600062000536620005306200052a8462000501565b6200050b565b62000501565b9050919050565b6000819050919050565b620005528362000515565b6200056a62000561826200053d565b848454620004ab565b825550505050565b600090565b6200058162000572565b6200058e81848462000547565b505050565b5b81811015620005b657620005aa60008262000577565b60018101905062000594565b5050565b601f8211156200060557620005cf8162000479565b620005da846200048e565b81016020851015620005ea578190505b62000602620005f9856200048e565b83018262000593565b50505b505050565b600082821c905092915050565b60006200062a600019846008026200060a565b1980831691505092915050565b600062000645838362000617565b9150826002028217905092915050565b62000660826200040a565b67ffffffffffffffff8111156200067c576200067b62000221565b5b62000688825462000444565b62000695828285620005ba565b600060209050601f831160018114620006cd5760008415620006b8578287015190505b620006c4858262000637565b86555062000734565b601f198416620006dd8662000479565b60005b828110156200070757848901518255600182019150602085019450602081019050620006e0565b8683101562000727578489015162000723601f89168262000617565b8355505b6001600288020188555050505b505050505050565b600082825260208201905092915050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b600062000785601f836200073c565b915062000792826200074d565b602082019050919050565b60006020820190508181036000830152620007b88162000776565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000620007fb8262000501565b9150620008088362000501565b9250828201905080821115620008235762000822620007bf565b5b92915050565b620008348162000501565b82525050565b600060208201905062000851600083018462000829565b92915050565b61141480620008676000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b89565b60405180910390f35b6100e660048036038101906100e19190610c44565b610308565b6040516100f39190610c9f565b60405180910390f35b61010461032b565b6040516101119190610cc9565b60405180910390f35b610134600480360381019061012f9190610ce4565b610335565b6040516101419190610c9f565b60405180910390f35b610152610364565b60405161015f9190610d53565b60405180910390f35b610182600480360381019061017d9190610c44565b61036d565b60405161018f9190610c9f565b60405180910390f35b6101b260048036038101906101ad9190610d6e565b6103a4565b6040516101bf9190610cc9565b60405180910390f35b6101d06103ec565b6040516101dd9190610b89565b60405180910390f35b61020060048036038101906101fb9190610c44565b61047e565b60405161020d9190610c9f565b60405180910390f35b610230600480360381019061022b9190610c44565b6104f5565b60405161023d9190610c9f565b60405180910390f35b610260600480360381019061025b9190610d9b565b610595565b60405161026d9190610cc9565b60405180910390f35b60606003805461028590610e0a565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610e0a565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361061c565b9050610320818585610624565b600191505092915050565b6000600254905090565b60008061034061061c565b905061034d8582856107ed565b610358858585610879565b60019150509392505050565b60006012905090565b60008061037861061c565b905061039981858561038a8589610595565b6103949190610e6a565b610624565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610e0a565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610e0a565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961061c565b905060006104978286610595565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610f10565b60405180910390fd5b6104e98286868403610624565b60019250505092915050565b60008061050061061c565b905060008311610545576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053c90610fa2565b60405180910390fd5b60006064600a856105569190610fc2565b6105609190611033565b9050600081856105709190611064565b905061057d833084610879565b610588838783610879565b6001935050505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610693576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068a9061110a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610702576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f99061119c565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107e09190610cc9565b60405180910390a3505050565b60006107f98484610595565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146108735781811015610865576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085c90611208565b60405180910390fd5b6108728484848403610624565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036108e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108df9061129a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610957576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094e9061132c565b60405180910390fd5b610962838383610aef565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156109e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109df906113be565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610ad69190610cc9565b60405180910390a3610ae9848484610af4565b50505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610b33578082015181840152602081019050610b18565b60008484015250505050565b6000601f19601f8301169050919050565b6000610b5b82610af9565b610b658185610b04565b9350610b75818560208601610b15565b610b7e81610b3f565b840191505092915050565b60006020820190508181036000830152610ba38184610b50565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610bdb82610bb0565b9050919050565b610beb81610bd0565b8114610bf657600080fd5b50565b600081359050610c0881610be2565b92915050565b6000819050919050565b610c2181610c0e565b8114610c2c57600080fd5b50565b600081359050610c3e81610c18565b92915050565b60008060408385031215610c5b57610c5a610bab565b5b6000610c6985828601610bf9565b9250506020610c7a85828601610c2f565b9150509250929050565b60008115159050919050565b610c9981610c84565b82525050565b6000602082019050610cb46000830184610c90565b92915050565b610cc381610c0e565b82525050565b6000602082019050610cde6000830184610cba565b92915050565b600080600060608486031215610cfd57610cfc610bab565b5b6000610d0b86828701610bf9565b9350506020610d1c86828701610bf9565b9250506040610d2d86828701610c2f565b9150509250925092565b600060ff82169050919050565b610d4d81610d37565b82525050565b6000602082019050610d686000830184610d44565b92915050565b600060208284031215610d8457610d83610bab565b5b6000610d9284828501610bf9565b91505092915050565b60008060408385031215610db257610db1610bab565b5b6000610dc085828601610bf9565b9250506020610dd185828601610bf9565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610e2257607f821691505b602082108103610e3557610e34610ddb565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610e7582610c0e565b9150610e8083610c0e565b9250828201905080821115610e9857610e97610e3b565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610efa602583610b04565b9150610f0582610e9e565b604082019050919050565b60006020820190508181036000830152610f2981610eed565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b6000610f8c602983610b04565b9150610f9782610f30565b604082019050919050565b60006020820190508181036000830152610fbb81610f7f565b9050919050565b6000610fcd82610c0e565b9150610fd883610c0e565b9250828202610fe681610c0e565b91508282048414831517610ffd57610ffc610e3b565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061103e82610c0e565b915061104983610c0e565b92508261105957611058611004565b5b828204905092915050565b600061106f82610c0e565b915061107a83610c0e565b925082820390508181111561109257611091610e3b565b5b92915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006110f4602483610b04565b91506110ff82611098565b604082019050919050565b60006020820190508181036000830152611123816110e7565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000611186602283610b04565b91506111918261112a565b604082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b60006111f2601d83610b04565b91506111fd826111bc565b602082019050919050565b60006020820190508181036000830152611221816111e5565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000611284602583610b04565b915061128f82611228565b604082019050919050565b600060208201905081810360008301526112b381611277565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611316602383610b04565b9150611321826112ba565b604082019050919050565b6000602082019050818103600083015261134581611309565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006113a8602683610b04565b91506113b38261134c565b604082019050919050565b600060208201905081810360008301526113d78161139b565b905091905056fea2646970667358221220318130c53e58bcb5f81e7bc21c029505e0025bef1e0d5fa41d686d55a65328ba64736f6c63430008180033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b89565b60405180910390f35b6100e660048036038101906100e19190610c44565b610308565b6040516100f39190610c9f565b60405180910390f35b61010461032b565b6040516101119190610cc9565b60405180910390f35b610134600480360381019061012f9190610ce4565b610335565b6040516101419190610c9f565b60405180910390f35b610152610364565b60405161015f9190610d53565b60405180910390f35b610182600480360381019061017d9190610c44565b61036d565b60405161018f9190610c9f565b60405180910390f35b6101b260048036038101906101ad9190610d6e565b6103a4565b6040516101bf9190610cc9565b60405180910390f35b6101d06103ec565b6040516101dd9190610b89565b60405180910390f35b61020060048036038101906101fb9190610c44565b61047e565b60405161020d9190610c9f565b60405180910390f35b610230600480360381019061022b9190610c44565b6104f5565b60405161023d9190610c9f565b60405180910390f35b610260600480360381019061025b9190610d9b565b610595565b60405161026d9190610cc9565b60405180910390f35b60606003805461028590610e0a565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610e0a565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361061c565b9050610320818585610624565b600191505092915050565b6000600254905090565b60008061034061061c565b905061034d8582856107ed565b610358858585610879565b60019150509392505050565b60006012905090565b60008061037861061c565b905061039981858561038a8589610595565b6103949190610e6a565b610624565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610e0a565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610e0a565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961061c565b905060006104978286610595565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610f10565b60405180910390fd5b6104e98286868403610624565b60019250505092915050565b60008061050061061c565b905060008311610545576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053c90610fa2565b60405180910390fd5b60006064600a856105569190610fc2565b6105609190611033565b9050600081856105709190611064565b905061057d833084610879565b610588838783610879565b6001935050505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610693576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068a9061110a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610702576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f99061119c565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107e09190610cc9565b60405180910390a3505050565b60006107f98484610595565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146108735781811015610865576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085c90611208565b60405180910390fd5b6108728484848403610624565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036108e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108df9061129a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610957576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094e9061132c565b60405180910390fd5b610962838383610aef565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156109e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109df906113be565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610ad69190610cc9565b60405180910390a3610ae9848484610af4565b50505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610b33578082015181840152602081019050610b18565b60008484015250505050565b6000601f19601f8301169050919050565b6000610b5b82610af9565b610b658185610b04565b9350610b75818560208601610b15565b610b7e81610b3f565b840191505092915050565b60006020820190508181036000830152610ba38184610b50565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610bdb82610bb0565b9050919050565b610beb81610bd0565b8114610bf657600080fd5b50565b600081359050610c0881610be2565b92915050565b6000819050919050565b610c2181610c0e565b8114610c2c57600080fd5b50565b600081359050610c3e81610c18565b92915050565b60008060408385031215610c5b57610c5a610bab565b5b6000610c6985828601610bf9565b9250506020610c7a85828601610c2f565b9150509250929050565b60008115159050919050565b610c9981610c84565b82525050565b6000602082019050610cb46000830184610c90565b92915050565b610cc381610c0e565b82525050565b6000602082019050610cde6000830184610cba565b92915050565b600080600060608486031215610cfd57610cfc610bab565b5b6000610d0b86828701610bf9565b9350506020610d1c86828701610bf9565b9250506040610d2d86828701610c2f565b9150509250925092565b600060ff82169050919050565b610d4d81610d37565b82525050565b6000602082019050610d686000830184610d44565b92915050565b600060208284031215610d8457610d83610bab565b5b6000610d9284828501610bf9565b91505092915050565b60008060408385031215610db257610db1610bab565b5b6000610dc085828601610bf9565b9250506020610dd185828601610bf9565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610e2257607f821691505b602082108103610e3557610e34610ddb565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610e7582610c0e565b9150610e8083610c0e565b9250828201905080821115610e9857610e97610e3b565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610efa602583610b04565b9150610f0582610e9e565b604082019050919050565b60006020820190508181036000830152610f2981610eed565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b6000610f8c602983610b04565b9150610f9782610f30565b604082019050919050565b60006020820190508181036000830152610fbb81610f7f565b9050919050565b6000610fcd82610c0e565b9150610fd883610c0e565b9250828202610fe681610c0e565b91508282048414831517610ffd57610ffc610e3b565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061103e82610c0e565b915061104983610c0e565b92508261105957611058611004565b5b828204905092915050565b600061106f82610c0e565b915061107a83610c0e565b925082820390508181111561109257611091610e3b565b5b92915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006110f4602483610b04565b91506110ff82611098565b604082019050919050565b60006020820190508181036000830152611123816110e7565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000611186602283610b04565b91506111918261112a565b604082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b60006111f2601d83610b04565b91506111fd826111bc565b602082019050919050565b60006020820190508181036000830152611221816111e5565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000611284602583610b04565b915061128f82611228565b604082019050919050565b600060208201905081810360008301526112b381611277565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611316602383610b04565b9150611321826112ba565b604082019050919050565b6000602082019050818103600083015261134581611309565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006113a8602683610b04565b91506113b38261134c565b604082019050919050565b600060208201905081810360008301526113d78161139b565b905091905056fea2646970667358221220318130c53e58bcb5f81e7bc21c029505e0025bef1e0d5fa41d686d55a65328ba64736f6c63430008180033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/x/evm/embeds/contracts/TestERC20.sol b/x/evm/embeds/contracts/TestERC20.sol index bea532843..9d9d8153c 100644 --- a/x/evm/embeds/contracts/TestERC20.sol +++ b/x/evm/embeds/contracts/TestERC20.sol @@ -2,12 +2,11 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract TestERC20 is ERC20 { - // Define the supply of TestERC20: 1,000,000 - uint256 constant initialSupply = 1000000 * (10**18); + uint256 constant initialSupply = 1000000 * (10 ** 18); // Constructor will be called on contract creation constructor() ERC20("TestERC20", "FOO") { diff --git a/x/evm/embeds/contracts/TestERC20InvalidFunction.sol b/x/evm/embeds/contracts/TestERC20InvalidFunction.sol new file mode 100644 index 000000000..eb002aa7a --- /dev/null +++ b/x/evm/embeds/contracts/TestERC20InvalidFunction.sol @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) + +pragma solidity ^0.8.0; + +contract TestERC20InvalidFunction { + mapping(address => uint256) private _balances; + + mapping(address => mapping(address => uint256)) private _allowances; + + uint256 private _totalSupply; + + string private _name; + string private _symbol; + + /** + * @dev Sets the values for {name} and {symbol}. + * + * All two of these values are immutable: they can only be set once during + * construction. + */ + constructor(string memory name_, string memory symbol_, uint8 decimals_) { + if (decimals_ == 0) { + // just to silence warnings + _totalSupply = 0; + } + _name = name_; + _symbol = symbol_; + } + + /** + * @dev Returns the name of the token. + */ + function name() public view virtual returns (string memory) { + return _name; + } + + function symbol() public view virtual returns (string memory) { + return _symbol; + } + + function decimals() public view virtual returns (uint8) { + return 18; + } + + function totalSupply() public view virtual returns (uint256) { + return _totalSupply; + } + + /** + * @dev See {IERC20-balanceOf}. + */ + function balanceOf(address account) public view virtual returns (uint256) { + return _balances[account]; + } + + /** + * @dev See {IERC20-transfer}. + * + * Requirements: + * + * - `to` cannot be the zero address. + */ + function transfer(address to) public virtual returns (bool) { + if (to == address(0)) { + // just to silence warnings + return false; + } + _transfer(); + return true; + } + + /** + * @dev Moves `amount` of tokens from `from` to `to`. + * + * This internal function is equivalent to {transfer}, and can be used to + * e.g. implement automatic token fees, slashing mechanisms, etc. + * + * Emits a {Transfer} event. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `from` must have a balance of at least `amount`. + */ + function _transfer() internal virtual returns (bool) { + return true; + } +} diff --git a/x/evm/embeds/contracts/TestERC20MaliciousTransfer.sol b/x/evm/embeds/contracts/TestERC20MaliciousTransfer.sol index 07fc63699..477af9f56 100644 --- a/x/evm/embeds/contracts/TestERC20MaliciousTransfer.sol +++ b/x/evm/embeds/contracts/TestERC20MaliciousTransfer.sol @@ -4,12 +4,18 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract TestERC20MaliciousTransfer is ERC20 { - constructor(string memory name, string memory symbol, uint8 decimals_) - ERC20(name, symbol) { - _mint(msg.sender, 1000000 * 10**18); + constructor( + string memory name, + string memory symbol, + uint8 decimals_ + ) ERC20(name, symbol) { + _mint(msg.sender, 1000000 * 10 ** 18); } - function transfer(address recipient, uint256 amount) public virtual override returns (bool) { + function transfer( + address recipient, + uint256 amount + ) public virtual override returns (bool) { _gasIntensiveOperation(); return super.transfer(recipient, amount); } @@ -26,4 +32,4 @@ contract TestERC20MaliciousTransfer is ERC20 { // The result is not used, ensuring the compiler doesn't optimize this away assert(result != 0); } -} \ No newline at end of file +} diff --git a/x/evm/embeds/contracts/TestERC20MissingFunction.sol b/x/evm/embeds/contracts/TestERC20MissingFunction.sol new file mode 100644 index 000000000..9afb575e9 --- /dev/null +++ b/x/evm/embeds/contracts/TestERC20MissingFunction.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) + +pragma solidity ^0.8.0; + +contract TestERC20MissingFunction { + mapping(address => uint256) private _balances; + + mapping(address => mapping(address => uint256)) private _allowances; + + uint256 private _totalSupply; + + string private _name; + string private _symbol; + + /** + * @dev Sets the values for {name} and {symbol}. + * + * All two of these values are immutable: they can only be set once during + * construction. + */ + constructor(string memory name, string memory symbol, uint8 decimals_) { + _name = name; + _symbol = symbol; + } + + /** + * @dev Returns the name of the token. + */ + function name() public view virtual returns (string memory) { + return _name; + } + + function symbol() public view virtual returns (string memory) { + return _symbol; + } + + function decimals() public view virtual returns (uint8) { + return 18; + } + + function totalSupply() public view virtual returns (uint256) { + return _totalSupply; + } + + // /** + // * @dev See {IERC20-balanceOf}. + // */ + // function balanceOf( + // address account + // ) public view virtual override returns (uint256) { + // return _balances[account]; + // } + + /** + * @dev See {IERC20-transfer}. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - the caller must have a balance of at least `amount`. + */ + function transfer( + address to, + uint256 amount + ) public virtual returns (bool) { + _transfer(); + return true; + } + + /** + * @dev Moves `amount` of tokens from `from` to `to`. + * + * This internal function is equivalent to {transfer}, and can be used to + * e.g. implement automatic token fees, slashing mechanisms, etc. + * + * Emits a {Transfer} event. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `from` must have a balance of at least `amount`. + */ + function _transfer() internal virtual returns (bool) { + return true; + } +} diff --git a/x/evm/embeds/contracts/TestERC20TransferWithFee.sol b/x/evm/embeds/contracts/TestERC20TransferWithFee.sol index e70234e32..907d13636 100644 --- a/x/evm/embeds/contracts/TestERC20TransferWithFee.sol +++ b/x/evm/embeds/contracts/TestERC20TransferWithFee.sol @@ -6,12 +6,14 @@ import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract TestERC20TransferWithFee is ERC20 { uint256 constant FEE_PERCENTAGE = 10; - constructor(string memory name, string memory symbol) - ERC20(name, symbol) { + constructor(string memory name, string memory symbol) ERC20(name, symbol) { _mint(msg.sender, 1000); } - function transfer(address to, uint256 amount) public virtual override returns (bool) { + function transfer( + address to, + uint256 amount + ) public virtual override returns (bool) { address owner = _msgSender(); require(amount > 0, "Transfer amount must be greater than zero"); diff --git a/x/evm/embeds/embeds.go b/x/evm/embeds/embeds.go index 1f0763311..32995f2ae 100644 --- a/x/evm/embeds/embeds.go +++ b/x/evm/embeds/embeds.go @@ -29,6 +29,10 @@ var ( testErc20MaliciousNameJson []byte //go:embed artifacts/contracts/TestERC20MaliciousTransfer.sol/TestERC20MaliciousTransfer.json testErc20MaliciousTransferJson []byte + //go:embed artifacts/contracts/TestERC20MissingFunction.sol/TestERC20MissingFunction.json + testErc20MissingFunctionJson []byte + //go:embed artifacts/contracts/TestERC20InvalidFunction.sol/TestERC20InvalidFunction.json + testERC20InvalidFunction []byte //go:embed artifacts/contracts/TestFunTokenPrecompileLocalGas.sol/TestFunTokenPrecompileLocalGas.json testFunTokenPrecompileLocalGasJson []byte //go:embed artifacts/contracts/TestERC20TransferThenPrecompileSend.sol/TestERC20TransferThenPrecompileSend.json @@ -98,6 +102,19 @@ var ( Name: "TestERC20MaliciousTransfer.sol", EmbedJSON: testErc20MaliciousTransferJson, } + // SmartContract_TestERC20MissingFunction is a test contract + // which simulates malicious ERC20 behavior by missing the balanceOf function + SmartContract_TestERC20MissingFunction = CompiledEvmContract{ + Name: "TestERC20MissingFunction.sol", + EmbedJSON: testErc20MissingFunctionJson, + } + // SmartContract_TestERC20InvalidFunction is a test contract + // which simulates malicious ERC20 behavior by adding an invalid transfer + // function with no `amount` parameter + SmartContract_TestERC20InvalidFunction = CompiledEvmContract{ + Name: "TestERC20InvalidFunction.sol", + EmbedJSON: testERC20InvalidFunction, + } // SmartContract_TestFunTokenPrecompileLocalGas is a test contract // which allows precompile execution with custom local gas set (calling precompile within contract) SmartContract_TestFunTokenPrecompileLocalGas = CompiledEvmContract{ @@ -178,6 +195,8 @@ func init() { SmartContract_TestERC20.MustLoad() SmartContract_TestERC20MaliciousName.MustLoad() SmartContract_TestERC20MaliciousTransfer.MustLoad() + SmartContract_TestERC20MissingFunction.MustLoad() + SmartContract_TestERC20InvalidFunction.MustLoad() SmartContract_TestFunTokenPrecompileLocalGas.MustLoad() SmartContract_TestNativeSendThenPrecompileSendJson.MustLoad() SmartContract_TestERC20TransferThenPrecompileSend.MustLoad() diff --git a/x/evm/embeds/embeds_test.go b/x/evm/embeds/embeds_test.go index 37039e124..1353d77db 100644 --- a/x/evm/embeds/embeds_test.go +++ b/x/evm/embeds/embeds_test.go @@ -16,6 +16,8 @@ func TestLoadContracts(t *testing.T) { embeds.SmartContract_TestERC20.MustLoad() embeds.SmartContract_TestERC20MaliciousName.MustLoad() embeds.SmartContract_TestERC20MaliciousTransfer.MustLoad() + embeds.SmartContract_TestERC20MissingFunction.MustLoad() + embeds.SmartContract_TestERC20InvalidFunction.MustLoad() embeds.SmartContract_TestFunTokenPrecompileLocalGas.MustLoad() embeds.SmartContract_TestNativeSendThenPrecompileSendJson.MustLoad() embeds.SmartContract_TestERC20TransferThenPrecompileSend.MustLoad() diff --git a/x/evm/keeper/funtoken_from_erc20.go b/x/evm/keeper/funtoken_from_erc20.go index 36c071768..c9f743c80 100644 --- a/x/evm/keeper/funtoken_from_erc20.go +++ b/x/evm/keeper/funtoken_from_erc20.go @@ -100,9 +100,10 @@ type ( // This function performs the following steps: // 1. Checks if the ERC20 token is already registered as a FunToken. // 2. Retrieves the metadata of the existing ERC20 token. -// 3. Verifies that the corresponding bank coin denom is not already registered. -// 4. Sets the bank coin denom metadata in the state. -// 5. Creates and inserts the new FunToken mapping. +// 3. Verifies that the ERC20 token include expected functions. +// 4. Verifies that the corresponding bank coin denom is not already registered. +// 5. Sets the bank coin denom metadata in the state. +// 6. Creates and inserts the new FunToken mapping. // // Parameters: // - ctx: The SDK context for the transaction. @@ -156,7 +157,13 @@ func (k *Keeper) createFunTokenFromERC20( bankDenom := fmt.Sprintf("erc20/%s", erc20.String()) - // 3 | Coin already registered with FunToken? + // 3 | Verify that the ERC20 token include expected functions + abi := embeds.SmartContract_ERC20Minter.ABI + if err := k.checkErc20ImplementsAllRequired(ctx, erc20, abi); err != nil { + return funtoken, err + } + + // 4 | Coin already registered with FunToken? _, isFound := k.Bank.GetDenomMetaData(ctx, bankDenom) if isFound { return nil, fmt.Errorf("bank coin denom already registered with denom \"%s\"", bankDenom) @@ -165,7 +172,7 @@ func (k *Keeper) createFunTokenFromERC20( return nil, fmt.Errorf("funtoken mapping already created for bank denom \"%s\"", bankDenom) } - // 4 | Set bank coin denom metadata in state + // 5 | Set bank coin denom metadata in state bankMetadata := erc20Info.ToBankMetadata(bankDenom, erc20) err = bankMetadata.Validate() @@ -174,7 +181,7 @@ func (k *Keeper) createFunTokenFromERC20( } k.Bank.SetDenomMetaData(ctx, bankMetadata) - // 5 | Officially create the funtoken mapping + // 6 | Officially create the funtoken mapping funtoken = &evm.FunToken{ Erc20Addr: eth.EIP55Addr{ Address: erc20, @@ -193,6 +200,44 @@ func (k *Keeper) createFunTokenFromERC20( ) } +func (k Keeper) checkErc20ImplementsAllRequired( + ctx sdk.Context, erc20Addr gethcommon.Address, abi *gethabi.ABI, +) error { + methodNames := []string{ + "balanceOf", + "transfer", + "symbol", + "decimals", + "name", + "totalSupply", + } + + for _, methodName := range methodNames { + fmt.Println("@@@@@@@@@@@@@@@@@@@@@@@@ Checking method: ", methodName) + method, ok := abi.Methods[methodName] + if !ok { + fmt.Println( + "method not found in contract at ", + methodName, + erc20Addr.Hex(), + ) + return fmt.Errorf("method '%s' not found in contract at %s", methodName, erc20Addr.Hex()) + } + fmt.Println("@@@@@@@@@@@@@@@@@@@@@@@@ asking: ", methodName) + hasMethod, err := k.HasMethodInContract(ctx, erc20Addr, method) + if err != nil { + fmt.Println("method not found in contract at \n", methodName, erc20Addr.Hex()) + return err + } + if !hasMethod { + fmt.Println("method not found in contract at \n", methodName, erc20Addr.Hex()) + return fmt.Errorf("method '%s' not found in contract at %s", methodName, erc20Addr.Hex()) + } + fmt.Println("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Method found: ", methodName) + } + return nil +} + // ToBankMetadata produces the "bank.Metadata" corresponding to a FunToken // mapping created from an ERC20 token. // diff --git a/x/evm/keeper/funtoken_from_erc20_test.go b/x/evm/keeper/funtoken_from_erc20_test.go index 86960a2f3..0abdf9971 100644 --- a/x/evm/keeper/funtoken_from_erc20_test.go +++ b/x/evm/keeper/funtoken_from_erc20_test.go @@ -442,43 +442,91 @@ func (s *FunTokenFromErc20Suite) TestFunTokenInfiniteRecursionERC20() { Sender: deps.Sender.NibiruAddr.String(), }, ) - s.Require().NoError(err) + // Can't create since the gas cap will be reached for transfer function + s.Require().Error(err) + s.Require().ErrorContains(err, "method 'transfer' not found in contract") +} + +// TestFunTokenMissingBalanceOfFunction creates a funtoken with a contract +// missing the `balanceOf` function +func (s *FunTokenFromErc20Suite) TestFunTokenMissingBalanceOfFunction() { + deps := evmtest.NewTestDeps() - s.T().Log("happy: call attackBalance()") - contractInput, err := embeds.SmartContract_TestInfiniteRecursionERC20.ABI.Pack("attackBalance") + s.T().Log("Deploy Missing Function ERC20") + metadata := keeper.ERC20Metadata{ + Name: "erc20name", + Symbol: "TOKEN", + Decimals: 18, + } + deployResp, err := evmtest.DeployContract( + &deps, embeds.SmartContract_TestERC20MissingFunction, + metadata.Name, metadata.Symbol, metadata.Decimals, + ) s.Require().NoError(err) - evmObj, _ := deps.NewEVM() - evmResp, err := deps.EvmKeeper.CallContractWithInput( + + erc20Addr := eth.EIP55Addr{ + Address: deployResp.ContractAddr, + } + + s.T().Log("happy: CreateFunToken for ERC20 with infinite recursion") + s.Require().NoError(testapp.FundAccount( + deps.App.BankKeeper, deps.Ctx, - evmObj, - deps.Sender.EthAddr, /*from*/ - &erc20Addr.Address, /*to*/ - false, /*commit*/ - contractInput, - 10_000_000, + deps.Sender.NibiruAddr, + deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), + )) + + _, err = deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromErc20: &erc20Addr, + Sender: deps.Sender.NibiruAddr.String(), + }, ) - s.Require().NoError(err) - s.Require().NotZero(evmResp.GasUsed) - s.Require().NotZero(deps.Ctx.GasMeter().GasConsumed()) - s.Require().Greater(deps.Ctx.GasMeter().GasConsumed(), evmResp.GasUsed) + // Can't create since the balanceOf functions are missing + s.Require().Error(err) + s.Require().ErrorContains(err, "method 'balanceOf' not found in contract") +} + +// TestFunTokenInvalidFunction creates a funtoken with a contract +// having the `transfer` function with no amount parameter +func (s *FunTokenFromErc20Suite) TestFunTokenInvalidFunction() { + deps := evmtest.NewTestDeps() - s.T().Log("sad: call attackTransfer()") - contractInput, err = embeds.SmartContract_TestInfiniteRecursionERC20.ABI.Pack("attackTransfer") + s.T().Log("Deploy Invalid Function ERC20") + metadata := keeper.ERC20Metadata{ + Name: "erc20name", + Symbol: "TOKEN", + Decimals: 18, + } + deployResp, err := evmtest.DeployContract( + &deps, embeds.SmartContract_TestERC20InvalidFunction, + metadata.Name, metadata.Symbol, metadata.Decimals, + ) s.Require().NoError(err) - evmObj, _ = deps.NewEVM() - evmResp, err = deps.EvmKeeper.CallContractWithInput( + + erc20Addr := eth.EIP55Addr{ + Address: deployResp.ContractAddr, + } + + s.T().Log("happy: CreateFunToken for ERC20 with infinite recursion") + s.Require().NoError(testapp.FundAccount( + deps.App.BankKeeper, deps.Ctx, - evmObj, - deps.Sender.EthAddr, /*from*/ - &erc20Addr.Address, /*to*/ - true, /*commit*/ - contractInput, - 10_000_000, + deps.Sender.NibiruAddr, + deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), + )) + + _, err = deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromErc20: &erc20Addr, + Sender: deps.Sender.NibiruAddr.String(), + }, ) - s.Require().ErrorContains(err, "execution reverted") - s.Require().NotZero(evmResp.GasUsed) - s.Require().NotZero(deps.Ctx.GasMeter().GasConsumed()) - s.Require().Greater(deps.Ctx.GasMeter().GasConsumed(), evmResp.GasUsed) + // Can't create since the transfer are invalid + s.Require().Error(err) + s.Require().ErrorContains(err, "method 'transfer' not found in contract") } // TestSendERC20WithFee creates a funtoken from a malicious contract which charges a 10% fee on any transfer. diff --git a/x/evm/keeper/validate_contract.go b/x/evm/keeper/validate_contract.go new file mode 100644 index 000000000..ff4f53f56 --- /dev/null +++ b/x/evm/keeper/validate_contract.go @@ -0,0 +1,112 @@ +package keeper + +import ( + "context" + "encoding/json" + "fmt" + "math/big" + "strings" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + + "github.com/NibiruChain/nibiru/v2/x/evm" +) + +// HasMethodInContract does a staticcall with the given `method`'s selector + dummy args. +// If the call reverts with something like "function selector not recognized", returns false. +// +// In your real code, this likely needs to invoke `k.evmKeeper.CallEVM` or similar. +func (k Keeper) HasMethodInContract( + goCtx context.Context, + contractAddr common.Address, + method abi.Method, +) (bool, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // 1. Build input (4-byte selector + encoded args). + // We choose dummy arguments based on the method signature. + // For example, if method = "balanceOf(address)", we pass a zero address or some known address. + // For method = "transfer(address,uint256)", pass a dummy address and zero uint256, etc. + // + // To illustrate, let's say we pass "0x000000000000000000000000000000000000dEaD" for addresses, + // and 0 for all numeric arguments. This is *just* for signature detection. + dummyArgs := make([]interface{}, len(method.Inputs)) + for i, inputDef := range method.Inputs { + switch inputDef.Type.T { + case abi.AddressTy: + dummyArgs[i] = common.HexToAddress("0x000000000000000000000000000000000000dEaD") + case abi.UintTy, abi.IntTy: + dummyArgs[i] = big.NewInt(0) + case abi.BoolTy: + dummyArgs[i] = false + case abi.StringTy: + dummyArgs[i] = "" + default: + // For any types you don't specifically handle, either supply some default + // or handle them according to what your use case needs. + dummyArgs[i] = nil + } + } + + input, err := method.Inputs.Pack(dummyArgs...) + if err != nil { + return false, fmt.Errorf("packing dummy args: %w", err) + } + + // Prepend the 4-byte method selector + sig := method.ID + callData := append(sig, input...) + + // 2. Make a call message + callMsg := evm.JsonTxArgs{ + From: &contractAddr, + To: &contractAddr, + Input: (*hexutil.Bytes)(&callData), + } + + jsonTxArgs, err := json.Marshal(&callMsg) + if err != nil { + return false, fmt.Errorf("marshaling call message: %w", err) + } + + ethCallRequest := evm.EthCallRequest{ + Args: jsonTxArgs, + // This gas cap is big enough, if out of gas, something is suspicious + // in the transfer function. + GasCap: 690000000000000000, + ProposerAddress: sdk.ConsAddress(ctx.BlockHeader().ProposerAddress), + ChainId: k.EthChainID(ctx).Int64(), + } + + _, err = k.EstimateGasForEvmCallType(goCtx, ðCallRequest, evm.CallTypeRPC) + + if err == nil { + return true, nil + } + + if strings.Contains(err.Error(), "Estimate gas VMError: execution reverted, but unable to parse reason") { + return false, nil + } + return true, nil +} + +// checkAllMethods ensure the contract at `contractAddr` has all the methods in `abiMethods`. +func (k Keeper) CheckAllMethods( + ctx context.Context, + contractAddr common.Address, + abiMethods []abi.Method, +) error { + for name, method := range abiMethods { + hasMethod, err := k.HasMethodInContract(ctx, contractAddr, method) + if err != nil { + return err + } + if !hasMethod { + return fmt.Errorf("Method %q not found in contract at %s", name, contractAddr) + } + } + return nil +} diff --git a/x/evm/keeper/validate_contract_test.go b/x/evm/keeper/validate_contract_test.go new file mode 100644 index 000000000..e4be1ba48 --- /dev/null +++ b/x/evm/keeper/validate_contract_test.go @@ -0,0 +1,104 @@ +package keeper_test + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/stretchr/testify/require" + + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" +) + +// TestHasMethodInContract_RealKeeper deploys a real ERC20 contract and tests +// the presence/absence of a couple of methods using the actual keeper logic. +func TestHasMethodInContract_RealKeeper(t *testing.T) { + // 1) Build standard test dependencies + deps := evmtest.NewTestDeps() + ctx := sdk.WrapSDKContext(deps.Ctx) + k := deps.App.EvmKeeper + + // 2) Deploy the standard ERC20 (Minter) contract + deployResp, err := evmtest.DeployContract( + &deps, + embeds.SmartContract_ERC20Minter, + "ExampleToken", + "EXM", + uint8(18), + ) + require.NoError(t, err, "error deploying ERC20 test contract") + + // 3) The embedded ERC20 ABI includes balanceOf, transfer, decimals, etc. + erc20Abi := embeds.SmartContract_ERC20Minter.ABI + + // For demonstration, let's see if the contract implements "balanceOf" + methodBalanceOf, ok := erc20Abi.Methods["balanceOf"] + require.True(t, ok, `"balanceOf" not found in the ERC20 ABI?`) + + // // Now let's see if the keeper says "balanceOf" is recognized + hasMethod, err := k.HasMethodInContract(ctx, deployResp.ContractAddr, methodBalanceOf) + require.NoError(t, err) + require.True(t, hasMethod, "expected contract to have 'balanceOf'") + + // 4) Next, let's test a fake method that doesn't exist + fakeMethod := methodBalanceOf + fakeMethod.Name = "someFakeMethod" + fakeMethod.ID = []byte{0xef} + + hasMethod, err = k.HasMethodInContract(ctx, deployResp.ContractAddr, fakeMethod) + require.NoError(t, err, "non-existent method calls shouldn't produce a real EVM error") + require.False(t, hasMethod, "expected the contract to NOT have 'someFakeMethod'") +} + +// TestCheckAllMethods_RealKeeper uses your keeper's CheckAllMethods (assuming +// you renamed it from "checkAllMethods" to a public name). +func TestCheckAllMethods_RealKeeper(t *testing.T) { + // Build test dependencies and context + deps := evmtest.NewTestDeps() + ctx := sdk.WrapSDKContext(deps.Ctx) + k := deps.App.EvmKeeper + + // Deploy a standard ERC20 contract + deployResp, err := evmtest.DeployContract( + &deps, + embeds.SmartContract_ERC20Minter, + "DemoToken", + "DMO", + uint8(6), + ) + require.NoError(t, err) + + // Example: We want to check that it has "balanceOf" and "transfer", but *not* "fakeMethod" + erc20Abi := embeds.SmartContract_ERC20Minter.ABI + + // Gather the actual method objects from the ABI + balanceOfMethod, hasBalanceOf := erc20Abi.Methods["balanceOf"] + require.True(t, hasBalanceOf) + transferMethod, hasTransfer := erc20Abi.Methods["transfer"] + require.True(t, hasTransfer) + + // Let's also define a known-fake method + fakeMethod := abi.Method{ + Name: "fakeMethod", + ID: []byte{0xfa, 0x75, 0x55, 0x0f}, // random + } + + // Scenario 1: "balanceOf" + "transfer" => no error + allMethods := []abi.Method{balanceOfMethod, transferMethod} + err = k.CheckAllMethods(ctx, deployResp.ContractAddr, allMethods) + require.NoError(t, err, "both balanceOf and transfer exist in standard ERC20") + + // Scenario 2: "balanceOf" + "fakeMethod" => we expect an error on second + calls := []abi.Method{balanceOfMethod, fakeMethod} + err = k.CheckAllMethods(ctx, deployResp.ContractAddr, calls) + require.Error(t, err, "contract does not have 'fakeMethod'") + require.Contains(t, err.Error(), "not found in contract") + + // Scenario 3: check all abi methods + for name, method := range erc20Abi.Methods { + hasMethod, err := k.HasMethodInContract(ctx, deployResp.ContractAddr, method) + require.NoError(t, err) + require.True(t, hasMethod, "expected contract to have %q", name) + } +}