From 1c32f92ee8d2b18a38bed39527b277501278dd5c Mon Sep 17 00:00:00 2001 From: codchen Date: Tue, 9 Jul 2024 11:00:51 +0800 Subject: [PATCH] Translate CW721 events to ERC721 events (#1750) * Use transient store for EVM deferred info * fix tests * hardhat tests * Translate CW721 events to ERC721 events * tests * rebase --- app/receipt.go | 123 ++++++++++- app/receipt_test.go | 220 +++++++++++++++++++ contracts/src/CW721ERC721Pointer.sol | 3 - contracts/test/CW721ERC721PointerTest.t.sol | 16 +- contracts/test/ERC721toCW721PointerTest.js | 32 ++- go.mod | 2 + go.sum | 3 + proto/evm/receipt.proto | 1 + x/evm/artifacts/cw721/CW721ERC721Pointer.bin | 2 +- x/evm/artifacts/cw721/artifacts.go | 2 +- x/evm/keeper/log.go | 6 + x/evm/types/receipt.pb.go | 130 +++++++---- 12 files changed, 475 insertions(+), 65 deletions(-) diff --git a/app/receipt.go b/app/receipt.go index 356744dbc..6d8e9201e 100644 --- a/app/receipt.go +++ b/app/receipt.go @@ -21,7 +21,11 @@ const ShellEVMTxType = math.MaxUint32 var ERC20ApprovalTopic = common.HexToHash("0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925") var ERC20TransferTopic = common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef") +var ERC721TransferTopic = common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef") +var ERC721ApprovalTopic = common.HexToHash("0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925") +var ERC721ApproveAllTopic = common.HexToHash("0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31") var EmptyHash = common.HexToHash("0x0") +var TrueHash = common.HexToHash("0x1") type AllowanceResponse struct { Allowance sdk.Int `json:"allowance"` @@ -49,6 +53,16 @@ func (app *App) AddCosmosEventsToEVMReceiptIfApplicable(ctx sdk.Context, tx sdk. } continue } + // check if there is a ERC721 pointer to contract Addr + pointerAddr, _, exists = app.EvmKeeper.GetERC721CW721Pointer(ctx, contractAddr) + if exists { + log, eligible := app.translateCW721Event(ctx, wasmEvent, pointerAddr, contractAddr) + if eligible { + log.Index = uint(len(logs)) + logs = append(logs, log) + } + continue + } } if len(logs) == 0 { return @@ -59,7 +73,7 @@ func (app *App) AddCosmosEventsToEVMReceiptIfApplicable(ctx sdk.Context, tx sdk. } var bloom ethtypes.Bloom if r, err := app.EvmKeeper.GetTransientReceipt(ctx, txHash); err == nil && r != nil { - r.Logs = append(r.Logs, utils.Map(logs, evmkeeper.ConvertEthLog)...) + r.Logs = append(r.Logs, utils.Map(logs, evmkeeper.ConvertSyntheticEthLog)...) bloom = ethtypes.CreateBloom(ethtypes.Receipts{ðtypes.Receipt{Logs: evmkeeper.GetLogsForTx(r)}}) r.LogsBloom = bloom[:] _ = app.EvmKeeper.SetTransientReceipt(ctx, txHash, r) @@ -71,7 +85,7 @@ func (app *App) AddCosmosEventsToEVMReceiptIfApplicable(ctx sdk.Context, tx sdk. GasUsed: ctx.GasMeter().GasConsumed(), BlockNumber: uint64(ctx.BlockHeight()), TransactionIndex: uint32(ctx.TxIndex()), - Logs: utils.Map(logs, evmkeeper.ConvertEthLog), + Logs: utils.Map(logs, evmkeeper.ConvertSyntheticEthLog), LogsBloom: bloom[:], Status: uint32(ethtypes.ReceiptStatusSuccessful), // we don't create shell receipt for failed Cosmos tx since there is no event anyway } @@ -146,6 +160,99 @@ func (app *App) translateCW20Event(ctx sdk.Context, wasmEvent abci.Event, pointe return nil, false } +func (app *App) translateCW721Event(ctx sdk.Context, wasmEvent abci.Event, pointerAddr common.Address, contractAddr string) (*ethtypes.Log, bool) { + action, found := GetAttributeValue(wasmEvent, "action") + if !found { + return nil, false + } + var topics []common.Hash + switch action { + case "transfer_nft", "send_nft", "burn": + topics = []common.Hash{ + ERC721TransferTopic, + app.GetEvmAddressAttribute(ctx, wasmEvent, "sender"), + app.GetEvmAddressAttribute(ctx, wasmEvent, "recipient"), + } + tokenID := GetTokenIDAttribute(wasmEvent) + if tokenID == nil { + return nil, false + } + return ðtypes.Log{ + Address: pointerAddr, + Topics: topics, + Data: common.BigToHash(tokenID).Bytes(), + }, true + case "mint": + topics = []common.Hash{ + ERC721TransferTopic, + EmptyHash, + app.GetEvmAddressAttribute(ctx, wasmEvent, "owner"), + } + tokenID := GetTokenIDAttribute(wasmEvent) + if tokenID == nil { + return nil, false + } + return ðtypes.Log{ + Address: pointerAddr, + Topics: topics, + Data: common.BigToHash(tokenID).Bytes(), + }, true + case "approve": + topics = []common.Hash{ + ERC721ApprovalTopic, + app.GetEvmAddressAttribute(ctx, wasmEvent, "sender"), + app.GetEvmAddressAttribute(ctx, wasmEvent, "spender"), + } + tokenID := GetTokenIDAttribute(wasmEvent) + if tokenID == nil { + return nil, false + } + return ðtypes.Log{ + Address: pointerAddr, + Topics: topics, + Data: common.BigToHash(tokenID).Bytes(), + }, true + case "revoke": + topics = []common.Hash{ + ERC721ApprovalTopic, + app.GetEvmAddressAttribute(ctx, wasmEvent, "sender"), + EmptyHash, + } + tokenID := GetTokenIDAttribute(wasmEvent) + if tokenID == nil { + return nil, false + } + return ðtypes.Log{ + Address: pointerAddr, + Topics: topics, + Data: common.BigToHash(tokenID).Bytes(), + }, true + case "approve_all": + topics = []common.Hash{ + ERC721ApproveAllTopic, + app.GetEvmAddressAttribute(ctx, wasmEvent, "sender"), + app.GetEvmAddressAttribute(ctx, wasmEvent, "operator"), + } + return ðtypes.Log{ + Address: pointerAddr, + Topics: topics, + Data: TrueHash.Bytes(), + }, true + case "revoke_all": + topics = []common.Hash{ + ERC721ApproveAllTopic, + app.GetEvmAddressAttribute(ctx, wasmEvent, "sender"), + app.GetEvmAddressAttribute(ctx, wasmEvent, "operator"), + } + return ðtypes.Log{ + Address: pointerAddr, + Topics: topics, + Data: EmptyHash.Bytes(), + }, true + } + return nil, false +} + func (app *App) GetEvmAddressAttribute(ctx sdk.Context, event abci.Event, attribute string) common.Hash { addrStr, found := GetAttributeValue(event, attribute) if found { @@ -186,3 +293,15 @@ func GetAmountAttribute(event abci.Event) (*big.Int, bool) { } return nil, false } + +func GetTokenIDAttribute(event abci.Event) *big.Int { + tokenID, found := GetAttributeValue(event, "token_id") + if !found { + return nil + } + tokenIDInt, ok := sdk.NewIntFromString(tokenID) + if !ok { + return nil + } + return tokenIDInt.BigInt() +} diff --git a/app/receipt_test.go b/app/receipt_test.go index 2597dfb79..b0ea2f60d 100644 --- a/app/receipt_test.go +++ b/app/receipt_test.go @@ -143,6 +143,226 @@ func TestEvmEventsForCw20(t *testing.T) { require.Equal(t, common.HexToHash("0x64").Bytes(), receipt.Logs[0].Data) } +func TestEvmEventsForCw721(t *testing.T) { + k := testkeeper.EVMTestApp.EvmKeeper + wasmKeeper := k.WasmKeeper() + ctx := testkeeper.EVMTestApp.GetContextForDeliverTx([]byte{}).WithBlockTime(time.Now()).WithChainID("sei-test").WithBlockHeight(1) + code, err := os.ReadFile("../contracts/wasm/cw721_base.wasm") + require.Nil(t, err) + privKey := testkeeper.MockPrivateKey() + creator, _ := testkeeper.PrivateKeyToAddresses(privKey) + codeID, err := wasmKeeper.Create(ctx, creator, code, nil) + require.Nil(t, err) + contractAddr, _, err := wasmKeeper.Instantiate(ctx, codeID, creator, creator, []byte(fmt.Sprintf("{\"name\":\"test\",\"symbol\":\"test\",\"minter\":\"%s\"}", creator.String())), "test", sdk.NewCoins()) + require.Nil(t, err) + + _, mockPointerAddr := testkeeper.MockAddressPair() + k.SetERC721CW721Pointer(ctx, contractAddr.String(), mockPointerAddr) + + // calling CW contract directly + amt := sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000000000))) + k.BankKeeper().MintCoins(ctx, "evm", amt) + k.BankKeeper().SendCoinsFromModuleToAccount(ctx, "evm", creator, amt) + recipient, _ := testkeeper.MockAddressPair() + payload := []byte(fmt.Sprintf("{\"mint\":{\"token_id\":\"1\",\"owner\":\"%s\"}}", recipient.String())) + msg := &wasmtypes.MsgExecuteContract{ + Sender: creator.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder := testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx := signTx(txBuilder, privKey, k.AccountKeeper().GetAccount(ctx, creator)) + txbz, err := testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum := sha256.Sum256(txbz) + res := testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err := testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + _, found := testkeeper.EVMTestApp.EvmKeeper.GetEVMTxDeferredInfo(ctx) + require.True(t, found) + + // calling from wasmd precompile + abi, err := wasmd.GetABI() + require.Nil(t, err) + emptyCoins, err := sdk.NewCoins().MarshalJSON() + require.Nil(t, err) + payload = []byte(fmt.Sprintf("{\"mint\":{\"token_id\":\"2\",\"owner\":\"%s\"}}", creator.String())) + data, err := abi.Pack("execute", contractAddr.String(), payload, emptyCoins) + require.Nil(t, err) + wasmAddr := common.HexToAddress(wasmd.WasmdAddress) + txData := ethtypes.LegacyTx{ + Nonce: 0, + GasPrice: big.NewInt(1000000000), + Gas: 1000000, + To: &wasmAddr, + Data: data, + } + chainID := k.ChainID(ctx) + chainCfg := evmtypes.DefaultChainConfig() + ethCfg := chainCfg.EthereumConfig(chainID) + blockNum := big.NewInt(ctx.BlockHeight()) + signer := ethtypes.MakeSigner(ethCfg, blockNum, uint64(ctx.BlockTime().Unix())) + testPrivHex := hex.EncodeToString(privKey.Bytes()) + key, _ := crypto.HexToECDSA(testPrivHex) + signedTx, err := ethtypes.SignTx(ethtypes.NewTx(&txData), signer, key) + require.Nil(t, err) + typedTx, err := ethtx.NewLegacyTx(signedTx) + require.Nil(t, err) + emsg, err := evmtypes.NewMsgEVMTransaction(typedTx) + require.Nil(t, err) + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(emsg) + tx = txBuilder.GetTx() + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()).WithTxIndex(1), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, signedTx.Hash()) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + _, found = testkeeper.EVMTestApp.EvmKeeper.GetEVMTxDeferredInfo(ctx) + require.True(t, found) + + // test approval message + payload = []byte(fmt.Sprintf("{\"approve\":{\"spender\":\"%s\",\"token_id\":\"2\"}}", recipient.String())) + msg = &wasmtypes.MsgExecuteContract{ + Sender: creator.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx = signTx(txBuilder, privKey, k.AccountKeeper().GetAccount(ctx, creator)) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + _, found = testkeeper.EVMTestApp.EvmKeeper.GetEVMTxDeferredInfo(ctx) + require.True(t, found) + require.Equal(t, common.HexToHash("0x2").Bytes(), receipt.Logs[0].Data) + + // revoke + payload = []byte(fmt.Sprintf("{\"revoke\":{\"spender\":\"%s\",\"token_id\":\"2\"}}", recipient.String())) + msg = &wasmtypes.MsgExecuteContract{ + Sender: creator.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx = signTx(txBuilder, privKey, k.AccountKeeper().GetAccount(ctx, creator)) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + _, found = testkeeper.EVMTestApp.EvmKeeper.GetEVMTxDeferredInfo(ctx) + require.True(t, found) + require.Equal(t, common.HexToHash("0x2").Bytes(), receipt.Logs[0].Data) + + // approve all + payload = []byte(fmt.Sprintf("{\"approve_all\":{\"operator\":\"%s\"}}", recipient.String())) + msg = &wasmtypes.MsgExecuteContract{ + Sender: creator.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx = signTx(txBuilder, privKey, k.AccountKeeper().GetAccount(ctx, creator)) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + _, found = testkeeper.EVMTestApp.EvmKeeper.GetEVMTxDeferredInfo(ctx) + require.True(t, found) + require.Equal(t, common.HexToHash("0x1").Bytes(), receipt.Logs[0].Data) + + // revoke all + payload = []byte(fmt.Sprintf("{\"revoke_all\":{\"operator\":\"%s\"}}", recipient.String())) + msg = &wasmtypes.MsgExecuteContract{ + Sender: creator.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx = signTx(txBuilder, privKey, k.AccountKeeper().GetAccount(ctx, creator)) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + _, found = testkeeper.EVMTestApp.EvmKeeper.GetEVMTxDeferredInfo(ctx) + require.True(t, found) + require.Equal(t, common.HexToHash("0x0").Bytes(), receipt.Logs[0].Data) + + // burn + payload = []byte("{\"burn\":{\"token_id\":\"2\"}}") + msg = &wasmtypes.MsgExecuteContract{ + Sender: creator.String(), + Contract: contractAddr.String(), + Msg: payload, + } + txBuilder = testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + txBuilder.SetMsgs(msg) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("usei", sdk.NewInt(1000000)))) + txBuilder.SetGasLimit(300000) + tx = signTx(txBuilder, privKey, k.AccountKeeper().GetAccount(ctx, creator)) + txbz, err = testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(tx) + require.Nil(t, err) + sum = sha256.Sum256(txbz) + res = testkeeper.EVMTestApp.DeliverTx(ctx.WithEventManager(sdk.NewEventManager()), abci.RequestDeliverTx{Tx: txbz}, tx, sum) + require.Equal(t, uint32(0), res.Code) + receipt, err = testkeeper.EVMTestApp.EvmKeeper.GetTransientReceipt(ctx, common.BytesToHash(sum[:])) + require.Nil(t, err) + require.Equal(t, 1, len(receipt.Logs)) + require.NotEmpty(t, receipt.LogsBloom) + require.Equal(t, mockPointerAddr.Hex(), receipt.Logs[0].Address) + _, found = testkeeper.EVMTestApp.EvmKeeper.GetEVMTxDeferredInfo(ctx) + require.True(t, found) + require.Equal(t, common.HexToHash("0x2").Bytes(), receipt.Logs[0].Data) +} + func signTx(txBuilder client.TxBuilder, privKey cryptotypes.PrivKey, acc authtypes.AccountI) sdk.Tx { var sigsV2 []signing.SignatureV2 sigV2 := signing.SignatureV2{ diff --git a/contracts/src/CW721ERC721Pointer.sol b/contracts/src/CW721ERC721Pointer.sol index 3898b69e3..7eea1a390 100644 --- a/contracts/src/CW721ERC721Pointer.sol +++ b/contracts/src/CW721ERC721Pointer.sol @@ -158,7 +158,6 @@ contract CW721ERC721Pointer is ERC721,ERC2981 { string memory tId = _formatPayload("token_id", _doubleQuotes(Strings.toString(tokenId))); string memory req = _curlyBrace(_formatPayload("transfer_nft", _curlyBrace(_join(recipient, tId, ",")))); _execute(bytes(req)); - emit Transfer(from, to, tokenId); } function approve(address approved, uint256 tokenId) public override { @@ -166,7 +165,6 @@ contract CW721ERC721Pointer is ERC721,ERC2981 { string memory tId = _formatPayload("token_id", _doubleQuotes(Strings.toString(tokenId))); string memory req = _curlyBrace(_formatPayload("approve", _curlyBrace(_join(spender, tId, ",")))); _execute(bytes(req)); - emit Approval(ownerOf(tokenId), approved, tokenId); } function setApprovalForAll(address operator, bool approved) public override { @@ -176,7 +174,6 @@ contract CW721ERC721Pointer is ERC721,ERC2981 { } else { _execute(bytes(_curlyBrace(_formatPayload("revoke_all", op)))); } - emit ApprovalForAll(msg.sender, operator, approved); } function _execute(bytes memory req) internal returns (bytes memory) { diff --git a/contracts/test/CW721ERC721PointerTest.t.sol b/contracts/test/CW721ERC721PointerTest.t.sol index 59baad9f8..cb2ce4e58 100644 --- a/contracts/test/CW721ERC721PointerTest.t.sol +++ b/contracts/test/CW721ERC721PointerTest.t.sol @@ -238,8 +238,8 @@ contract CW721ERC721PointerTest is Test { abi.encode(bytes("")) ); vm.startPrank(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266); - vm.expectEmit(); - emit Transfer(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 0xF39fD6e51Aad88F6f4CE6AB8827279CFffb92267, 1); + //vm.expectEmit(); + //emit Transfer(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 0xF39fD6e51Aad88F6f4CE6AB8827279CFffb92267, 1); pointer.transferFrom(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 0xF39fD6e51Aad88F6f4CE6AB8827279CFffb92267, 1); vm.stopPrank(); } @@ -261,8 +261,8 @@ contract CW721ERC721PointerTest is Test { abi.encode(bytes("sei19zhelek4q5lt4zam8mcarmgv92vzgqd3ux32jw")) ); vm.startPrank(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266); - vm.expectEmit(); - emit Approval(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 0xF39fD6e51Aad88F6f4CE6AB8827279CFffb92267, 1); + //vm.expectEmit(); + //emit Approval(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 0xF39fD6e51Aad88F6f4CE6AB8827279CFffb92267, 1); pointer.approve(0xF39fD6e51Aad88F6f4CE6AB8827279CFffb92267, 1); vm.stopPrank(); } @@ -274,8 +274,8 @@ contract CW721ERC721PointerTest is Test { abi.encode(bytes("")) ); vm.startPrank(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266); - vm.expectEmit(); - emit ApprovalForAll(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 0xF39fD6e51Aad88F6f4CE6AB8827279CFffb92267, true); + //vm.expectEmit(); + //emit ApprovalForAll(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 0xF39fD6e51Aad88F6f4CE6AB8827279CFffb92267, true); pointer.setApprovalForAll(0xF39fD6e51Aad88F6f4CE6AB8827279CFffb92267, true); vm.stopPrank(); } @@ -287,8 +287,8 @@ contract CW721ERC721PointerTest is Test { abi.encode(bytes("")) ); vm.startPrank(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266); - vm.expectEmit(); - emit ApprovalForAll(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 0xF39fD6e51Aad88F6f4CE6AB8827279CFffb92267, false); + //vm.expectEmit(); + //emit ApprovalForAll(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 0xF39fD6e51Aad88F6f4CE6AB8827279CFffb92267, false); pointer.setApprovalForAll(0xF39fD6e51Aad88F6f4CE6AB8827279CFffb92267, false); vm.stopPrank(); } diff --git a/contracts/test/ERC721toCW721PointerTest.js b/contracts/test/ERC721toCW721PointerTest.js index 3ca1fe815..e6d21f32a 100644 --- a/contracts/test/ERC721toCW721PointerTest.js +++ b/contracts/test/ERC721toCW721PointerTest.js @@ -82,14 +82,24 @@ describe("ERC721 to CW721 Pointer", function () { describe("write", function(){ it("approve", async function () { + const blockNumber = await ethers.provider.getBlockNumber(); const approvedTxResp = await pointerAcc0.approve(accounts[1].evmAddress, 2) await approvedTxResp.wait() const approved = await pointerAcc0.getApproved(2); expect(approved).to.equal(accounts[1].evmAddress); - await expect(approvedTxResp) - .to.emit(pointerAcc0, 'Approval') - .withArgs(accounts[0].evmAddress, accounts[1].evmAddress, 2); + const filter = { + fromBlock: blockNumber, + toBlock: 'latest', + address: await pointerAcc1.getAddress(), + topics: [ethers.id("Approval(address,address,uint256)")] + }; + const logs = await ethers.provider.getLogs(filter); + expect(logs.length).to.equal(1); + expect(logs[0]["address"]).to.equal(await pointerAcc1.getAddress()); + expect(logs[0]["topics"][0]).to.equal(ethers.id("Approval(address,address,uint256)")); + expect(logs[0]["topics"][1].substring(26)).to.equal(accounts[0].evmAddress.substring(2).toLowerCase()); + expect(logs[0]["topics"][2].substring(26)).to.equal(accounts[1].evmAddress.substring(2).toLowerCase()); }); it("cannot approve token you don't own", async function () { @@ -99,11 +109,21 @@ describe("ERC721 to CW721 Pointer", function () { it("transfer from", async function () { // accounts[0] should transfer token id 2 to accounts[1] await mine(pointerAcc0.approve(accounts[1].evmAddress, 2)); + const blockNumber = await ethers.provider.getBlockNumber(); transferTxResp = await pointerAcc1.transferFrom(accounts[0].evmAddress, accounts[1].evmAddress, 2); await transferTxResp.wait(); - await expect(transferTxResp) - .to.emit(pointerAcc0, 'Transfer') - .withArgs(accounts[0].evmAddress, accounts[1].evmAddress, 2); + const filter = { + fromBlock: blockNumber, + toBlock: 'latest', + address: await pointerAcc1.getAddress(), + topics: [ethers.id("Transfer(address,address,uint256)")] + }; + const logs = await ethers.provider.getLogs(filter); + expect(logs.length).to.equal(1); + expect(logs[0]["address"]).to.equal(await pointerAcc1.getAddress()); + expect(logs[0]["topics"][0]).to.equal(ethers.id("Transfer(address,address,uint256)")); + expect(logs[0]["topics"][1].substring(26)).to.equal(accounts[1].evmAddress.substring(2).toLowerCase()); + expect(logs[0]["topics"][2].substring(26)).to.equal(accounts[1].evmAddress.substring(2).toLowerCase()); const balance0 = await pointerAcc0.balanceOf(accounts[0].evmAddress); expect(balance0).to.equal(0); const balance1 = await pointerAcc0.balanceOf(accounts[1].evmAddress); diff --git a/go.mod b/go.mod index 1aae20b4c..d1936690e 100644 --- a/go.mod +++ b/go.mod @@ -125,6 +125,7 @@ require ( github.com/fzipp/gocyclo v0.5.1 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect + github.com/ghodss/yaml v1.0.0 // indirect github.com/go-critic/go-critic v0.6.3 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect @@ -172,6 +173,7 @@ require ( github.com/gostaticanalysis/nilerr v0.1.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-bexpr v0.1.10 // indirect diff --git a/go.sum b/go.sum index 844170003..4ccbfb81a 100644 --- a/go.sum +++ b/go.sum @@ -457,6 +457,7 @@ github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2Gihuqh github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= @@ -765,6 +766,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/guptarohit/asciigraph v0.5.5/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag= diff --git a/proto/evm/receipt.proto b/proto/evm/receipt.proto index 49751bb01..4f89a62fb 100644 --- a/proto/evm/receipt.proto +++ b/proto/evm/receipt.proto @@ -10,6 +10,7 @@ message Log { repeated string topics = 2; bytes data = 3; uint32 index = 4; + bool synthetic = 5; } message Receipt { diff --git a/x/evm/artifacts/cw721/CW721ERC721Pointer.bin b/x/evm/artifacts/cw721/CW721ERC721Pointer.bin index 8c67fd57d..53a9a63c9 100644 --- a/x/evm/artifacts/cw721/CW721ERC721Pointer.bin +++ b/x/evm/artifacts/cw721/CW721ERC721Pointer.bin @@ -1 +1 @@ -608060405234801561000f575f80fd5b50604051614c2c380380614c2c8339818101604052810190610031919061027f565b8181815f90816100419190610530565b5080600190816100519190610530565b50505061100260095f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611003600a5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611004600b5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600890816101299190610530565b505050506105ff565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6101918261014b565b810181811067ffffffffffffffff821117156101b0576101af61015b565b5b80604052505050565b5f6101c2610132565b90506101ce8282610188565b919050565b5f67ffffffffffffffff8211156101ed576101ec61015b565b5b6101f68261014b565b9050602081019050919050565b8281835e5f83830152505050565b5f61022361021e846101d3565b6101b9565b90508281526020810184848401111561023f5761023e610147565b5b61024a848285610203565b509392505050565b5f82601f83011261026657610265610143565b5b8151610276848260208601610211565b91505092915050565b5f805f606084860312156102965761029561013b565b5b5f84015167ffffffffffffffff8111156102b3576102b261013f565b5b6102bf86828701610252565b935050602084015167ffffffffffffffff8111156102e0576102df61013f565b5b6102ec86828701610252565b925050604084015167ffffffffffffffff81111561030d5761030c61013f565b5b61031986828701610252565b9150509250925092565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061037157607f821691505b6020821081036103845761038361032d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026103e67fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826103ab565b6103f086836103ab565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f61043461042f61042a84610408565b610411565b610408565b9050919050565b5f819050919050565b61044d8361041a565b6104616104598261043b565b8484546103b7565b825550505050565b5f90565b610475610469565b610480818484610444565b505050565b5b818110156104a3576104985f8261046d565b600181019050610486565b5050565b601f8211156104e8576104b98161038a565b6104c28461039c565b810160208510156104d1578190505b6104e56104dd8561039c565b830182610485565b50505b505050565b5f82821c905092915050565b5f6105085f19846008026104ed565b1980831691505092915050565b5f61052083836104f9565b9150826002028217905092915050565b61053982610323565b67ffffffffffffffff8111156105525761055161015b565b5b61055c825461035a565b6105678282856104a7565b5f60209050601f831160018114610598575f8415610586578287015190505b6105908582610515565b8655506105f7565b601f1984166105a68661038a565b5f5b828110156105cd578489015182556001820191506020850194506020810190506105a8565b868310156105ea57848901516105e6601f8916826104f9565b8355505b6001600288020188555050505b505050505050565b6146208061060c5f395ff3fe608060405234801561000f575f80fd5b5060043610610135575f3560e01c80635c4aead7116100b6578063b88d4fde1161007a578063b88d4fde14610372578063c2aed3021461038e578063c87b56dd146103ac578063de4725cc146103dc578063e985e9c5146103fa578063f00b02551461042a57610135565b80635c4aead7146102ba5780636352211e146102d857806370a082311461030857806395d89b4114610338578063a22cb4651461035657610135565b806323b872dd116100fd57806323b872dd146101f15780632a55205a1461020d5780632f745c591461023e57806342842e0e1461026e5780634f6ccce71461028a57610135565b806301ffc9a71461013957806306fdde0314610169578063081812fc14610187578063095ea7b3146101b757806318160ddd146101d3575b5f80fd5b610153600480360381019061014e9190612f31565b610448565b6040516101609190612f76565b60405180910390f35b6101716105e9565b60405161017e9190612fff565b60405180910390f35b6101a1600480360381019061019c9190613052565b610678565b6040516101ae91906130bc565b60405180910390f35b6101d160048036038101906101cc91906130ff565b6109d2565b005b6101db610c0e565b6040516101e8919061314c565b60405180910390f35b61020b60048036038101906102069190613165565b610d85565b005b610227600480360381019061022291906131b5565b6110a0565b6040516102359291906131f3565b60405180910390f35b610258600480360381019061025391906130ff565b6116d1565b604051610265919061314c565b60405180910390f35b61028860048036038101906102839190613165565b61170d565b005b6102a4600480360381019061029f9190613052565b61172c565b6040516102b1919061314c565b60405180910390f35b6102c2611768565b6040516102cf9190612fff565b60405180910390f35b6102f260048036038101906102ed9190613052565b6117f4565b6040516102ff91906130bc565b60405180910390f35b610322600480360381019061031d919061321a565b611a7e565b60405161032f919061314c565b60405180910390f35b610340611ef9565b60405161034d9190612fff565b60405180910390f35b610370600480360381019061036b919061326f565b611f89565b005b61038c600480360381019061038791906133d9565b61218c565b005b6103966121a9565b6040516103a391906134b4565b60405180910390f35b6103c660048036038101906103c19190613052565b6121ce565b6040516103d39190612fff565b60405180910390f35b6103e46123cb565b6040516103f191906134ed565b60405180910390f35b610414600480360381019061040f9190613506565b6123f0565b6040516104219190612f76565b60405180910390f35b610432612824565b60405161043f9190613564565b60405180910390f35b5f7f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061051257507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061057a57507f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806105e257507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60605f80546105f7906135aa565b80601f0160208091040260200160405190810160405280929190818152602001828054610623906135aa565b801561066e5780601f106106455761010080835404028352916020019161066e565b820191905f5260205f20905b81548152906001019060200180831161065157829003601f168201915b5050505050905090565b5f806106c96040518060400160405280600881526020017f746f6b656e5f69640000000000000000000000000000000000000000000000008152506106c46106bf86612849565b612913565b61295b565b90505f61071b6107166040518060400160405280600981526020017f617070726f76616c730000000000000000000000000000000000000000000000815250610711856129ad565b61295b565b6129ad565b90505f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296008846040518363ffffffff1660e01b815260040161077b9291906136bf565b5f60405180830381865afa158015610795573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906107bd9190613762565b90505f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166387cdf621836040518263ffffffff1660e01b815260040161081a91906137f3565b5f60405180830381865afa158015610834573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061085c9190613908565b90505f815111156109c5575f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166308d858e5835f815181106108b8576108b761394f565b5b60200260200101516040518263ffffffff1660e01b81526004016108dc91906139c6565b5f60405180830381865afa1580156108f6573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061091e9190613762565b9050600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631778e539826040518263ffffffff1660e01b815260040161097a9190612fff565b602060405180830381865afa158015610995573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109b99190613a0d565b955050505050506109cd565b5f9450505050505b919050565b5f610ab56040518060400160405280600781526020017f7370656e64657200000000000000000000000000000000000000000000000000815250610ab0600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed876040518263ffffffff1660e01b8152600401610a6991906130bc565b5f60405180830381865afa158015610a83573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610aab9190613ad6565b612913565b61295b565b90505f610b076040518060400160405280600881526020017f746f6b656e5f6964000000000000000000000000000000000000000000000000815250610b02610afd86612849565b612913565b61295b565b90505f610b98610b936040518060400160405280600781526020017f617070726f766500000000000000000000000000000000000000000000000000815250610b8e610b8987876040518060400160405280600181526020017f2c000000000000000000000000000000000000000000000000000000000000008152506129f5565b6129ad565b61295b565b6129ad565b9050610ba381612a43565b50838573ffffffffffffffffffffffffffffffffffffffff16610bc5866117f4565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050505050565b5f8060095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d2960086040518060400160405280601181526020017f7b226e756d5f746f6b656e73223a7b7d7d0000000000000000000000000000008152506040518363ffffffff1660e01b8152600401610ca29291906136bf565b5f60405180830381865afa158015610cbc573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610ce49190613762565b9050600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635a558982826040518263ffffffff1660e01b8152600401610d409190613b67565b602060405180830381865afa158015610d5b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d7f9190613bae565b91505090565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610df5575f6040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401610dec91906130bc565b60405180910390fd5b610dfe816117f4565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610e6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6290613c23565b60405180910390fd5b5f610f4e6040518060400160405280600981526020017f726563697069656e740000000000000000000000000000000000000000000000815250610f49600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed876040518263ffffffff1660e01b8152600401610f0291906130bc565b5f60405180830381865afa158015610f1c573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610f449190613ad6565b612913565b61295b565b90505f610fa06040518060400160405280600881526020017f746f6b656e5f6964000000000000000000000000000000000000000000000000815250610f9b610f9686612849565b612913565b61295b565b90505f61103161102c6040518060400160405280600c81526020017f7472616e736665725f6e6674000000000000000000000000000000000000000081525061102761102287876040518060400160405280600181526020017f2c000000000000000000000000000000000000000000000000000000000000008152506129f5565b6129ad565b61295b565b6129ad565b905061103c81612a43565b50838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b5f805f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d2960086040518060600160405280602c81526020016145bf602c91396040518363ffffffff1660e01b81526004016111189291906136bf565b5f60405180830381865afa158015611132573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061115a9190613762565b90505f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166308d858e5836040518263ffffffff1660e01b81526004016111b79190613c8b565b5f60405180830381865afa1580156111d1573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906111f99190613762565b90507f6273151f959616268004b58dbb21e5c851b7b8d04498b4aabee12291d22fc034818051906020012014611264576040517f438c4bcb00000000000000000000000000000000000000000000000000000000815260040161125b90613d08565b60405180910390fd5b5f6112b46040518060400160405280600881526020017f746f6b656e5f69640000000000000000000000000000000000000000000000008152506112af6112aa8a612849565b612913565b61295b565b90505f6113066040518060400160405280600a81526020017f73616c655f7072696365000000000000000000000000000000000000000000008152506113016112fc8a612849565b612913565b61295b565b90505f6113976113926040518060400160405280600c81526020017f726f79616c74795f696e666f000000000000000000000000000000000000000081525061138d61138887876040518060400160405280600181526020017f2c000000000000000000000000000000000000000000000000000000000000008152506129f5565b6129ad565b61295b565b6129ad565b90505f6114276114226040518060400160405280600981526020017f657874656e73696f6e000000000000000000000000000000000000000000000081525061141d6114186040518060400160405280600381526020017f6d736700000000000000000000000000000000000000000000000000000000008152508761295b565b6129ad565b61295b565b6129ad565b90505f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296008846040518363ffffffff1660e01b81526004016114879291906136bf565b5f60405180830381865afa1580156114a1573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906114c99190613762565b90505f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166308d858e5836040518263ffffffff1660e01b81526004016115269190613d70565b5f60405180830381865afa158015611540573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906115689190613762565b90505f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635a558982846040518263ffffffff1660e01b81526004016115c59190613ded565b602060405180830381865afa1580156115e0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116049190613bae565b90505f825103611622575f819a509a505050505050505050506116ca565b600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631778e539836040518263ffffffff1660e01b815260040161167c9190612fff565b602060405180830381865afa158015611697573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116bb9190613a0d565b819a509a505050505050505050505b9250929050565b5f6040517f74115a7400000000000000000000000000000000000000000000000000000000815260040161170490613e6a565b60405180910390fd5b61172783838360405180602001604052805f81525061218c565b505050565b5f6040517f74115a7400000000000000000000000000000000000000000000000000000000815260040161175f90613ed2565b60405180910390fd5b60088054611775906135aa565b80601f01602080910402602001604051908101604052809291908181526020018280546117a1906135aa565b80156117ec5780601f106117c3576101008083540402835291602001916117ec565b820191905f5260205f20905b8154815290600101906020018083116117cf57829003601f168201915b505050505081565b5f806118456040518060400160405280600881526020017f746f6b656e5f696400000000000000000000000000000000000000000000000081525061184061183b86612849565b612913565b61295b565b90505f6118976118926040518060400160405280600881526020017f6f776e65725f6f6600000000000000000000000000000000000000000000000081525061188d856129ad565b61295b565b6129ad565b90505f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296008846040518363ffffffff1660e01b81526004016118f79291906136bf565b5f60405180830381865afa158015611911573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906119399190613762565b90505f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166308d858e5836040518263ffffffff1660e01b81526004016119969190613f3a565b5f60405180830381865afa1580156119b0573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906119d89190613762565b9050600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631778e539826040518263ffffffff1660e01b8152600401611a349190612fff565b602060405180830381865afa158015611a4f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a739190613a0d565b945050505050919050565b5f8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611aef575f6040517f89c62b64000000000000000000000000000000000000000000000000000000008152600401611ae691906130bc565b60405180910390fd5b5f60605f600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed866040518263ffffffff1660e01b8152600401611b4d91906130bc565b5f60405180830381865afa158015611b67573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611b8f9190613ad6565b604051602001611b9f9190613fcd565b604051602081830303815290604052604051602001611bbe9190614018565b60405160208183030381529060405290505f7fcc1a5a473fb6da314e591eaff47c9e633c2fdb385df3a7900f90f8a3ce756bdd905060605f8084604051602001611c089190614063565b604051602081830303815290604052604051602001611c2791906140ae565b60405160208183030381529060405290505f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296008846040518363ffffffff1660e01b8152600401611c969291906136bf565b5f60405180830381865afa158015611cb0573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611cd89190613762565b90505b84818051906020012014611ee957600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166387cdf621826040518263ffffffff1660e01b8152600401611d43919061411d565b5f60405180830381865afa158015611d5d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611d859190613908565b9350835192508288611d97919061417d565b975083600184611da791906141b0565b81518110611db857611db761394f565b5b6020026020010151604051602001611dd09190614209565b60405160208183030381529060405296508587604051602001611df492919061422e565b604051602081830303815290604052604051602001611e139190614063565b604051602081830303815290604052604051602001611e3291906140ae565b604051602081830303815290604052915060095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296008846040518363ffffffff1660e01b8152600401611ea09291906136bf565b5f60405180830381865afa158015611eba573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611ee29190613762565b9050611cdb565b8798505050505050505050919050565b606060018054611f08906135aa565b80601f0160208091040260200160405190810160405280929190818152602001828054611f34906135aa565b8015611f7f5780601f10611f5657610100808354040283529160200191611f7f565b820191905f5260205f20905b815481529060010190602001808311611f6257829003601f168201915b5050505050905090565b5f61207461206f6040518060400160405280600881526020017f6f70657261746f7200000000000000000000000000000000000000000000000081525061206a600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed886040518263ffffffff1660e01b815260040161202391906130bc565b5f60405180830381865afa15801561203d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906120659190613ad6565b612913565b61295b565b6129ad565b905081156120d1576120cb6120c66120c16040518060400160405280600b81526020017f617070726f76655f616c6c0000000000000000000000000000000000000000008152508461295b565b6129ad565b612a43565b50612122565b61212061211b6121166040518060400160405280600a81526020017f7265766f6b655f616c6c000000000000000000000000000000000000000000008152508461295b565b6129ad565b612a43565b505b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318460405161217f9190612f76565b60405180910390a3505050565b612197848484610d85565b6121a384848484612bc1565b50505050565b600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606121d9826117f4565b505f61222a6040518060400160405280600881526020017f746f6b656e5f696400000000000000000000000000000000000000000000000081525061222561222086612849565b612913565b61295b565b90505f61227c6122776040518060400160405280600881526020017f6e66745f696e666f000000000000000000000000000000000000000000000000815250612272856129ad565b61295b565b6129ad565b90505f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296008846040518363ffffffff1660e01b81526004016122dc9291906136bf565b5f60405180830381865afa1580156122f6573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061231e9190613762565b90505f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166308d858e5836040518263ffffffff1660e01b815260040161237b919061429b565b5f60405180830381865afa158015612395573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906123bd9190613762565b905080945050505050919050565b600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f806124d46040518060400160405280600581526020017f6f776e65720000000000000000000000000000000000000000000000000000008152506124cf600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed886040518263ffffffff1660e01b815260040161248891906130bc565b5f60405180830381865afa1580156124a2573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906124ca9190613ad6565b612913565b61295b565b90505f6125266125216040518060400160405280600d81526020017f616c6c5f6f70657261746f72730000000000000000000000000000000000000081525061251c856129ad565b61295b565b6129ad565b90505f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296008846040518363ffffffff1660e01b81526004016125869291906136bf565b5f60405180830381865afa1580156125a0573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906125c89190613762565b90505f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166387cdf621836040518263ffffffff1660e01b81526004016126259190614318565b5f60405180830381865afa15801561263f573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906126679190613908565b90505f5b8151811015612815575f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166308d858e58484815181106126c5576126c461394f565b5b60200260200101516040518263ffffffff1660e01b81526004016126e991906139c6565b5f60405180830381865afa158015612703573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061272b9190613762565b90508773ffffffffffffffffffffffffffffffffffffffff16600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631778e539836040518263ffffffff1660e01b815260040161279e9190612fff565b602060405180830381865afa1580156127b9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127dd9190613a0d565b73ffffffffffffffffffffffffffffffffffffffff1603612807576001965050505050505061281e565b50808060010191505061266b565b505f9450505050505b92915050565b60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60605f600161285784612d73565b0190505f8167ffffffffffffffff811115612875576128746132b5565b5b6040519080825280601f01601f1916602001820160405280156128a75781602001600182028036833780820191505090505b5090505f82602001820190505b600115612908578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816128fd576128fc61434b565b5b0494505f85036128b4575b819350505050919050565b6060816040516020016129269190614018565b6040516020818303038152906040526040516020016129459190614378565b6040516020818303038152906040529050919050565b60606129a561296984612913565b836040518060400160405280600181526020017f3a000000000000000000000000000000000000000000000000000000000000008152506129f5565b905092915050565b6060816040516020016129c091906143c3565b6040516020818303038152906040526040516020016129df919061440e565b6040516020818303038152906040529050919050565b6060838284604051602001612a0b92919061422e565b604051602081830303815290604052604051602001612a2b92919061422e565b60405160208183030381529060405290509392505050565b60605f8061100273ffffffffffffffffffffffffffffffffffffffff166008856040518060400160405280600281526020017f5b5d000000000000000000000000000000000000000000000000000000000000815250604051602401612aab93929190614433565b6040516020818303038152906040527f44d227ae000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051612b3591906144b7565b5f60405180830381855af49150503d805f8114612b6d576040519150601f19603f3d011682016040523d82523d5f602084013e612b72565b606091505b509150915081612bb7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bae90614517565b60405180910390fd5b8092505050919050565b5f8373ffffffffffffffffffffffffffffffffffffffff163b1115612d6d578273ffffffffffffffffffffffffffffffffffffffff1663150b7a02612c04612ec4565b8685856040518563ffffffff1660e01b8152600401612c269493929190614535565b6020604051808303815f875af1925050508015612c6157506040513d601f19601f82011682018060405250810190612c5e9190614593565b60015b612ce2573d805f8114612c8f576040519150601f19603f3d011682016040523d82523d5f602084013e612c94565b606091505b505f815103612cda57836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401612cd191906130bc565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612d6b57836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401612d6291906130bc565b60405180910390fd5b505b50505050565b5f805f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612dcf577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381612dc557612dc461434b565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310612e0c576d04ee2d6d415b85acef81000000008381612e0257612e0161434b565b5b0492506020810190505b662386f26fc100008310612e3b57662386f26fc100008381612e3157612e3061434b565b5b0492506010810190505b6305f5e1008310612e64576305f5e1008381612e5a57612e5961434b565b5b0492506008810190505b6127108310612e89576127108381612e7f57612e7e61434b565b5b0492506004810190505b60648310612eac5760648381612ea257612ea161434b565b5b0492506002810190505b600a8310612ebb576001810190505b80915050919050565b5f33905090565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612f1081612edc565b8114612f1a575f80fd5b50565b5f81359050612f2b81612f07565b92915050565b5f60208284031215612f4657612f45612ed4565b5b5f612f5384828501612f1d565b91505092915050565b5f8115159050919050565b612f7081612f5c565b82525050565b5f602082019050612f895f830184612f67565b92915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f612fd182612f8f565b612fdb8185612f99565b9350612feb818560208601612fa9565b612ff481612fb7565b840191505092915050565b5f6020820190508181035f8301526130178184612fc7565b905092915050565b5f819050919050565b6130318161301f565b811461303b575f80fd5b50565b5f8135905061304c81613028565b92915050565b5f6020828403121561306757613066612ed4565b5b5f6130748482850161303e565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6130a68261307d565b9050919050565b6130b68161309c565b82525050565b5f6020820190506130cf5f8301846130ad565b92915050565b6130de8161309c565b81146130e8575f80fd5b50565b5f813590506130f9816130d5565b92915050565b5f806040838503121561311557613114612ed4565b5b5f613122858286016130eb565b92505060206131338582860161303e565b9150509250929050565b6131468161301f565b82525050565b5f60208201905061315f5f83018461313d565b92915050565b5f805f6060848603121561317c5761317b612ed4565b5b5f613189868287016130eb565b935050602061319a868287016130eb565b92505060406131ab8682870161303e565b9150509250925092565b5f80604083850312156131cb576131ca612ed4565b5b5f6131d88582860161303e565b92505060206131e98582860161303e565b9150509250929050565b5f6040820190506132065f8301856130ad565b613213602083018461313d565b9392505050565b5f6020828403121561322f5761322e612ed4565b5b5f61323c848285016130eb565b91505092915050565b61324e81612f5c565b8114613258575f80fd5b50565b5f8135905061326981613245565b92915050565b5f806040838503121561328557613284612ed4565b5b5f613292858286016130eb565b92505060206132a38582860161325b565b9150509250929050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6132eb82612fb7565b810181811067ffffffffffffffff8211171561330a576133096132b5565b5b80604052505050565b5f61331c612ecb565b905061332882826132e2565b919050565b5f67ffffffffffffffff821115613347576133466132b5565b5b61335082612fb7565b9050602081019050919050565b828183375f83830152505050565b5f61337d6133788461332d565b613313565b905082815260208101848484011115613399576133986132b1565b5b6133a484828561335d565b509392505050565b5f82601f8301126133c0576133bf6132ad565b5b81356133d084826020860161336b565b91505092915050565b5f805f80608085870312156133f1576133f0612ed4565b5b5f6133fe878288016130eb565b945050602061340f878288016130eb565b93505060406134208782880161303e565b925050606085013567ffffffffffffffff81111561344157613440612ed8565b5b61344d878288016133ac565b91505092959194509250565b5f819050919050565b5f61347c6134776134728461307d565b613459565b61307d565b9050919050565b5f61348d82613462565b9050919050565b5f61349e82613483565b9050919050565b6134ae81613494565b82525050565b5f6020820190506134c75f8301846134a5565b92915050565b5f6134d782613483565b9050919050565b6134e7816134cd565b82525050565b5f6020820190506135005f8301846134de565b92915050565b5f806040838503121561351c5761351b612ed4565b5b5f613529858286016130eb565b925050602061353a858286016130eb565b9150509250929050565b5f61354e82613483565b9050919050565b61355e81613544565b82525050565b5f6020820190506135775f830184613555565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806135c157607f821691505b6020821081036135d4576135d361357d565b5b50919050565b5f819050815f5260205f209050919050565b5f81546135f8816135aa565b6136028186612f99565b9450600182165f811461361c576001811461363257613664565b60ff198316865281151560200286019350613664565b61363b856135da565b5f5b8381101561365c5781548189015260018201915060208101905061363d565b808801955050505b50505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f6136918261366d565b61369b8185613677565b93506136ab818560208601612fa9565b6136b481612fb7565b840191505092915050565b5f6040820190508181035f8301526136d781856135ec565b905081810360208301526136eb8184613687565b90509392505050565b5f6137066137018461332d565b613313565b905082815260208101848484011115613722576137216132b1565b5b61372d848285612fa9565b509392505050565b5f82601f830112613749576137486132ad565b5b81516137598482602086016136f4565b91505092915050565b5f6020828403121561377757613776612ed4565b5b5f82015167ffffffffffffffff81111561379457613793612ed8565b5b6137a084828501613735565b91505092915050565b7f617070726f76616c7300000000000000000000000000000000000000000000005f82015250565b5f6137dd600983612f99565b91506137e8826137a9565b602082019050919050565b5f6040820190508181035f83015261380b8184613687565b9050818103602083015261381e816137d1565b905092915050565b5f67ffffffffffffffff8211156138405761383f6132b5565b5b602082029050602081019050919050565b5f80fd5b5f61386761386284613826565b613313565b9050808382526020820190506020840283018581111561388a57613889613851565b5b835b818110156138d157805167ffffffffffffffff8111156138af576138ae6132ad565b5b8086016138bc8982613735565b8552602085019450505060208101905061388c565b5050509392505050565b5f82601f8301126138ef576138ee6132ad565b5b81516138ff848260208601613855565b91505092915050565b5f6020828403121561391d5761391c612ed4565b5b5f82015167ffffffffffffffff81111561393a57613939612ed8565b5b613946848285016138db565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f7370656e646572000000000000000000000000000000000000000000000000005f82015250565b5f6139b0600783612f99565b91506139bb8261397c565b602082019050919050565b5f6040820190508181035f8301526139de8184613687565b905081810360208301526139f1816139a4565b905092915050565b5f81519050613a07816130d5565b92915050565b5f60208284031215613a2257613a21612ed4565b5b5f613a2f848285016139f9565b91505092915050565b5f67ffffffffffffffff821115613a5257613a516132b5565b5b613a5b82612fb7565b9050602081019050919050565b5f613a7a613a7584613a38565b613313565b905082815260208101848484011115613a9657613a956132b1565b5b613aa1848285612fa9565b509392505050565b5f82601f830112613abd57613abc6132ad565b5b8151613acd848260208601613a68565b91505092915050565b5f60208284031215613aeb57613aea612ed4565b5b5f82015167ffffffffffffffff811115613b0857613b07612ed8565b5b613b1484828501613aa9565b91505092915050565b7f636f756e740000000000000000000000000000000000000000000000000000005f82015250565b5f613b51600583612f99565b9150613b5c82613b1d565b602082019050919050565b5f6040820190508181035f830152613b7f8184613687565b90508181036020830152613b9281613b45565b905092915050565b5f81519050613ba881613028565b92915050565b5f60208284031215613bc357613bc2612ed4565b5b5f613bd084828501613b9a565b91505092915050565b7f6066726f6d60206d75737420626520746865206f776e657200000000000000005f82015250565b5f613c0d601883612f99565b9150613c1882613bd9565b602082019050919050565b5f6020820190508181035f830152613c3a81613c01565b9050919050565b7f726f79616c74795f7061796d656e7473000000000000000000000000000000005f82015250565b5f613c75601083612f99565b9150613c8082613c41565b602082019050919050565b5f6040820190508181035f830152613ca38184613687565b90508181036020830152613cb681613c69565b905092915050565b7f726f79616c74795f696e666f00000000000000000000000000000000000000005f82015250565b5f613cf2600c83612f99565b9150613cfd82613cbe565b602082019050919050565b5f6020820190508181035f830152613d1f81613ce6565b9050919050565b7f61646472657373000000000000000000000000000000000000000000000000005f82015250565b5f613d5a600783612f99565b9150613d6582613d26565b602082019050919050565b5f6040820190508181035f830152613d888184613687565b90508181036020830152613d9b81613d4e565b905092915050565b7f726f79616c74795f616d6f756e740000000000000000000000000000000000005f82015250565b5f613dd7600e83612f99565b9150613de282613da3565b602082019050919050565b5f6040820190508181035f830152613e058184613687565b90508181036020830152613e1881613dcb565b905092915050565b7f746f6b656e4f664f776e65724279496e646578000000000000000000000000005f82015250565b5f613e54601383612f99565b9150613e5f82613e20565b602082019050919050565b5f6020820190508181035f830152613e8181613e48565b9050919050565b7f746f6b656e4279496e64657800000000000000000000000000000000000000005f82015250565b5f613ebc600c83612f99565b9150613ec782613e88565b602082019050919050565b5f6020820190508181035f830152613ee981613eb0565b9050919050565b7f6f776e65720000000000000000000000000000000000000000000000000000005f82015250565b5f613f24600583612f99565b9150613f2f82613ef0565b602082019050919050565b5f6040820190508181035f830152613f528184613687565b90508181036020830152613f6581613f18565b905092915050565b7f226c696d6974223a313030302c226f776e6572223a2200000000000000000000815250565b5f81905092915050565b5f613fa782612f8f565b613fb18185613f93565b9350613fc1818560208601612fa9565b80840191505092915050565b5f613fd782613f6d565b601682019150613fe78284613f9d565b915081905092915050565b7f2200000000000000000000000000000000000000000000000000000000000000815250565b5f6140238284613f9d565b915061402e82613ff2565b60018201915081905092915050565b7f7b22746f6b656e73223a7b000000000000000000000000000000000000000000815250565b5f61406d8261403d565b600b8201915061407d8284613f9d565b915081905092915050565b7f7d7d000000000000000000000000000000000000000000000000000000000000815250565b5f6140b98284613f9d565b91506140c482614088565b60028201915081905092915050565b7f746f6b656e7300000000000000000000000000000000000000000000000000005f82015250565b5f614107600683612f99565b9150614112826140d3565b602082019050919050565b5f6040820190508181035f8301526141358184613687565b90508181036020830152614148816140fb565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6141878261301f565b91506141928361301f565b92508282019050808211156141aa576141a9614150565b5b92915050565b5f6141ba8261301f565b91506141c58361301f565b92508282039050818111156141dd576141dc614150565b5b92915050565b7f2c2273746172745f6166746572223a0000000000000000000000000000000000815250565b5f614213826141e3565b600f820191506142238284613f9d565b915081905092915050565b5f6142398285613f9d565b91506142458284613f9d565b91508190509392505050565b7f746f6b656e5f75726900000000000000000000000000000000000000000000005f82015250565b5f614285600983612f99565b915061429082614251565b602082019050919050565b5f6040820190508181035f8301526142b38184613687565b905081810360208301526142c681614279565b905092915050565b7f6f70657261746f727300000000000000000000000000000000000000000000005f82015250565b5f614302600983612f99565b915061430d826142ce565b602082019050919050565b5f6040820190508181035f8301526143308184613687565b90508181036020830152614343816142f6565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61438282613ff2565b6001820191506143928284613f9d565b915081905092915050565b7f7d00000000000000000000000000000000000000000000000000000000000000815250565b5f6143ce8284613f9d565b91506143d98261439d565b60018201915081905092915050565b7f7b00000000000000000000000000000000000000000000000000000000000000815250565b5f614418826143e8565b6001820191506144288284613f9d565b915081905092915050565b5f6060820190508181035f83015261444b81866135ec565b9050818103602083015261445f8185613687565b905081810360408301526144738184613687565b9050949350505050565b5f81905092915050565b5f6144918261366d565b61449b818561447d565b93506144ab818560208601612fa9565b80840191505092915050565b5f6144c28284614487565b915081905092915050565b7f436f736d5761736d2065786563757465206661696c65640000000000000000005f82015250565b5f614501601783612f99565b915061450c826144cd565b602082019050919050565b5f6020820190508181035f83015261452e816144f5565b9050919050565b5f6080820190506145485f8301876130ad565b61455560208301866130ad565b614562604083018561313d565b81810360608301526145748184613687565b905095945050505050565b5f8151905061458d81612f07565b92915050565b5f602082840312156145a8576145a7612ed4565b5b5f6145b58482850161457f565b9150509291505056fe7b22657874656e73696f6e223a7b226d7367223a7b22636865636b5f726f79616c74696573223a7b7d7d7d7da26469706673582212202cfa5745319dd924bc8557dfafdf484a8e400b4f43ea1d4904335aa5e8097f2c64736f6c63430008190033 \ No newline at end of file +608060405234801562000010575f80fd5b5060405162004c0638038062004c068339818101604052810190620000369190620002c3565b8181815f9081620000489190620005b0565b5080600190816200005a9190620005b0565b50505061100260095f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611003600a5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611004600b5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508260089081620001349190620005b0565b5050505062000694565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6200019f8262000157565b810181811067ffffffffffffffff82111715620001c157620001c062000167565b5b80604052505050565b5f620001d56200013e565b9050620001e3828262000194565b919050565b5f67ffffffffffffffff82111562000205576200020462000167565b5b620002108262000157565b9050602081019050919050565b5f5b838110156200023c5780820151818401526020810190506200021f565b5f8484015250505050565b5f6200025d6200025784620001e8565b620001ca565b9050828152602081018484840111156200027c576200027b62000153565b5b620002898482856200021d565b509392505050565b5f82601f830112620002a857620002a76200014f565b5b8151620002ba84826020860162000247565b91505092915050565b5f805f60608486031215620002dd57620002dc62000147565b5b5f84015167ffffffffffffffff811115620002fd57620002fc6200014b565b5b6200030b8682870162000291565b935050602084015167ffffffffffffffff8111156200032f576200032e6200014b565b5b6200033d8682870162000291565b925050604084015167ffffffffffffffff8111156200036157620003606200014b565b5b6200036f8682870162000291565b9150509250925092565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620003c857607f821691505b602082108103620003de57620003dd62000383565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302620004427fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000405565b6200044e868362000405565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f62000498620004926200048c8462000466565b6200046f565b62000466565b9050919050565b5f819050919050565b620004b38362000478565b620004cb620004c2826200049f565b84845462000411565b825550505050565b5f90565b620004e1620004d3565b620004ee818484620004a8565b505050565b5b818110156200051557620005095f82620004d7565b600181019050620004f4565b5050565b601f82111562000564576200052e81620003e4565b6200053984620003f6565b8101602085101562000549578190505b620005616200055885620003f6565b830182620004f3565b50505b505050565b5f82821c905092915050565b5f620005865f198460080262000569565b1980831691505092915050565b5f620005a0838362000575565b9150826002028217905092915050565b620005bb8262000379565b67ffffffffffffffff811115620005d757620005d662000167565b5b620005e38254620003b0565b620005f082828562000519565b5f60209050601f83116001811462000626575f841562000611578287015190505b6200061d858262000593565b8655506200068c565b601f1984166200063686620003e4565b5f5b828110156200065f5784890151825560018201915060208501945060208101905062000638565b868310156200067f57848901516200067b601f89168262000575565b8355505b6001600288020188555050505b505050505050565b61456480620006a25f395ff3fe608060405234801561000f575f80fd5b5060043610610135575f3560e01c80635c4aead7116100b6578063b88d4fde1161007a578063b88d4fde14610372578063c2aed3021461038e578063c87b56dd146103ac578063de4725cc146103dc578063e985e9c5146103fa578063f00b02551461042a57610135565b80635c4aead7146102ba5780636352211e146102d857806370a082311461030857806395d89b4114610338578063a22cb4651461035657610135565b806323b872dd116100fd57806323b872dd146101f15780632a55205a1461020d5780632f745c591461023e57806342842e0e1461026e5780634f6ccce71461028a57610135565b806301ffc9a71461013957806306fdde0314610169578063081812fc14610187578063095ea7b3146101b757806318160ddd146101d3575b5f80fd5b610153600480360381019061014e9190612e14565b610448565b6040516101609190612e59565b60405180910390f35b6101716105e9565b60405161017e9190612efc565b60405180910390f35b6101a1600480360381019061019c9190612f4f565b610678565b6040516101ae9190612fb9565b60405180910390f35b6101d160048036038101906101cc9190612ffc565b6109d2565b005b6101db610bab565b6040516101e89190613049565b60405180910390f35b61020b60048036038101906102069190613062565b610d22565b005b610227600480360381019061022291906130b2565b610fe2565b6040516102359291906130f0565b60405180910390f35b61025860048036038101906102539190612ffc565b611613565b6040516102659190613049565b60405180910390f35b61028860048036038101906102839190613062565b61164f565b005b6102a4600480360381019061029f9190612f4f565b61166e565b6040516102b19190613049565b60405180910390f35b6102c26116aa565b6040516102cf9190612efc565b60405180910390f35b6102f260048036038101906102ed9190612f4f565b611736565b6040516102ff9190612fb9565b60405180910390f35b610322600480360381019061031d9190613117565b6119c0565b60405161032f9190613049565b60405180910390f35b610340611e3b565b60405161034d9190612efc565b60405180910390f35b610370600480360381019061036b919061316c565b611ecb565b005b61038c600480360381019061038791906132d6565b612069565b005b610396612086565b6040516103a391906133b1565b60405180910390f35b6103c660048036038101906103c19190612f4f565b6120ab565b6040516103d39190612efc565b60405180910390f35b6103e46122a8565b6040516103f191906133ea565b60405180910390f35b610414600480360381019061040f9190613403565b6122cd565b6040516104219190612e59565b60405180910390f35b610432612707565b60405161043f9190613461565b60405180910390f35b5f7f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061051257507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061057a57507f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806105e257507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60605f80546105f7906134a7565b80601f0160208091040260200160405190810160405280929190818152602001828054610623906134a7565b801561066e5780601f106106455761010080835404028352916020019161066e565b820191905f5260205f20905b81548152906001019060200180831161065157829003601f168201915b5050505050905090565b5f806106c96040518060400160405280600881526020017f746f6b656e5f69640000000000000000000000000000000000000000000000008152506106c46106bf8661272c565b6127f6565b61283e565b90505f61071b6107166040518060400160405280600981526020017f617070726f76616c73000000000000000000000000000000000000000000000081525061071185612890565b61283e565b612890565b90505f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296008846040518363ffffffff1660e01b815260040161077b9291906135bc565b5f60405180830381865afa158015610795573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906107bd919061365f565b90505f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166387cdf621836040518263ffffffff1660e01b815260040161081a91906136f0565b5f60405180830381865afa158015610834573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061085c9190613805565b90505f815111156109c5575f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166308d858e5835f815181106108b8576108b761384c565b5b60200260200101516040518263ffffffff1660e01b81526004016108dc91906138c3565b5f60405180830381865afa1580156108f6573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061091e919061365f565b9050600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631778e539826040518263ffffffff1660e01b815260040161097a9190612efc565b602060405180830381865afa158015610995573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109b9919061390a565b955050505050506109cd565b5f9450505050505b919050565b5f610ab56040518060400160405280600781526020017f7370656e64657200000000000000000000000000000000000000000000000000815250610ab0600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed876040518263ffffffff1660e01b8152600401610a699190612fb9565b5f60405180830381865afa158015610a83573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610aab91906139d3565b6127f6565b61283e565b90505f610b076040518060400160405280600881526020017f746f6b656e5f6964000000000000000000000000000000000000000000000000815250610b02610afd8661272c565b6127f6565b61283e565b90505f610b98610b936040518060400160405280600781526020017f617070726f766500000000000000000000000000000000000000000000000000815250610b8e610b8987876040518060400160405280600181526020017f2c000000000000000000000000000000000000000000000000000000000000008152506128d8565b612890565b61283e565b612890565b9050610ba381612926565b505050505050565b5f8060095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d2960086040518060400160405280601181526020017f7b226e756d5f746f6b656e73223a7b7d7d0000000000000000000000000000008152506040518363ffffffff1660e01b8152600401610c3f9291906135bc565b5f60405180830381865afa158015610c59573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610c81919061365f565b9050600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635a558982826040518263ffffffff1660e01b8152600401610cdd9190613a64565b602060405180830381865afa158015610cf8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d1c9190613aab565b91505090565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610d92575f6040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401610d899190612fb9565b60405180910390fd5b610d9b81611736565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610e08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dff90613b20565b60405180910390fd5b5f610eeb6040518060400160405280600981526020017f726563697069656e740000000000000000000000000000000000000000000000815250610ee6600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed876040518263ffffffff1660e01b8152600401610e9f9190612fb9565b5f60405180830381865afa158015610eb9573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610ee191906139d3565b6127f6565b61283e565b90505f610f3d6040518060400160405280600881526020017f746f6b656e5f6964000000000000000000000000000000000000000000000000815250610f38610f338661272c565b6127f6565b61283e565b90505f610fce610fc96040518060400160405280600c81526020017f7472616e736665725f6e66740000000000000000000000000000000000000000815250610fc4610fbf87876040518060400160405280600181526020017f2c000000000000000000000000000000000000000000000000000000000000008152506128d8565b612890565b61283e565b612890565b9050610fd981612926565b50505050505050565b5f805f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d2960086040518060600160405280602c8152602001614503602c91396040518363ffffffff1660e01b815260040161105a9291906135bc565b5f60405180830381865afa158015611074573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061109c919061365f565b90505f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166308d858e5836040518263ffffffff1660e01b81526004016110f99190613b88565b5f60405180830381865afa158015611113573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061113b919061365f565b90507f6273151f959616268004b58dbb21e5c851b7b8d04498b4aabee12291d22fc0348180519060200120146111a6576040517f438c4bcb00000000000000000000000000000000000000000000000000000000815260040161119d90613c05565b60405180910390fd5b5f6111f66040518060400160405280600881526020017f746f6b656e5f69640000000000000000000000000000000000000000000000008152506111f16111ec8a61272c565b6127f6565b61283e565b90505f6112486040518060400160405280600a81526020017f73616c655f70726963650000000000000000000000000000000000000000000081525061124361123e8a61272c565b6127f6565b61283e565b90505f6112d96112d46040518060400160405280600c81526020017f726f79616c74795f696e666f00000000000000000000000000000000000000008152506112cf6112ca87876040518060400160405280600181526020017f2c000000000000000000000000000000000000000000000000000000000000008152506128d8565b612890565b61283e565b612890565b90505f6113696113646040518060400160405280600981526020017f657874656e73696f6e000000000000000000000000000000000000000000000081525061135f61135a6040518060400160405280600381526020017f6d736700000000000000000000000000000000000000000000000000000000008152508761283e565b612890565b61283e565b612890565b90505f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296008846040518363ffffffff1660e01b81526004016113c99291906135bc565b5f60405180830381865afa1580156113e3573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061140b919061365f565b90505f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166308d858e5836040518263ffffffff1660e01b81526004016114689190613c6d565b5f60405180830381865afa158015611482573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906114aa919061365f565b90505f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635a558982846040518263ffffffff1660e01b81526004016115079190613cea565b602060405180830381865afa158015611522573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115469190613aab565b90505f825103611564575f819a509a5050505050505050505061160c565b600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631778e539836040518263ffffffff1660e01b81526004016115be9190612efc565b602060405180830381865afa1580156115d9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115fd919061390a565b819a509a505050505050505050505b9250929050565b5f6040517f74115a7400000000000000000000000000000000000000000000000000000000815260040161164690613d67565b60405180910390fd5b61166983838360405180602001604052805f815250612069565b505050565b5f6040517f74115a740000000000000000000000000000000000000000000000000000000081526004016116a190613dcf565b60405180910390fd5b600880546116b7906134a7565b80601f01602080910402602001604051908101604052809291908181526020018280546116e3906134a7565b801561172e5780601f106117055761010080835404028352916020019161172e565b820191905f5260205f20905b81548152906001019060200180831161171157829003601f168201915b505050505081565b5f806117876040518060400160405280600881526020017f746f6b656e5f696400000000000000000000000000000000000000000000000081525061178261177d8661272c565b6127f6565b61283e565b90505f6117d96117d46040518060400160405280600881526020017f6f776e65725f6f660000000000000000000000000000000000000000000000008152506117cf85612890565b61283e565b612890565b90505f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296008846040518363ffffffff1660e01b81526004016118399291906135bc565b5f60405180830381865afa158015611853573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061187b919061365f565b90505f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166308d858e5836040518263ffffffff1660e01b81526004016118d89190613e37565b5f60405180830381865afa1580156118f2573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061191a919061365f565b9050600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631778e539826040518263ffffffff1660e01b81526004016119769190612efc565b602060405180830381865afa158015611991573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119b5919061390a565b945050505050919050565b5f8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611a31575f6040517f89c62b64000000000000000000000000000000000000000000000000000000008152600401611a289190612fb9565b60405180910390fd5b5f60605f600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed866040518263ffffffff1660e01b8152600401611a8f9190612fb9565b5f60405180830381865afa158015611aa9573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611ad191906139d3565b604051602001611ae19190613eca565b604051602081830303815290604052604051602001611b009190613f15565b60405160208183030381529060405290505f7fcc1a5a473fb6da314e591eaff47c9e633c2fdb385df3a7900f90f8a3ce756bdd905060605f8084604051602001611b4a9190613f60565b604051602081830303815290604052604051602001611b699190613fab565b60405160208183030381529060405290505f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296008846040518363ffffffff1660e01b8152600401611bd89291906135bc565b5f60405180830381865afa158015611bf2573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611c1a919061365f565b90505b84818051906020012014611e2b57600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166387cdf621826040518263ffffffff1660e01b8152600401611c85919061401a565b5f60405180830381865afa158015611c9f573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611cc79190613805565b9350835192508288611cd9919061407a565b975083600184611ce991906140ad565b81518110611cfa57611cf961384c565b5b6020026020010151604051602001611d129190614106565b60405160208183030381529060405296508587604051602001611d3692919061412b565b604051602081830303815290604052604051602001611d559190613f60565b604051602081830303815290604052604051602001611d749190613fab565b604051602081830303815290604052915060095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296008846040518363ffffffff1660e01b8152600401611de29291906135bc565b5f60405180830381865afa158015611dfc573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611e24919061365f565b9050611c1d565b8798505050505050505050919050565b606060018054611e4a906134a7565b80601f0160208091040260200160405190810160405280929190818152602001828054611e76906134a7565b8015611ec15780601f10611e9857610100808354040283529160200191611ec1565b820191905f5260205f20905b815481529060010190602001808311611ea457829003601f168201915b5050505050905090565b5f611fb6611fb16040518060400160405280600881526020017f6f70657261746f72000000000000000000000000000000000000000000000000815250611fac600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed886040518263ffffffff1660e01b8152600401611f659190612fb9565b5f60405180830381865afa158015611f7f573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611fa791906139d3565b6127f6565b61283e565b612890565b905081156120135761200d6120086120036040518060400160405280600b81526020017f617070726f76655f616c6c0000000000000000000000000000000000000000008152508461283e565b612890565b612926565b50612064565b61206261205d6120586040518060400160405280600a81526020017f7265766f6b655f616c6c000000000000000000000000000000000000000000008152508461283e565b612890565b612926565b505b505050565b612074848484610d22565b61208084848484612aa4565b50505050565b600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606120b682611736565b505f6121076040518060400160405280600881526020017f746f6b656e5f69640000000000000000000000000000000000000000000000008152506121026120fd8661272c565b6127f6565b61283e565b90505f6121596121546040518060400160405280600881526020017f6e66745f696e666f00000000000000000000000000000000000000000000000081525061214f85612890565b61283e565b612890565b90505f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296008846040518363ffffffff1660e01b81526004016121b99291906135bc565b5f60405180830381865afa1580156121d3573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906121fb919061365f565b90505f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166308d858e5836040518263ffffffff1660e01b81526004016122589190614198565b5f60405180830381865afa158015612272573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061229a919061365f565b905080945050505050919050565b600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f806123b16040518060400160405280600581526020017f6f776e65720000000000000000000000000000000000000000000000000000008152506123ac600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c3c20ed886040518263ffffffff1660e01b81526004016123659190612fb9565b5f60405180830381865afa15801561237f573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906123a791906139d3565b6127f6565b61283e565b90505f6124036123fe6040518060400160405280600d81526020017f616c6c5f6f70657261746f7273000000000000000000000000000000000000008152506123f985612890565b61283e565b612890565b90505f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306d81d296008846040518363ffffffff1660e01b81526004016124639291906135bc565b5f60405180830381865afa15801561247d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906124a5919061365f565b90505f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166387cdf621836040518263ffffffff1660e01b81526004016125029190614215565b5f60405180830381865afa15801561251c573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906125449190613805565b90505f5b81518110156126f8575f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166308d858e58484815181106125a2576125a161384c565b5b60200260200101516040518263ffffffff1660e01b81526004016125c691906138c3565b5f60405180830381865afa1580156125e0573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190612608919061365f565b90508773ffffffffffffffffffffffffffffffffffffffff16600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631778e539836040518263ffffffff1660e01b815260040161267b9190612efc565b602060405180830381865afa158015612696573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126ba919061390a565b73ffffffffffffffffffffffffffffffffffffffff16036126e45760019650505050505050612701565b5080806126f090614248565b915050612548565b505f9450505050505b92915050565b60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60605f600161273a84612c56565b0190505f8167ffffffffffffffff811115612758576127576131b2565b5b6040519080825280601f01601f19166020018201604052801561278a5781602001600182028036833780820191505090505b5090505f82602001820190505b6001156127eb578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816127e0576127df61428f565b5b0494505f8503612797575b819350505050919050565b6060816040516020016128099190613f15565b60405160208183030381529060405260405160200161282891906142bc565b6040516020818303038152906040529050919050565b606061288861284c846127f6565b836040518060400160405280600181526020017f3a000000000000000000000000000000000000000000000000000000000000008152506128d8565b905092915050565b6060816040516020016128a39190614307565b6040516020818303038152906040526040516020016128c29190614352565b6040516020818303038152906040529050919050565b60608382846040516020016128ee92919061412b565b60405160208183030381529060405260405160200161290e92919061412b565b60405160208183030381529060405290509392505050565b60605f8061100273ffffffffffffffffffffffffffffffffffffffff166008856040518060400160405280600281526020017f5b5d00000000000000000000000000000000000000000000000000000000000081525060405160240161298e93929190614377565b6040516020818303038152906040527f44d227ae000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051612a1891906143fb565b5f60405180830381855af49150503d805f8114612a50576040519150601f19603f3d011682016040523d82523d5f602084013e612a55565b606091505b509150915081612a9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a919061445b565b60405180910390fd5b8092505050919050565b5f8373ffffffffffffffffffffffffffffffffffffffff163b1115612c50578273ffffffffffffffffffffffffffffffffffffffff1663150b7a02612ae7612da7565b8685856040518563ffffffff1660e01b8152600401612b099493929190614479565b6020604051808303815f875af1925050508015612b4457506040513d601f19601f82011682018060405250810190612b4191906144d7565b60015b612bc5573d805f8114612b72576040519150601f19603f3d011682016040523d82523d5f602084013e612b77565b606091505b505f815103612bbd57836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401612bb49190612fb9565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612c4e57836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401612c459190612fb9565b60405180910390fd5b505b50505050565b5f805f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612cb2577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381612ca857612ca761428f565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310612cef576d04ee2d6d415b85acef81000000008381612ce557612ce461428f565b5b0492506020810190505b662386f26fc100008310612d1e57662386f26fc100008381612d1457612d1361428f565b5b0492506010810190505b6305f5e1008310612d47576305f5e1008381612d3d57612d3c61428f565b5b0492506008810190505b6127108310612d6c576127108381612d6257612d6161428f565b5b0492506004810190505b60648310612d8f5760648381612d8557612d8461428f565b5b0492506002810190505b600a8310612d9e576001810190505b80915050919050565b5f33905090565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612df381612dbf565b8114612dfd575f80fd5b50565b5f81359050612e0e81612dea565b92915050565b5f60208284031215612e2957612e28612db7565b5b5f612e3684828501612e00565b91505092915050565b5f8115159050919050565b612e5381612e3f565b82525050565b5f602082019050612e6c5f830184612e4a565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015612ea9578082015181840152602081019050612e8e565b5f8484015250505050565b5f601f19601f8301169050919050565b5f612ece82612e72565b612ed88185612e7c565b9350612ee8818560208601612e8c565b612ef181612eb4565b840191505092915050565b5f6020820190508181035f830152612f148184612ec4565b905092915050565b5f819050919050565b612f2e81612f1c565b8114612f38575f80fd5b50565b5f81359050612f4981612f25565b92915050565b5f60208284031215612f6457612f63612db7565b5b5f612f7184828501612f3b565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612fa382612f7a565b9050919050565b612fb381612f99565b82525050565b5f602082019050612fcc5f830184612faa565b92915050565b612fdb81612f99565b8114612fe5575f80fd5b50565b5f81359050612ff681612fd2565b92915050565b5f806040838503121561301257613011612db7565b5b5f61301f85828601612fe8565b925050602061303085828601612f3b565b9150509250929050565b61304381612f1c565b82525050565b5f60208201905061305c5f83018461303a565b92915050565b5f805f6060848603121561307957613078612db7565b5b5f61308686828701612fe8565b935050602061309786828701612fe8565b92505060406130a886828701612f3b565b9150509250925092565b5f80604083850312156130c8576130c7612db7565b5b5f6130d585828601612f3b565b92505060206130e685828601612f3b565b9150509250929050565b5f6040820190506131035f830185612faa565b613110602083018461303a565b9392505050565b5f6020828403121561312c5761312b612db7565b5b5f61313984828501612fe8565b91505092915050565b61314b81612e3f565b8114613155575f80fd5b50565b5f8135905061316681613142565b92915050565b5f806040838503121561318257613181612db7565b5b5f61318f85828601612fe8565b92505060206131a085828601613158565b9150509250929050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6131e882612eb4565b810181811067ffffffffffffffff82111715613207576132066131b2565b5b80604052505050565b5f613219612dae565b905061322582826131df565b919050565b5f67ffffffffffffffff821115613244576132436131b2565b5b61324d82612eb4565b9050602081019050919050565b828183375f83830152505050565b5f61327a6132758461322a565b613210565b905082815260208101848484011115613296576132956131ae565b5b6132a184828561325a565b509392505050565b5f82601f8301126132bd576132bc6131aa565b5b81356132cd848260208601613268565b91505092915050565b5f805f80608085870312156132ee576132ed612db7565b5b5f6132fb87828801612fe8565b945050602061330c87828801612fe8565b935050604061331d87828801612f3b565b925050606085013567ffffffffffffffff81111561333e5761333d612dbb565b5b61334a878288016132a9565b91505092959194509250565b5f819050919050565b5f61337961337461336f84612f7a565b613356565b612f7a565b9050919050565b5f61338a8261335f565b9050919050565b5f61339b82613380565b9050919050565b6133ab81613391565b82525050565b5f6020820190506133c45f8301846133a2565b92915050565b5f6133d482613380565b9050919050565b6133e4816133ca565b82525050565b5f6020820190506133fd5f8301846133db565b92915050565b5f806040838503121561341957613418612db7565b5b5f61342685828601612fe8565b925050602061343785828601612fe8565b9150509250929050565b5f61344b82613380565b9050919050565b61345b81613441565b82525050565b5f6020820190506134745f830184613452565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806134be57607f821691505b6020821081036134d1576134d061347a565b5b50919050565b5f819050815f5260205f209050919050565b5f81546134f5816134a7565b6134ff8186612e7c565b9450600182165f8114613519576001811461352f57613561565b60ff198316865281151560200286019350613561565b613538856134d7565b5f5b838110156135595781548189015260018201915060208101905061353a565b808801955050505b50505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f61358e8261356a565b6135988185613574565b93506135a8818560208601612e8c565b6135b181612eb4565b840191505092915050565b5f6040820190508181035f8301526135d481856134e9565b905081810360208301526135e88184613584565b90509392505050565b5f6136036135fe8461322a565b613210565b90508281526020810184848401111561361f5761361e6131ae565b5b61362a848285612e8c565b509392505050565b5f82601f830112613646576136456131aa565b5b81516136568482602086016135f1565b91505092915050565b5f6020828403121561367457613673612db7565b5b5f82015167ffffffffffffffff81111561369157613690612dbb565b5b61369d84828501613632565b91505092915050565b7f617070726f76616c7300000000000000000000000000000000000000000000005f82015250565b5f6136da600983612e7c565b91506136e5826136a6565b602082019050919050565b5f6040820190508181035f8301526137088184613584565b9050818103602083015261371b816136ce565b905092915050565b5f67ffffffffffffffff82111561373d5761373c6131b2565b5b602082029050602081019050919050565b5f80fd5b5f61376461375f84613723565b613210565b905080838252602082019050602084028301858111156137875761378661374e565b5b835b818110156137ce57805167ffffffffffffffff8111156137ac576137ab6131aa565b5b8086016137b98982613632565b85526020850194505050602081019050613789565b5050509392505050565b5f82601f8301126137ec576137eb6131aa565b5b81516137fc848260208601613752565b91505092915050565b5f6020828403121561381a57613819612db7565b5b5f82015167ffffffffffffffff81111561383757613836612dbb565b5b613843848285016137d8565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f7370656e646572000000000000000000000000000000000000000000000000005f82015250565b5f6138ad600783612e7c565b91506138b882613879565b602082019050919050565b5f6040820190508181035f8301526138db8184613584565b905081810360208301526138ee816138a1565b905092915050565b5f8151905061390481612fd2565b92915050565b5f6020828403121561391f5761391e612db7565b5b5f61392c848285016138f6565b91505092915050565b5f67ffffffffffffffff82111561394f5761394e6131b2565b5b61395882612eb4565b9050602081019050919050565b5f61397761397284613935565b613210565b905082815260208101848484011115613993576139926131ae565b5b61399e848285612e8c565b509392505050565b5f82601f8301126139ba576139b96131aa565b5b81516139ca848260208601613965565b91505092915050565b5f602082840312156139e8576139e7612db7565b5b5f82015167ffffffffffffffff811115613a0557613a04612dbb565b5b613a11848285016139a6565b91505092915050565b7f636f756e740000000000000000000000000000000000000000000000000000005f82015250565b5f613a4e600583612e7c565b9150613a5982613a1a565b602082019050919050565b5f6040820190508181035f830152613a7c8184613584565b90508181036020830152613a8f81613a42565b905092915050565b5f81519050613aa581612f25565b92915050565b5f60208284031215613ac057613abf612db7565b5b5f613acd84828501613a97565b91505092915050565b7f6066726f6d60206d75737420626520746865206f776e657200000000000000005f82015250565b5f613b0a601883612e7c565b9150613b1582613ad6565b602082019050919050565b5f6020820190508181035f830152613b3781613afe565b9050919050565b7f726f79616c74795f7061796d656e7473000000000000000000000000000000005f82015250565b5f613b72601083612e7c565b9150613b7d82613b3e565b602082019050919050565b5f6040820190508181035f830152613ba08184613584565b90508181036020830152613bb381613b66565b905092915050565b7f726f79616c74795f696e666f00000000000000000000000000000000000000005f82015250565b5f613bef600c83612e7c565b9150613bfa82613bbb565b602082019050919050565b5f6020820190508181035f830152613c1c81613be3565b9050919050565b7f61646472657373000000000000000000000000000000000000000000000000005f82015250565b5f613c57600783612e7c565b9150613c6282613c23565b602082019050919050565b5f6040820190508181035f830152613c858184613584565b90508181036020830152613c9881613c4b565b905092915050565b7f726f79616c74795f616d6f756e740000000000000000000000000000000000005f82015250565b5f613cd4600e83612e7c565b9150613cdf82613ca0565b602082019050919050565b5f6040820190508181035f830152613d028184613584565b90508181036020830152613d1581613cc8565b905092915050565b7f746f6b656e4f664f776e65724279496e646578000000000000000000000000005f82015250565b5f613d51601383612e7c565b9150613d5c82613d1d565b602082019050919050565b5f6020820190508181035f830152613d7e81613d45565b9050919050565b7f746f6b656e4279496e64657800000000000000000000000000000000000000005f82015250565b5f613db9600c83612e7c565b9150613dc482613d85565b602082019050919050565b5f6020820190508181035f830152613de681613dad565b9050919050565b7f6f776e65720000000000000000000000000000000000000000000000000000005f82015250565b5f613e21600583612e7c565b9150613e2c82613ded565b602082019050919050565b5f6040820190508181035f830152613e4f8184613584565b90508181036020830152613e6281613e15565b905092915050565b7f226c696d6974223a313030302c226f776e6572223a2200000000000000000000815250565b5f81905092915050565b5f613ea482612e72565b613eae8185613e90565b9350613ebe818560208601612e8c565b80840191505092915050565b5f613ed482613e6a565b601682019150613ee48284613e9a565b915081905092915050565b7f2200000000000000000000000000000000000000000000000000000000000000815250565b5f613f208284613e9a565b9150613f2b82613eef565b60018201915081905092915050565b7f7b22746f6b656e73223a7b000000000000000000000000000000000000000000815250565b5f613f6a82613f3a565b600b82019150613f7a8284613e9a565b915081905092915050565b7f7d7d000000000000000000000000000000000000000000000000000000000000815250565b5f613fb68284613e9a565b9150613fc182613f85565b60028201915081905092915050565b7f746f6b656e7300000000000000000000000000000000000000000000000000005f82015250565b5f614004600683612e7c565b915061400f82613fd0565b602082019050919050565b5f6040820190508181035f8301526140328184613584565b9050818103602083015261404581613ff8565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61408482612f1c565b915061408f83612f1c565b92508282019050808211156140a7576140a661404d565b5b92915050565b5f6140b782612f1c565b91506140c283612f1c565b92508282039050818111156140da576140d961404d565b5b92915050565b7f2c2273746172745f6166746572223a0000000000000000000000000000000000815250565b5f614110826140e0565b600f820191506141208284613e9a565b915081905092915050565b5f6141368285613e9a565b91506141428284613e9a565b91508190509392505050565b7f746f6b656e5f75726900000000000000000000000000000000000000000000005f82015250565b5f614182600983612e7c565b915061418d8261414e565b602082019050919050565b5f6040820190508181035f8301526141b08184613584565b905081810360208301526141c381614176565b905092915050565b7f6f70657261746f727300000000000000000000000000000000000000000000005f82015250565b5f6141ff600983612e7c565b915061420a826141cb565b602082019050919050565b5f6040820190508181035f83015261422d8184613584565b90508181036020830152614240816141f3565b905092915050565b5f61425282612f1c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036142845761428361404d565b5b600182019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6142c682613eef565b6001820191506142d68284613e9a565b915081905092915050565b7f7d00000000000000000000000000000000000000000000000000000000000000815250565b5f6143128284613e9a565b915061431d826142e1565b60018201915081905092915050565b7f7b00000000000000000000000000000000000000000000000000000000000000815250565b5f61435c8261432c565b60018201915061436c8284613e9a565b915081905092915050565b5f6060820190508181035f83015261438f81866134e9565b905081810360208301526143a38185613584565b905081810360408301526143b78184613584565b9050949350505050565b5f81905092915050565b5f6143d58261356a565b6143df81856143c1565b93506143ef818560208601612e8c565b80840191505092915050565b5f61440682846143cb565b915081905092915050565b7f436f736d5761736d2065786563757465206661696c65640000000000000000005f82015250565b5f614445601783612e7c565b915061445082614411565b602082019050919050565b5f6020820190508181035f83015261447281614439565b9050919050565b5f60808201905061448c5f830187612faa565b6144996020830186612faa565b6144a6604083018561303a565b81810360608301526144b88184613584565b905095945050505050565b5f815190506144d181612dea565b92915050565b5f602082840312156144ec576144eb612db7565b5b5f6144f9848285016144c3565b9150509291505056fe7b22657874656e73696f6e223a7b226d7367223a7b22636865636b5f726f79616c74696573223a7b7d7d7d7da2646970667358221220f23f66730b2e9f7f1adacf04644ee581995acf595c055e83129163cca97d8c8f64736f6c63430008150033 \ No newline at end of file diff --git a/x/evm/artifacts/cw721/artifacts.go b/x/evm/artifacts/cw721/artifacts.go index 38cb29b63..13bef4800 100644 --- a/x/evm/artifacts/cw721/artifacts.go +++ b/x/evm/artifacts/cw721/artifacts.go @@ -10,7 +10,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" ) -const CurrentVersion uint16 = 4 +const CurrentVersion uint16 = 5 //go:embed CW721ERC721Pointer.abi //go:embed CW721ERC721Pointer.bin diff --git a/x/evm/keeper/log.go b/x/evm/keeper/log.go index c7012780c..b7078759f 100644 --- a/x/evm/keeper/log.go +++ b/x/evm/keeper/log.go @@ -58,3 +58,9 @@ func ConvertEthLog(l *ethtypes.Log) *types.Log { Index: uint32(l.Index), } } + +func ConvertSyntheticEthLog(l *ethtypes.Log) *types.Log { + log := ConvertEthLog(l) + log.Synthetic = true + return log +} diff --git a/x/evm/types/receipt.pb.go b/x/evm/types/receipt.pb.go index 1cbb846e8..b636d167b 100644 --- a/x/evm/types/receipt.pb.go +++ b/x/evm/types/receipt.pb.go @@ -24,10 +24,11 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Log struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Topics []string `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - Index uint32 `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Topics []string `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + Index uint32 `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"` + Synthetic bool `protobuf:"varint,5,opt,name=synthetic,proto3" json:"synthetic,omitempty"` } func (m *Log) Reset() { *m = Log{} } @@ -91,6 +92,13 @@ func (m *Log) GetIndex() uint32 { return 0 } +func (m *Log) GetSynthetic() bool { + if m != nil { + return m.Synthetic + } + return false +} + type Receipt struct { TxType uint32 `protobuf:"varint,1,opt,name=tx_type,json=txType,proto3" json:"tx_type,omitempty" yaml:"tx_type"` CumulativeGasUsed uint64 `protobuf:"varint,2,opt,name=cumulative_gas_used,json=cumulativeGasUsed,proto3" json:"cumulative_gas_used,omitempty" yaml:"cumulative_gas_used"` @@ -247,46 +255,47 @@ func init() { func init() { proto.RegisterFile("evm/receipt.proto", fileDescriptor_d864f6bdca684f52) } var fileDescriptor_d864f6bdca684f52 = []byte{ - // 610 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0x41, 0x4f, 0xdb, 0x4c, - 0x10, 0xc5, 0x49, 0x48, 0xf0, 0x86, 0x00, 0xd9, 0x20, 0x58, 0xf1, 0x81, 0x1d, 0xed, 0x77, 0x49, - 0x55, 0xe1, 0xa8, 0xad, 0xd4, 0x03, 0xb7, 0x46, 0x6a, 0x01, 0x09, 0xa1, 0x6a, 0xd5, 0x5e, 0x7a, - 0xb1, 0x36, 0x9b, 0xc5, 0xb1, 0x6a, 0x7b, 0x2d, 0xef, 0x3a, 0x32, 0xff, 0xa2, 0x3f, 0xab, 0x47, - 0x8e, 0x3d, 0x59, 0x15, 0xfc, 0x03, 0xdf, 0x2b, 0x55, 0x5e, 0xdb, 0x01, 0x21, 0x7a, 0xf2, 0xcc, - 0x7b, 0x6f, 0x76, 0xe6, 0x8d, 0x35, 0x60, 0xc8, 0x57, 0xe1, 0x34, 0xe1, 0x8c, 0xfb, 0xb1, 0x72, - 0xe2, 0x44, 0x28, 0x01, 0x91, 0xe4, 0xbe, 0x8e, 0x98, 0x08, 0x1c, 0xc9, 0x7d, 0xb6, 0xa4, 0x7e, - 0xe4, 0xf0, 0x55, 0x78, 0xb4, 0xef, 0x09, 0x4f, 0x68, 0x6a, 0x5a, 0x46, 0x95, 0x1e, 0x53, 0xd0, - 0xbe, 0x12, 0x1e, 0x44, 0xa0, 0x47, 0x17, 0x8b, 0x84, 0x4b, 0x89, 0x8c, 0xb1, 0x31, 0x31, 0x49, - 0x93, 0xc2, 0x03, 0xd0, 0x55, 0x22, 0xf6, 0x99, 0x44, 0xad, 0x71, 0x7b, 0x62, 0x92, 0x3a, 0x83, - 0x10, 0x74, 0x16, 0x54, 0x51, 0xd4, 0x1e, 0x1b, 0x93, 0x6d, 0xa2, 0x63, 0xb8, 0x0f, 0x36, 0xfd, - 0x68, 0xc1, 0x33, 0xd4, 0x19, 0x1b, 0x93, 0x01, 0xa9, 0x12, 0xfc, 0x67, 0x13, 0xf4, 0x48, 0x35, - 0x24, 0x7c, 0x0d, 0x7a, 0x2a, 0x73, 0xd5, 0x6d, 0xcc, 0x75, 0x9f, 0xc1, 0x0c, 0x16, 0xb9, 0xbd, - 0x73, 0x4b, 0xc3, 0xe0, 0x0c, 0xd7, 0x04, 0x26, 0x5d, 0x95, 0x7d, 0xb9, 0x8d, 0x39, 0xbc, 0x06, - 0x23, 0x96, 0x86, 0x69, 0x40, 0x95, 0xbf, 0xe2, 0xae, 0x47, 0xa5, 0x9b, 0x4a, 0xbe, 0x40, 0xad, - 0xb1, 0x31, 0xe9, 0xcc, 0xac, 0x22, 0xb7, 0x8f, 0xaa, 0xc2, 0x17, 0x44, 0x98, 0x0c, 0x1f, 0xd1, - 0x73, 0x2a, 0xbf, 0x4a, 0xbe, 0x80, 0x9f, 0xc0, 0x1e, 0x13, 0x91, 0x4a, 0x28, 0x53, 0x6e, 0xe3, - 0xb6, 0x1c, 0xdf, 0x9c, 0xfd, 0x57, 0xe4, 0xf6, 0x61, 0xfd, 0xd8, 0x33, 0x05, 0x26, 0xbb, 0x0d, - 0xf4, 0xa1, 0x5e, 0xc9, 0x7b, 0xd0, 0x57, 0x99, 0xbb, 0xa4, 0x72, 0xe9, 0x2e, 0x6b, 0xb3, 0xe6, - 0xec, 0xa0, 0xc8, 0x6d, 0xb8, 0x36, 0xd2, 0x90, 0x98, 0x98, 0x2a, 0xbb, 0xa0, 0x72, 0x79, 0xc1, - 0x33, 0xe8, 0x80, 0xad, 0xb5, 0x89, 0x4d, 0x6d, 0x62, 0x54, 0xe4, 0xf6, 0x6e, 0x55, 0xf4, 0x38, - 0x79, 0xcf, 0xab, 0xe7, 0xbd, 0x06, 0x23, 0x7e, 0x73, 0xc3, 0xd9, 0xda, 0x59, 0x9c, 0xf8, 0x8c, - 0xa3, 0xee, 0x73, 0xff, 0x2f, 0x88, 0x30, 0x19, 0xae, 0xd1, 0x73, 0x2a, 0x3f, 0x97, 0x18, 0x3c, - 0x03, 0xdb, 0xf3, 0x40, 0xb0, 0xef, 0x6e, 0x94, 0x86, 0x73, 0x9e, 0xa0, 0x9e, 0x7e, 0xe8, 0xb0, - 0xc8, 0xed, 0x51, 0xf5, 0xd0, 0x53, 0x16, 0x93, 0xbe, 0x4e, 0xaf, 0x75, 0x06, 0x2f, 0xc1, 0x50, - 0x25, 0x34, 0x92, 0x94, 0x29, 0x5f, 0x44, 0x6e, 0xf5, 0x9b, 0xb7, 0xf4, 0x2f, 0x3c, 0x2e, 0x72, - 0x1b, 0xd5, 0xce, 0x9f, 0x4b, 0x30, 0xd9, 0x7b, 0x82, 0x5d, 0x96, 0x10, 0x7c, 0x05, 0xba, 0x52, - 0x51, 0x95, 0x4a, 0x64, 0xea, 0xfa, 0x61, 0x91, 0xdb, 0x83, 0xaa, 0xbe, 0xc2, 0x31, 0xa9, 0x05, - 0xf0, 0x7f, 0xd0, 0xb9, 0x49, 0x44, 0x88, 0x80, 0x5e, 0xf1, 0x6e, 0x91, 0xdb, 0xfd, 0x4a, 0x58, - 0xa2, 0x98, 0x68, 0x12, 0x9e, 0x80, 0x96, 0x12, 0xa8, 0xaf, 0x25, 0x83, 0x22, 0xb7, 0xcd, 0x7a, - 0x16, 0x81, 0x49, 0x4b, 0x89, 0x72, 0xeb, 0xab, 0xd0, 0xe5, 0x49, 0x22, 0x12, 0xb4, 0xad, 0x45, - 0x4f, 0xb6, 0xde, 0x30, 0x98, 0xf4, 0x56, 0xe1, 0xc7, 0x32, 0x82, 0x6f, 0x40, 0x27, 0x10, 0x9e, - 0x44, 0x83, 0x71, 0x7b, 0xd2, 0x7f, 0x7b, 0xe2, 0xfc, 0xeb, 0xa0, 0x9c, 0x2b, 0xe1, 0x11, 0x2d, - 0x85, 0xc7, 0xc0, 0x2c, 0xbf, 0xb3, 0x40, 0x88, 0x10, 0xed, 0xe8, 0x83, 0x78, 0x04, 0x66, 0xe7, - 0x3f, 0xef, 0x2d, 0xe3, 0xee, 0xde, 0x32, 0x7e, 0xdf, 0x5b, 0xc6, 0x8f, 0x07, 0x6b, 0xe3, 0xee, - 0xc1, 0xda, 0xf8, 0xf5, 0x60, 0x6d, 0x7c, 0x3b, 0xf5, 0x7c, 0xb5, 0x4c, 0xe7, 0x0e, 0x13, 0xe1, - 0x54, 0x72, 0xff, 0xb4, 0xe9, 0xa3, 0x13, 0xdd, 0x68, 0x9a, 0x4d, 0xcb, 0x1b, 0x2f, 0xef, 0x42, - 0xce, 0xbb, 0x9a, 0x7f, 0xf7, 0x37, 0x00, 0x00, 0xff, 0xff, 0x24, 0x16, 0xa8, 0xf6, 0xf7, 0x03, - 0x00, 0x00, + // 628 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0xcf, 0x6b, 0xdb, 0x30, + 0x14, 0xae, 0xf3, 0xb3, 0x56, 0x9a, 0xb6, 0x51, 0x4a, 0x2b, 0xba, 0x36, 0x36, 0xda, 0xc5, 0x63, + 0xd4, 0x61, 0x1b, 0xec, 0xd0, 0xdb, 0x02, 0x5b, 0x5b, 0x28, 0x65, 0x88, 0xed, 0xb2, 0x8b, 0x51, + 0x14, 0xd5, 0x36, 0x8b, 0xad, 0x60, 0x29, 0xc1, 0x39, 0xed, 0x5f, 0xd8, 0x9f, 0xb5, 0x63, 0x8f, + 0x3b, 0x99, 0xd1, 0xfe, 0x07, 0xbe, 0x0f, 0x86, 0x65, 0x27, 0x29, 0xa5, 0x3b, 0xe5, 0xbd, 0xef, + 0xfb, 0x9e, 0xf4, 0xbe, 0x17, 0x3d, 0x83, 0x1e, 0x5f, 0x44, 0xc3, 0x84, 0x33, 0x1e, 0xce, 0x94, + 0x3b, 0x4b, 0x84, 0x12, 0x10, 0x49, 0x1e, 0xea, 0x88, 0x89, 0xa9, 0x2b, 0x79, 0xc8, 0x02, 0x1a, + 0xc6, 0x2e, 0x5f, 0x44, 0xc7, 0x07, 0xbe, 0xf0, 0x85, 0xa6, 0x86, 0x45, 0x54, 0xea, 0xf1, 0x0f, + 0x50, 0xbf, 0x16, 0x3e, 0x44, 0xa0, 0x4d, 0x27, 0x93, 0x84, 0x4b, 0x89, 0x0c, 0xdb, 0x70, 0x4c, + 0xb2, 0x4a, 0xe1, 0x21, 0x68, 0x29, 0x31, 0x0b, 0x99, 0x44, 0x35, 0xbb, 0xee, 0x98, 0xa4, 0xca, + 0x20, 0x04, 0x8d, 0x09, 0x55, 0x14, 0xd5, 0x6d, 0xc3, 0xd9, 0x21, 0x3a, 0x86, 0x07, 0xa0, 0x19, + 0xc6, 0x13, 0x9e, 0xa2, 0x86, 0x6d, 0x38, 0x5d, 0x52, 0x26, 0xf0, 0x04, 0x98, 0x72, 0x19, 0xab, + 0x80, 0xab, 0x90, 0xa1, 0xa6, 0x6d, 0x38, 0xdb, 0x64, 0x03, 0xe0, 0xbf, 0x4d, 0xd0, 0x26, 0xa5, + 0x05, 0xf8, 0x1a, 0xb4, 0x55, 0xea, 0xa9, 0xe5, 0x8c, 0xeb, 0x2e, 0xba, 0x23, 0x98, 0x67, 0xd6, + 0xee, 0x92, 0x46, 0xd3, 0x73, 0x5c, 0x11, 0x98, 0xb4, 0x54, 0xfa, 0x65, 0x39, 0xe3, 0xf0, 0x06, + 0xf4, 0xd9, 0x3c, 0x9a, 0x4f, 0xa9, 0x0a, 0x17, 0xdc, 0xf3, 0xa9, 0xf4, 0xe6, 0x92, 0x4f, 0x50, + 0xcd, 0x36, 0x9c, 0xc6, 0x68, 0x90, 0x67, 0xd6, 0x71, 0x59, 0xf8, 0x8c, 0x08, 0x93, 0xde, 0x06, + 0xbd, 0xa0, 0xf2, 0xab, 0xe4, 0x13, 0xf8, 0x09, 0xec, 0x33, 0x11, 0xab, 0x84, 0x32, 0xe5, 0xad, + 0x66, 0x51, 0x98, 0x33, 0x47, 0x2f, 0xf2, 0xcc, 0x3a, 0xaa, 0x0e, 0x7b, 0xa2, 0xc0, 0x64, 0x6f, + 0x05, 0x7d, 0xa8, 0x06, 0xf6, 0x1e, 0x74, 0x54, 0xea, 0x05, 0x54, 0x06, 0x5e, 0x50, 0x8d, 0xc2, + 0x1c, 0x1d, 0xe6, 0x99, 0x05, 0xd7, 0x46, 0x56, 0x24, 0x26, 0xa6, 0x4a, 0x2f, 0xa9, 0x0c, 0x2e, + 0x79, 0x0a, 0x5d, 0xb0, 0xbd, 0x36, 0xd1, 0xd4, 0x26, 0xfa, 0x79, 0x66, 0xed, 0x95, 0x45, 0x9b, + 0xce, 0xdb, 0x7e, 0xd5, 0xef, 0x0d, 0xe8, 0xf3, 0xdb, 0x5b, 0xce, 0xd6, 0xce, 0x66, 0x49, 0xc8, + 0x38, 0x6a, 0x3d, 0xf5, 0xff, 0x8c, 0x08, 0x93, 0xde, 0x1a, 0xbd, 0xa0, 0xf2, 0x73, 0x81, 0xc1, + 0x73, 0xb0, 0x33, 0x9e, 0x0a, 0xf6, 0xdd, 0x8b, 0xe7, 0xd1, 0x98, 0x27, 0xa8, 0xad, 0x0f, 0x3a, + 0xca, 0x33, 0xab, 0x5f, 0x1e, 0xf4, 0x98, 0xc5, 0xa4, 0xa3, 0xd3, 0x1b, 0x9d, 0xc1, 0x2b, 0xd0, + 0x53, 0x09, 0x8d, 0x25, 0x65, 0x2a, 0x14, 0xb1, 0x57, 0x3e, 0x82, 0x6d, 0xfd, 0x17, 0x9e, 0xe4, + 0x99, 0x85, 0x2a, 0xe7, 0x4f, 0x25, 0x98, 0xec, 0x3f, 0xc2, 0xae, 0xf4, 0x6b, 0x79, 0x05, 0x5a, + 0x52, 0x51, 0x35, 0x97, 0xc8, 0xd4, 0xf5, 0xbd, 0x3c, 0xb3, 0xba, 0x65, 0x7d, 0x89, 0x63, 0x52, + 0x09, 0xe0, 0x4b, 0xd0, 0xb8, 0x4d, 0x44, 0x84, 0x80, 0x1e, 0xf1, 0x5e, 0x9e, 0x59, 0x9d, 0x52, + 0x58, 0xa0, 0x98, 0x68, 0x12, 0x9e, 0x82, 0x9a, 0x12, 0xa8, 0xa3, 0x25, 0xdd, 0x3c, 0xb3, 0xcc, + 0xaa, 0x17, 0x81, 0x49, 0x4d, 0x89, 0x62, 0xea, 0x8b, 0xc8, 0xe3, 0x49, 0x22, 0x12, 0xb4, 0xa3, + 0x45, 0x8f, 0xa6, 0xbe, 0x62, 0x30, 0x69, 0x2f, 0xa2, 0x8f, 0x45, 0x04, 0xdf, 0x80, 0xc6, 0x54, + 0xf8, 0x12, 0x75, 0xed, 0xba, 0xd3, 0x79, 0x7b, 0xea, 0xfe, 0x6f, 0xdd, 0xdc, 0x6b, 0xe1, 0x13, + 0x2d, 0x2d, 0xde, 0x7f, 0xf1, 0x3b, 0x9a, 0x0a, 0x11, 0xa1, 0x5d, 0xbd, 0x2e, 0x1b, 0x60, 0x74, + 0xf1, 0xeb, 0x7e, 0x60, 0xdc, 0xdd, 0x0f, 0x8c, 0x3f, 0xf7, 0x03, 0xe3, 0xe7, 0xc3, 0x60, 0xeb, + 0xee, 0x61, 0xb0, 0xf5, 0xfb, 0x61, 0xb0, 0xf5, 0xed, 0xcc, 0x0f, 0x55, 0x30, 0x1f, 0xbb, 0x4c, + 0x44, 0x43, 0xc9, 0xc3, 0xb3, 0xd5, 0x3d, 0x3a, 0xd1, 0x17, 0x0d, 0xd3, 0x61, 0xf1, 0x05, 0x28, + 0xf6, 0x42, 0x8e, 0x5b, 0x9a, 0x7f, 0xf7, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x40, 0xba, 0xc2, + 0x15, 0x04, 0x00, 0x00, } func (m *Log) Marshal() (dAtA []byte, err error) { @@ -309,6 +318,16 @@ func (m *Log) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Synthetic { + i-- + if m.Synthetic { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } if m.Index != 0 { i = encodeVarintReceipt(dAtA, i, uint64(m.Index)) i-- @@ -488,6 +507,9 @@ func (m *Log) Size() (n int) { if m.Index != 0 { n += 1 + sovReceipt(uint64(m.Index)) } + if m.Synthetic { + n += 2 + } return n } @@ -703,6 +725,26 @@ func (m *Log) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Synthetic", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowReceipt + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Synthetic = bool(v != 0) default: iNdEx = preIndex skippy, err := skipReceipt(dAtA[iNdEx:])