diff --git a/contracts/src/CW20ERC20Pointer.sol b/contracts/src/CW20ERC20Pointer.sol index 9568ba32d4..b5cdc516f8 100644 --- a/contracts/src/CW20ERC20Pointer.sol +++ b/contracts/src/CW20ERC20Pointer.sol @@ -73,7 +73,6 @@ contract CW20ERC20Pointer is ERC20 { string memory req = _curlyBrace(_formatPayload("increase_allowance", _curlyBrace(_join(spenderAddr, amt, ",")))); _execute(bytes(req)); } - emit Approval(msg.sender, spender, amount); return true; } @@ -83,7 +82,6 @@ contract CW20ERC20Pointer is ERC20 { string memory amt = _formatPayload("amount", _doubleQuotes(Strings.toString(amount))); string memory req = _curlyBrace(_formatPayload("transfer", _curlyBrace(_join(recipient, amt, ",")))); _execute(bytes(req)); - emit Transfer(msg.sender, to, amount); return true; } @@ -94,7 +92,6 @@ contract CW20ERC20Pointer is ERC20 { string memory amt = _formatPayload("amount", _doubleQuotes(Strings.toString(amount))); string memory req = _curlyBrace(_formatPayload("transfer_from", _curlyBrace(_join(_join(sender, recipient, ","), amt, ",")))); _execute(bytes(req)); - emit Transfer(from, to, amount); return true; } diff --git a/contracts/test/ERC20toCW20PointerTest.js b/contracts/test/ERC20toCW20PointerTest.js index f2bf02a1b0..8dce53130d 100644 --- a/contracts/test/ERC20toCW20PointerTest.js +++ b/contracts/test/ERC20toCW20PointerTest.js @@ -93,12 +93,23 @@ describe("ERC20 to CW20 Pointer", function () { expect(await pointer.balanceOf(sender.evmAddress)).to.equal(balances.account0); expect(await pointer.balanceOf(recipient.evmAddress)).to.equal(balances.account1); + const blockNumber = await ethers.provider.getBlockNumber(); const tx = await pointer.transfer(recipient.evmAddress, 1); await tx.wait(); expect(await pointer.balanceOf(sender.evmAddress)).to.equal(balances.account0-1); expect(await pointer.balanceOf(recipient.evmAddress)).to.equal(balances.account1+1); + // check logs + const filter = { + fromBlock: blockNumber, + toBlock: 'latest', + address: await pointer.getAddress(), + topics: [ethers.id("Transfer(address,address,uint256)")] + }; + const logs = await ethers.provider.getLogs(filter); + expect(logs.length).to.equal(1); + const cleanupTx = await pointer.connect(recipient.signer).transfer(sender.evmAddress, 1); await cleanupTx.wait(); }); @@ -124,10 +135,21 @@ describe("ERC20 to CW20 Pointer", function () { it("should approve", async function () { const owner = accounts[0].evmAddress; const spender = accounts[1].evmAddress; + const blockNumber = await ethers.provider.getBlockNumber(); const tx = await pointer.approve(spender, 1000000); await tx.wait(); const allowance = await pointer.allowance(owner, spender); expect(Number(allowance)).to.equal(1000000); + + // check logs + const filter = { + fromBlock: blockNumber, + toBlock: 'latest', + address: await pointer.getAddress(), + topics: [ethers.id("Approval(address,address,uint256)")] + }; + const logs = await ethers.provider.getLogs(filter); + expect(logs.length).to.equal(1); }); it("should lower approval", async function () { diff --git a/x/evm/artifacts/README b/x/evm/artifacts/README index 2972e92bef..2f32d818d7 100644 --- a/x/evm/artifacts/README +++ b/x/evm/artifacts/README @@ -1,5 +1,5 @@ The source files are under contracts/src. The artifacts should be updated whenever the source files change. To update run the following (with NativeSeiTokensERC20 as an example): -- `solc --overwrite @openzeppelin=contracts/lib/openzeppelin-contracts --bin -o x/evm/artifacts/cw721 contracts/src/CW721ERC721Pointer.sol` +- `solc --overwrite @openzeppelin=contracts/lib/openzeppelin-contracts --bin -o x/evm/artifacts/cw20 contracts/src/CW721ERC721Pointer.sol` - `solc --overwrite @openzeppelin=contracts/lib/openzeppelin-contracts --abi -o x/evm/artifacts/cw721 contracts/src/CW721ERC721Pointer.sol` - (clean up any artifact that is not CW721ERC721Pointer.bin/abi) - `abigen --abi=x/evm/artifacts/cw721/CW721ERC721Pointer.abi --pkg=cw721 --out=x/evm/artifacts/cw721/cw721.go` \ No newline at end of file diff --git a/x/evm/artifacts/cw20/CW20ERC20Pointer.bin b/x/evm/artifacts/cw20/CW20ERC20Pointer.bin index 8961633ac2..c27324793d 100644 --- a/x/evm/artifacts/cw20/CW20ERC20Pointer.bin +++ b/x/evm/artifacts/cw20/CW20ERC20Pointer.bin @@ -1 +1 @@ -608060405234801561001057600080fd5b50604051611bf9380380611bf983398101604081905261002f91610150565b8181600361003d8382610262565b50600461004a8282610262565b5050600680546001600160a01b031990811661100217909155600780548216611003179055600880549091166110041790555060056100898482610262565b50505050610321565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126100b957600080fd5b81516001600160401b03808211156100d3576100d3610092565b604051601f8301601f19908116603f011681019082821181831017156100fb576100fb610092565b816040528381526020925086602085880101111561011857600080fd5b600091505b8382101561013a578582018301518183018401529082019061011d565b6000602085830101528094505050505092915050565b60008060006060848603121561016557600080fd5b83516001600160401b038082111561017c57600080fd5b610188878388016100a8565b9450602086015191508082111561019e57600080fd5b6101aa878388016100a8565b935060408601519150808211156101c057600080fd5b506101cd868287016100a8565b9150509250925092565b600181811c908216806101eb57607f821691505b60208210810361020b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561025d576000816000526020600020601f850160051c8101602086101561023a5750805b601f850160051c820191505b8181101561025957828155600101610246565b5050505b505050565b81516001600160401b0381111561027b5761027b610092565b61028f8161028984546101d7565b84610211565b602080601f8311600181146102c457600084156102ac5750858301515b600019600386901b1c1916600185901b178555610259565b600085815260208120601f198616915b828110156102f3578886015182559484019460019091019084016102d4565b50858210156103115787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6118c9806103306000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c806395d89b411161008c578063da73d16b11610066578063da73d16b146101b1578063dd62ed3e146101b9578063de4725cc146101cc578063f00b0255146101df57600080fd5b806395d89b411461016b578063a9059cbb14610173578063c2aed3021461018657600080fd5b806306fdde03146100d4578063095ea7b3146100f257806318160ddd1461011557806323b872dd1461012b578063313ce5671461013e57806370a0823114610158575b600080fd5b6100dc6101f2565b6040516100e9919061133f565b60405180910390f35b61010561010036600461136e565b610284565b60405190151581526020016100e9565b61011d61055f565b6040519081526020016100e9565b610105610139366004611398565b6106a2565b61014661089b565b60405160ff90911681526020016100e9565b61011d6101663660046113d4565b610996565b6100dc610b86565b61010561018136600461136e565b610b95565b600854610199906001600160a01b031681565b6040516001600160a01b0390911681526020016100e9565b6100dc610cf5565b61011d6101c73660046113ef565b610d83565b600754610199906001600160a01b031681565b600654610199906001600160a01b031681565b60606003805461020190611422565b80601f016020809104026020016040519081016040528092919081815260200182805461022d90611422565b801561027a5780601f1061024f5761010080835404028352916020019161027a565b820191906000526020600020905b81548152906001019060200180831161025d57829003601f168201915b5050505050905090565b60006001600160801b038211156102a0576001600160801b0391505b60006102ac3385610d83565b90508281111561040d57604080518082018252600781526639b832b73232b960c91b60208201526008549151630c3c20ed60e01b81526001600160a01b03878116600483015260009361035b93926103569290911690630c3c20ed906024015b600060405180830381865afa158015610329573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261035191908101906114e6565b610f85565b610fcb565b9050600061039860405180604001604052806006815260200165185b5bdd5b9d60d21b81525061035661035188876103939190611537565b611000565b905060006103f96103f46040518060400160405280601281526020017164656372656173655f616c6c6f77616e636560701b8152506103566103f48787604051806040016040528060018152602001600b60fa1b815250611093565b6110df565b90506104048161110f565b50505050610513565b8281101561051357604080518082018252600781526639b832b73232b960c91b60208201526008549151630c3c20ed60e01b81526001600160a01b03878116600483015260009361046f93926103569290911690630c3c20ed9060240161030c565b905060006104a760405180604001604052806006815260200165185b5bdd5b9d60d21b81525061035661035186896103939190611537565b905060006105036103f460405180604001604052806012815260200171696e6372656173655f616c6c6f77616e636560701b8152506103566103f48787604051806040016040528060018152602001600b60fa1b815250611093565b905061050e8161110f565b505050505b6040518381526001600160a01b0385169033907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259060200160405180910390a360019150505b92915050565b6000806105ab6103f46040518060400160405280600a815260200169746f6b656e5f696e666f60b01b815250604051806040016040528060028152602001617b7d60f01b815250610fcb565b6006546040516306d81d2960e01b81529192506000916001600160a01b03909116906306d81d29906105e49060059086906004016115fc565b600060405180830381865afa158015610601573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261062991908101906114e6565b600754604051632d2ac4c160e11b81529192506001600160a01b031690635a5589829061065a908490600401611621565b602060405180830381865afa158015610677573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061069b9190611662565b9250505090565b60006001600160a01b0383166106d35760405162461bcd60e51b81526004016106ca9061167b565b60405180910390fd5b604080518082018252600581526437bbb732b960d91b60208201526008549151630c3c20ed60e01b81526001600160a01b03878116600483015260009361072b93926103569290911690630c3c20ed9060240161030c565b60408051808201825260098152681c9958da5c1a595b9d60ba1b60208201526008549151630c3c20ed60e01b81526001600160a01b0388811660048301529394506000936107889361035692911690630c3c20ed9060240161030c565b905060006107ba60405180604001604052806006815260200165185b5bdd5b9d60d21b81525061035661035188611000565b905060006108346103f46040518060400160405280600d81526020016c7472616e736665725f66726f6d60981b8152506103566103f46108148989604051806040016040528060018152602001600b60fa1b815250611093565b87604051806040016040528060018152602001600b60fa1b815250611093565b905061083f8161110f565b50866001600160a01b0316886001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8860405161088591815260200190565b60405180910390a3506001979650505050505050565b6000806108e76103f46040518060400160405280600a815260200169746f6b656e5f696e666f60b01b815250604051806040016040528060028152602001617b7d60f01b815250610fcb565b6006546040516306d81d2960e01b81529192506000916001600160a01b03909116906306d81d29906109209060059086906004016115fc565b600060405180830381865afa15801561093d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261096591908101906114e6565b600754604051632d2ac4c160e11b81529192506001600160a01b031690635a5589829061065a9084906004016116be565b60006001600160a01b038216610a005760405162461bcd60e51b815260206004820152602960248201527f45524332303a2062616c616e636520717565727920666f7220746865207a65726044820152686f206164647265737360b81b60648201526084016106ca565b60408051808201825260078152666164647265737360c81b60208201526008549151630c3c20ed60e01b81526001600160a01b038581166004830152600093610a5a93926103569290911690630c3c20ed9060240161030c565b90506000610a8d6103f46040518060400160405280600781526020016662616c616e636560c81b815250610356856110df565b6006546040516306d81d2960e01b81529192506000916001600160a01b03909116906306d81d2990610ac69060059086906004016115fc565b600060405180830381865afa158015610ae3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b0b91908101906114e6565b600754604051632d2ac4c160e11b81529192506001600160a01b031690635a55898290610b3c9084906004016116fb565b602060405180830381865afa158015610b59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7d9190611662565b95945050505050565b60606004805461020190611422565b60006001600160a01b038316610bbd5760405162461bcd60e51b81526004016106ca9061167b565b60408051808201825260098152681c9958da5c1a595b9d60ba1b60208201526008549151630c3c20ed60e01b81526001600160a01b038681166004830152600093610c1993926103569290911690630c3c20ed9060240161030c565b90506000610c4b60405180604001604052806006815260200165185b5bdd5b9d60d21b81525061035661035187611000565b90506000610c9d6103f4604051806040016040528060088152602001673a3930b739b332b960c11b8152506103566103f48787604051806040016040528060018152602001600b60fa1b815250611093565b9050610ca88161110f565b506040518581526001600160a01b0387169033907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a350600195945050505050565b60058054610d0290611422565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2e90611422565b8015610d7b5780601f10610d5057610100808354040283529160200191610d7b565b820191906000526020600020905b815481529060010190602001808311610d5e57829003601f168201915b505050505081565b604080518082018252600581526437bbb732b960d91b60208201526008549151630c3c20ed60e01b81526001600160a01b0385811660048301526000938493610ddc939092610356921690630c3c20ed9060240161030c565b604080518082018252600781526639b832b73232b960c91b60208201526008549151630c3c20ed60e01b81526001600160a01b038781166004830152939450600093610e379361035692911690630c3c20ed9060240161030c565b90506000610e8a6103f460405180604001604052806009815260200168616c6c6f77616e636560b81b8152506103566103f48787604051806040016040528060018152602001600b60fa1b815250611093565b6006546040516306d81d2960e01b81529192506000916001600160a01b03909116906306d81d2990610ec39060059086906004016115fc565b600060405180830381865afa158015610ee0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f0891908101906114e6565b600754604051632d2ac4c160e11b81529192506001600160a01b031690635a55898290610f39908490600401611737565b602060405180830381865afa158015610f56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7a9190611662565b979650505050505050565b606081604051602001610f989190611775565b60408051601f1981840301815290829052610fb59160200161179a565b6040516020818303038152906040529050919050565b6060610ff9610fd984610f85565b83604051806040016040528060018152602001601d60f91b815250611093565b9392505050565b6060600061100d83611217565b600101905060008167ffffffffffffffff81111561102d5761102d61145c565b6040519080825280601f01601f191660200182016040528015611057576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461106157509392505050565b60608382846040516020016110a99291906117c4565b60408051601f19818403018152908290526110c792916020016117c4565b60405160208183030381529060405290509392505050565b6060816040516020016110f291906117f3565b60408051601f1981840301815290829052610fb591602001611818565b60606000806110026001600160a01b0316600585604051806040016040528060028152602001615b5d60f01b81525060405160240161115093929190611834565b60408051601f198184030181529181526020820180516001600160e01b031663226913d760e11b179052516111859190611877565b600060405180830381855af49150503d80600081146111c0576040519150601f19603f3d011682016040523d82523d6000602084013e6111c5565b606091505b509150915081610ff95760405162461bcd60e51b815260206004820152601760248201527f436f736d5761736d2065786563757465206661696c656400000000000000000060448201526064016106ca565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106112565772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611282576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106112a057662386f26fc10000830492506010015b6305f5e10083106112b8576305f5e100830492506008015b61271083106112cc57612710830492506004015b606483106112de576064830492506002015b600a83106105595760010192915050565b60005b8381101561130a5781810151838201526020016112f2565b50506000910152565b6000815180845261132b8160208601602086016112ef565b601f01601f19169290920160200192915050565b602081526000610ff96020830184611313565b80356001600160a01b038116811461136957600080fd5b919050565b6000806040838503121561138157600080fd5b61138a83611352565b946020939093013593505050565b6000806000606084860312156113ad57600080fd5b6113b684611352565b92506113c460208501611352565b9150604084013590509250925092565b6000602082840312156113e657600080fd5b610ff982611352565b6000806040838503121561140257600080fd5b61140b83611352565b915061141960208401611352565b90509250929050565b600181811c9082168061143657607f821691505b60208210810361145657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561148d5761148d61145c565b604051601f8501601f19908116603f011681019082821181831017156114b5576114b561145c565b816040528093508581528686860111156114ce57600080fd5b6114dc8660208301876112ef565b5050509392505050565b6000602082840312156114f857600080fd5b815167ffffffffffffffff81111561150f57600080fd5b8201601f8101841361152057600080fd5b61152f84825160208401611472565b949350505050565b8181038181111561055957634e487b7160e01b600052601160045260246000fd5b8054600090600181811c908083168061157257607f831692505b6020808410820361159357634e487b7160e01b600052602260045260246000fd5b838852602088018280156115ae57600181146115c4576115ef565b60ff198716825285151560051b820197506115ef565b60008981526020902060005b878110156115e9578154848201529086019084016115d0565b83019850505b5050505050505092915050565b60408152600061160f6040830185611558565b8281036020840152610b7d8185611313565b6040815260006116346040830184611313565b8281036020840152600c81526b746f74616c5f737570706c7960a01b60208201526040810191505092915050565b60006020828403121561167457600080fd5b5051919050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6040815260006116d16040830184611313565b82810360208401526008815267646563696d616c7360c01b60208201526040810191505092915050565b60408152600061170e6040830184611313565b8281036020840152600781526662616c616e636560c81b60208201526040810191505092915050565b60408152600061174a6040830184611313565b82810360208401526009815268616c6c6f77616e636560b81b60208201526040810191505092915050565b600082516117878184602087016112ef565b601160f91b920191825250600101919050565b601160f91b815281516000906117b78160018501602087016112ef565b9190910160010192915050565b600083516117d68184602088016112ef565b8351908301906117ea8183602088016112ef565b01949350505050565b600082516118058184602087016112ef565b607d60f81b920191825250600101919050565b607b60f81b8152600082516117b78160018501602087016112ef565b6060815260006118476060830186611558565b82810360208401526118598186611313565b9050828103604084015261186d8185611313565b9695505050505050565b600082516118898184602087016112ef565b919091019291505056fea2646970667358221220e64e858a1bdea2aaee103653f80a4a8a2bb0435883ac59876e1519653388ac8964736f6c63430008190033 \ No newline at end of file +608060405234801562000010575f80fd5b5060405162003240380380620032408339818101604052810190620000369190620002c4565b81818160039081620000499190620005b1565b5080600490816200005b9190620005b1565b50505061100260065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061100360075f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061100460085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508260059081620001359190620005b1565b5050505062000695565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620001a08262000158565b810181811067ffffffffffffffff82111715620001c257620001c162000168565b5b80604052505050565b5f620001d66200013f565b9050620001e4828262000195565b919050565b5f67ffffffffffffffff82111562000206576200020562000168565b5b620002118262000158565b9050602081019050919050565b5f5b838110156200023d57808201518184015260208101905062000220565b5f8484015250505050565b5f6200025e6200025884620001e9565b620001cb565b9050828152602081018484840111156200027d576200027c62000154565b5b6200028a8482856200021e565b509392505050565b5f82601f830112620002a957620002a862000150565b5b8151620002bb84826020860162000248565b91505092915050565b5f805f60608486031215620002de57620002dd62000148565b5b5f84015167ffffffffffffffff811115620002fe57620002fd6200014c565b5b6200030c8682870162000292565b935050602084015167ffffffffffffffff81111562000330576200032f6200014c565b5b6200033e8682870162000292565b925050604084015167ffffffffffffffff8111156200036257620003616200014c565b5b620003708682870162000292565b9150509250925092565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620003c957607f821691505b602082108103620003df57620003de62000384565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302620004437fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000406565b6200044f868362000406565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f62000499620004936200048d8462000467565b62000470565b62000467565b9050919050565b5f819050919050565b620004b48362000479565b620004cc620004c382620004a0565b84845462000412565b825550505050565b5f90565b620004e2620004d4565b620004ef818484620004a9565b505050565b5b8181101562000516576200050a5f82620004d8565b600181019050620004f5565b5050565b601f82111562000565576200052f81620003e5565b6200053a84620003f7565b810160208510156200054a578190505b620005626200055985620003f7565b830182620004f4565b50505b505050565b5f82821c905092915050565b5f620005875f19846008026200056a565b1980831691505092915050565b5f620005a1838362000576565b9150826002028217905092915050565b620005bc826200037a565b67ffffffffffffffff811115620005d857620005d762000168565b5b620005e48254620003b1565b620005f18282856200051a565b5f60209050601f83116001811462000627575f841562000612578287015190505b6200061e858262000594565b8655506200068d565b601f1984166200063786620003e5565b5f5b82811015620006605784890151825560018201915060208501945060208101905062000639565b868310156200068057848901516200067c601f89168262000576565b8355505b6001600288020188555050505b505050505050565b612b9d80620006a35f395ff3fe608060405234801561000f575f80fd5b50600436106100cd575f3560e01c806395d89b411161008a578063da73d16b11610064578063da73d16b14610227578063dd62ed3e14610245578063de4725cc14610275578063f00b025514610293576100cd565b806395d89b41146101bb578063a9059cbb146101d9578063c2aed30214610209576100cd565b806306fdde03146100d1578063095ea7b3146100ef57806318160ddd1461011f57806323b872dd1461013d578063313ce5671461016d57806370a082311461018b575b5f80fd5b6100d96102b1565b6040516100e69190611e13565b60405180910390f35b61010960048036038101906101049190611ed1565b610341565b6040516101169190611f29565b60405180910390f35b610127610761565b6040516101349190611f51565b60405180910390f35b61015760048036038101906101529190611f6a565b610923565b6040516101649190611f29565b60405180910390f35b610175610c97565b6040516101829190611fd5565b60405180910390f35b6101a560048036038101906101a09190611fee565b610e59565b6040516101b29190611f51565b60405180910390f35b6101c3611144565b6040516101d09190611e13565b60405180910390f35b6101f360048036038101906101ee9190611ed1565b6111d4565b6040516102009190611f29565b60405180910390f35b610211611422565b60405161021e9190612074565b60405180910390f35b61022f611447565b60405161023c9190611e13565b60405180910390f35b61025f600480360381019061025a919061208d565b6114d3565b60405161026c9190611f51565b60405180910390f35b61027d611876565b60405161028a91906120eb565b60405180910390f35b61029b61189b565b6040516102a89190612124565b60405180910390f35b6060600380546102c09061216a565b80601f01602080910402602001604051908101604052809291908181526020018280546102ec9061216a565b80156103375780601f1061030e57610100808354040283529160200191610337565b820191905f5260205f20905b81548152906001019060200180831161031a57829003601f168201915b5050505050905090565b5f6fffffffffffffffffffffffffffffffff8016821115610372576fffffffffffffffffffffffffffffffff801691505b5f61037d33856114d3565b90508281111561056c575f61046a6040518060400160405280600781526020017f7370656e6465720000000000000000000000000000000000000000000000000081525061046560085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed896040518263ffffffff1660e01b815260040161041e91906121a9565b5f60405180830381865afa158015610438573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061046091906122e0565b6118c0565b611908565b90505f6104c76040518060400160405280600681526020017f616d6f756e7400000000000000000000000000000000000000000000000000008152506104c26104bd88876104b89190612354565b61195a565b6118c0565b611908565b90505f6105586105536040518060400160405280601281526020017f64656372656173655f616c6c6f77616e6365000000000000000000000000000081525061054e61054987876040518060400160405280600181526020017f2c00000000000000000000000000000000000000000000000000000000000000815250611a24565b611a72565b611908565b611a72565b905061056381611aba565b50505050610756565b82811015610755575f6106576040518060400160405280600781526020017f7370656e6465720000000000000000000000000000000000000000000000000081525061065260085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed896040518263ffffffff1660e01b815260040161060b91906121a9565b5f60405180830381865afa158015610625573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061064d91906122e0565b6118c0565b611908565b90505f6106b46040518060400160405280600681526020017f616d6f756e7400000000000000000000000000000000000000000000000000008152506106af6106aa86896106a59190612354565b61195a565b6118c0565b611908565b90505f6107456107406040518060400160405280601281526020017f696e6372656173655f616c6c6f77616e6365000000000000000000000000000081525061073b61073687876040518060400160405280600181526020017f2c00000000000000000000000000000000000000000000000000000000000000815250611a24565b611a72565b611908565b611a72565b905061075081611aba565b505050505b5b600191505092915050565b5f806107df6107da6040518060400160405280600a81526020017f746f6b656e5f696e666f000000000000000000000000000000000000000000008152506040518060400160405280600281526020017f7b7d000000000000000000000000000000000000000000000000000000000000815250611908565b611a72565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296005846040518363ffffffff1660e01b815260040161083f92919061246c565b5f60405180830381865afa158015610859573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610881919061253f565b905060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635a558982826040518263ffffffff1660e01b81526004016108dd91906125d0565b602060405180830381865afa1580156108f8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061091c9190612617565b9250505090565b5f8073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610992576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610989906126b2565b60405180910390fd5b5f610a756040518060400160405280600581526020017f6f776e6572000000000000000000000000000000000000000000000000000000815250610a7060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed896040518263ffffffff1660e01b8152600401610a2991906121a9565b5f60405180830381865afa158015610a43573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610a6b91906122e0565b6118c0565b611908565b90505f610b5a6040518060400160405280600981526020017f726563697069656e740000000000000000000000000000000000000000000000815250610b5560085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed896040518263ffffffff1660e01b8152600401610b0e91906121a9565b5f60405180830381865afa158015610b28573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610b5091906122e0565b6118c0565b611908565b90505f610bac6040518060400160405280600681526020017f616d6f756e740000000000000000000000000000000000000000000000000000815250610ba7610ba28861195a565b6118c0565b611908565b90505f610c7c610c776040518060400160405280600d81526020017f7472616e736665725f66726f6d00000000000000000000000000000000000000815250610c72610c6d610c3189896040518060400160405280600181526020017f2c00000000000000000000000000000000000000000000000000000000000000815250611a24565b876040518060400160405280600181526020017f2c00000000000000000000000000000000000000000000000000000000000000815250611a24565b611a72565b611908565b611a72565b9050610c8781611aba565b5060019450505050509392505050565b5f80610d15610d106040518060400160405280600a81526020017f746f6b656e5f696e666f000000000000000000000000000000000000000000008152506040518060400160405280600281526020017f7b7d000000000000000000000000000000000000000000000000000000000000815250611908565b611a72565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296005846040518363ffffffff1660e01b8152600401610d7592919061246c565b5f60405180830381865afa158015610d8f573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610db7919061253f565b905060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635a558982826040518263ffffffff1660e01b8152600401610e13919061271a565b602060405180830381865afa158015610e2e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e529190612617565b9250505090565b5f8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610ec8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ebf906127bd565b60405180910390fd5b5f610fab6040518060400160405280600781526020017f6164647265737300000000000000000000000000000000000000000000000000815250610fa660085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed876040518263ffffffff1660e01b8152600401610f5f91906121a9565b5f60405180830381865afa158015610f79573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610fa191906122e0565b6118c0565b611908565b90505f610ffd610ff86040518060400160405280600781526020017f62616c616e636500000000000000000000000000000000000000000000000000815250610ff385611a72565b611908565b611a72565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296005846040518363ffffffff1660e01b815260040161105d92919061246c565b5f60405180830381865afa158015611077573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061109f919061253f565b905060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635a558982826040518263ffffffff1660e01b81526004016110fb9190612825565b602060405180830381865afa158015611116573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061113a9190612617565b9350505050919050565b6060600480546111539061216a565b80601f016020809104026020016040519081016040528092919081815260200182805461117f9061216a565b80156111ca5780601f106111a1576101008083540402835291602001916111ca565b820191905f5260205f20905b8154815290600101906020018083116111ad57829003601f168201915b5050505050905090565b5f8073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161123a906126b2565b60405180910390fd5b5f6113266040518060400160405280600981526020017f726563697069656e74000000000000000000000000000000000000000000000081525061132160085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed886040518263ffffffff1660e01b81526004016112da91906121a9565b5f60405180830381865afa1580156112f4573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061131c91906122e0565b6118c0565b611908565b90505f6113786040518060400160405280600681526020017f616d6f756e74000000000000000000000000000000000000000000000000000081525061137361136e8761195a565b6118c0565b611908565b90505f6114096114046040518060400160405280600881526020017f7472616e736665720000000000000000000000000000000000000000000000008152506113ff6113fa87876040518060400160405280600181526020017f2c00000000000000000000000000000000000000000000000000000000000000815250611a24565b611a72565b611908565b611a72565b905061141481611aba565b506001935050505092915050565b60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600580546114549061216a565b80601f01602080910402602001604051908101604052809291908181526020018280546114809061216a565b80156114cb5780601f106114a2576101008083540402835291602001916114cb565b820191905f5260205f20905b8154815290600101906020018083116114ae57829003601f168201915b505050505081565b5f806115b76040518060400160405280600581526020017f6f776e65720000000000000000000000000000000000000000000000000000008152506115b260085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed886040518263ffffffff1660e01b815260040161156b91906121a9565b5f60405180830381865afa158015611585573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906115ad91906122e0565b6118c0565b611908565b90505f61169c6040518060400160405280600781526020017f7370656e6465720000000000000000000000000000000000000000000000000081525061169760085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed886040518263ffffffff1660e01b815260040161165091906121a9565b5f60405180830381865afa15801561166a573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061169291906122e0565b6118c0565b611908565b90505f61172d6117286040518060400160405280600981526020017f616c6c6f77616e6365000000000000000000000000000000000000000000000081525061172361171e87876040518060400160405280600181526020017f2c00000000000000000000000000000000000000000000000000000000000000815250611a24565b611a72565b611908565b611a72565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296005846040518363ffffffff1660e01b815260040161178d92919061246c565b5f60405180830381865afa1580156117a7573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906117cf919061253f565b905060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635a558982826040518263ffffffff1660e01b815260040161182b91906128a2565b602060405180830381865afa158015611846573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061186a9190612617565b94505050505092915050565b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060816040516020016118d39190612935565b6040516020818303038152906040526040516020016118f2919061295a565b6040516020818303038152906040529050919050565b6060611952611916846118c0565b836040518060400160405280600181526020017f3a00000000000000000000000000000000000000000000000000000000000000815250611a24565b905092915050565b60605f600161196884611c38565b0190505f8167ffffffffffffffff811115611986576119856121ca565b5b6040519080825280601f01601f1916602001820160405280156119b85781602001600182028036833780820191505090505b5090505f82602001820190505b600115611a19578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581611a0e57611a0d61297f565b5b0494505f85036119c5575b819350505050919050565b6060838284604051602001611a3a9291906129ac565b604051602081830303815290604052604051602001611a5a9291906129ac565b60405160208183030381529060405290509392505050565b606081604051602001611a8591906129f5565b604051602081830303815290604052604051602001611aa49190612a40565b6040516020818303038152906040529050919050565b60605f8061100273ffffffffffffffffffffffffffffffffffffffff166005856040518060400160405280600281526020017f5b5d000000000000000000000000000000000000000000000000000000000000815250604051602401611b2293929190612a65565b6040516020818303038152906040527f44d227ae000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051611bac9190612ae9565b5f60405180830381855af49150503d805f8114611be4576040519150601f19603f3d011682016040523d82523d5f602084013e611be9565b606091505b509150915081611c2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c2590612b49565b60405180910390fd5b8092505050919050565b5f805f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611c94577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381611c8a57611c8961297f565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310611cd1576d04ee2d6d415b85acef81000000008381611cc757611cc661297f565b5b0492506020810190505b662386f26fc100008310611d0057662386f26fc100008381611cf657611cf561297f565b5b0492506010810190505b6305f5e1008310611d29576305f5e1008381611d1f57611d1e61297f565b5b0492506008810190505b6127108310611d4e576127108381611d4457611d4361297f565b5b0492506004810190505b60648310611d715760648381611d6757611d6661297f565b5b0492506002810190505b600a8310611d80576001810190505b80915050919050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611dc0578082015181840152602081019050611da5565b5f8484015250505050565b5f601f19601f8301169050919050565b5f611de582611d89565b611def8185611d93565b9350611dff818560208601611da3565b611e0881611dcb565b840191505092915050565b5f6020820190508181035f830152611e2b8184611ddb565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611e6d82611e44565b9050919050565b611e7d81611e63565b8114611e87575f80fd5b50565b5f81359050611e9881611e74565b92915050565b5f819050919050565b611eb081611e9e565b8114611eba575f80fd5b50565b5f81359050611ecb81611ea7565b92915050565b5f8060408385031215611ee757611ee6611e3c565b5b5f611ef485828601611e8a565b9250506020611f0585828601611ebd565b9150509250929050565b5f8115159050919050565b611f2381611f0f565b82525050565b5f602082019050611f3c5f830184611f1a565b92915050565b611f4b81611e9e565b82525050565b5f602082019050611f645f830184611f42565b92915050565b5f805f60608486031215611f8157611f80611e3c565b5b5f611f8e86828701611e8a565b9350506020611f9f86828701611e8a565b9250506040611fb086828701611ebd565b9150509250925092565b5f60ff82169050919050565b611fcf81611fba565b82525050565b5f602082019050611fe85f830184611fc6565b92915050565b5f6020828403121561200357612002611e3c565b5b5f61201084828501611e8a565b91505092915050565b5f819050919050565b5f61203c61203761203284611e44565b612019565b611e44565b9050919050565b5f61204d82612022565b9050919050565b5f61205e82612043565b9050919050565b61206e81612054565b82525050565b5f6020820190506120875f830184612065565b92915050565b5f80604083850312156120a3576120a2611e3c565b5b5f6120b085828601611e8a565b92505060206120c185828601611e8a565b9150509250929050565b5f6120d582612043565b9050919050565b6120e5816120cb565b82525050565b5f6020820190506120fe5f8301846120dc565b92915050565b5f61210e82612043565b9050919050565b61211e81612104565b82525050565b5f6020820190506121375f830184612115565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061218157607f821691505b6020821081036121945761219361213d565b5b50919050565b6121a381611e63565b82525050565b5f6020820190506121bc5f83018461219a565b92915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61220082611dcb565b810181811067ffffffffffffffff8211171561221f5761221e6121ca565b5b80604052505050565b5f612231611e33565b905061223d82826121f7565b919050565b5f67ffffffffffffffff82111561225c5761225b6121ca565b5b61226582611dcb565b9050602081019050919050565b5f61228461227f84612242565b612228565b9050828152602081018484840111156122a05761229f6121c6565b5b6122ab848285611da3565b509392505050565b5f82601f8301126122c7576122c66121c2565b5b81516122d7848260208601612272565b91505092915050565b5f602082840312156122f5576122f4611e3c565b5b5f82015167ffffffffffffffff81111561231257612311611e40565b5b61231e848285016122b3565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61235e82611e9e565b915061236983611e9e565b925082820390508181111561238157612380612327565b5b92915050565b5f819050815f5260205f209050919050565b5f81546123a58161216a565b6123af8186611d93565b9450600182165f81146123c957600181146123df57612411565b60ff198316865281151560200286019350612411565b6123e885612387565b5f5b83811015612409578154818901526001820191506020810190506123ea565b808801955050505b50505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f61243e8261241a565b6124488185612424565b9350612458818560208601611da3565b61246181611dcb565b840191505092915050565b5f6040820190508181035f8301526124848185612399565b905081810360208301526124988184612434565b90509392505050565b5f67ffffffffffffffff8211156124bb576124ba6121ca565b5b6124c482611dcb565b9050602081019050919050565b5f6124e36124de846124a1565b612228565b9050828152602081018484840111156124ff576124fe6121c6565b5b61250a848285611da3565b509392505050565b5f82601f830112612526576125256121c2565b5b81516125368482602086016124d1565b91505092915050565b5f6020828403121561255457612553611e3c565b5b5f82015167ffffffffffffffff81111561257157612570611e40565b5b61257d84828501612512565b91505092915050565b7f746f74616c5f737570706c7900000000000000000000000000000000000000005f82015250565b5f6125ba600c83611d93565b91506125c582612586565b602082019050919050565b5f6040820190508181035f8301526125e88184612434565b905081810360208301526125fb816125ae565b905092915050565b5f8151905061261181611ea7565b92915050565b5f6020828403121561262c5761262b611e3c565b5b5f61263984828501612603565b91505092915050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f61269c602383611d93565b91506126a782612642565b604082019050919050565b5f6020820190508181035f8301526126c981612690565b9050919050565b7f646563696d616c730000000000000000000000000000000000000000000000005f82015250565b5f612704600883611d93565b915061270f826126d0565b602082019050919050565b5f6040820190508181035f8301526127328184612434565b90508181036020830152612745816126f8565b905092915050565b7f45524332303a2062616c616e636520717565727920666f7220746865207a65725f8201527f6f20616464726573730000000000000000000000000000000000000000000000602082015250565b5f6127a7602983611d93565b91506127b28261274d565b604082019050919050565b5f6020820190508181035f8301526127d48161279b565b9050919050565b7f62616c616e6365000000000000000000000000000000000000000000000000005f82015250565b5f61280f600783611d93565b915061281a826127db565b602082019050919050565b5f6040820190508181035f83015261283d8184612434565b9050818103602083015261285081612803565b905092915050565b7f616c6c6f77616e636500000000000000000000000000000000000000000000005f82015250565b5f61288c600983611d93565b915061289782612858565b602082019050919050565b5f6040820190508181035f8301526128ba8184612434565b905081810360208301526128cd81612880565b905092915050565b5f81905092915050565b5f6128e982611d89565b6128f381856128d5565b9350612903818560208601611da3565b80840191505092915050565b7f2200000000000000000000000000000000000000000000000000000000000000815250565b5f61294082846128df565b915061294b8261290f565b60018201915081905092915050565b5f6129648261290f565b60018201915061297482846128df565b915081905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6129b782856128df565b91506129c382846128df565b91508190509392505050565b7f7d00000000000000000000000000000000000000000000000000000000000000815250565b5f612a0082846128df565b9150612a0b826129cf565b60018201915081905092915050565b7f7b00000000000000000000000000000000000000000000000000000000000000815250565b5f612a4a82612a1a565b600182019150612a5a82846128df565b915081905092915050565b5f6060820190508181035f830152612a7d8186612399565b90508181036020830152612a918185612434565b90508181036040830152612aa58184612434565b9050949350505050565b5f81905092915050565b5f612ac38261241a565b612acd8185612aaf565b9350612add818560208601611da3565b80840191505092915050565b5f612af48284612ab9565b915081905092915050565b7f436f736d5761736d2065786563757465206661696c65640000000000000000005f82015250565b5f612b33601783611d93565b9150612b3e82612aff565b602082019050919050565b5f6020820190508181035f830152612b6081612b27565b905091905056fea2646970667358221220bbf61e425e456abc0922fd5419531658ae228bde2af551dc3a3ad2a297f4e7ea64736f6c63430008150033 \ No newline at end of file diff --git a/x/evm/artifacts/cw20/artifacts.go b/x/evm/artifacts/cw20/artifacts.go index 838c3ceb2b..a62057271b 100644 --- a/x/evm/artifacts/cw20/artifacts.go +++ b/x/evm/artifacts/cw20/artifacts.go @@ -13,7 +13,7 @@ import ( "github.com/sei-protocol/sei-chain/x/evm/config" ) -const currentVersion uint16 = 1 +const currentVersion uint16 = 2 var versionOverride uint16