diff --git a/e2e/contracts/withdrawer/Withdrawer.abi b/e2e/contracts/withdrawer/Withdrawer.abi index ed64c3e7f2..9d462137f0 100644 --- a/e2e/contracts/withdrawer/Withdrawer.abi +++ b/e2e/contracts/withdrawer/Withdrawer.abi @@ -10,6 +10,51 @@ "stateMutability": "nonpayable", "type": "constructor" }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes", + "name": "origin", + "type": "bytes" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "chainID", + "type": "uint256" + } + ], + "internalType": "struct Context", + "name": "context", + "type": "tuple" + }, + { + "internalType": "address", + "name": "zrc20", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { diff --git a/e2e/contracts/withdrawer/Withdrawer.bin b/e2e/contracts/withdrawer/Withdrawer.bin index 50892795d2..7f0200971d 100644 --- a/e2e/contracts/withdrawer/Withdrawer.bin +++ b/e2e/contracts/withdrawer/Withdrawer.bin @@ -1 +1 @@ -60a0604052348015600f57600080fd5b506040516106733803806106738339818101604052810190602f91906072565b806080818152505050609a565b600080fd5b6000819050919050565b6052816041565b8114605c57600080fd5b50565b600081519050606c81604b565b92915050565b6000602082840312156085576084603c565b5b6000609184828501605f565b91505092915050565b6080516105b86100bb600039600081816077015261016601526105b86000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063534844a21461003b578063de43156e14610059575b600080fd5b610043610075565b6040516100509190610207565b60405180910390f35b610073600480360381019061006e919061033f565b610099565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b8373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016100f49291906103f2565b6020604051808303816000875af1158015610113573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101379190610453565b508373ffffffffffffffffffffffffffffffffffffffff1663c7012626868060000190610164919061048f565b7f00000000000000000000000000000000000000000000000000000000000000006040518463ffffffff1660e01b81526004016101a393929190610550565b6020604051808303816000875af11580156101c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e69190610453565b505050505050565b6000819050919050565b610201816101ee565b82525050565b600060208201905061021c60008301846101f8565b92915050565b600080fd5b600080fd5b600080fd5b6000606082840312156102475761024661022c565b5b81905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061027b82610250565b9050919050565b61028b81610270565b811461029657600080fd5b50565b6000813590506102a881610282565b92915050565b6102b7816101ee565b81146102c257600080fd5b50565b6000813590506102d4816102ae565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126102ff576102fe6102da565b5b8235905067ffffffffffffffff81111561031c5761031b6102df565b5b602083019150836001820283011115610338576103376102e4565b5b9250929050565b60008060008060006080868803121561035b5761035a610222565b5b600086013567ffffffffffffffff81111561037957610378610227565b5b61038588828901610231565b955050602061039688828901610299565b94505060406103a7888289016102c5565b935050606086013567ffffffffffffffff8111156103c8576103c7610227565b5b6103d4888289016102e9565b92509250509295509295909350565b6103ec81610270565b82525050565b600060408201905061040760008301856103e3565b61041460208301846101f8565b9392505050565b60008115159050919050565b6104308161041b565b811461043b57600080fd5b50565b60008151905061044d81610427565b92915050565b60006020828403121561046957610468610222565b5b60006104778482850161043e565b91505092915050565b600080fd5b600080fd5b600080fd5b600080833560016020038436030381126104ac576104ab610480565b5b80840192508235915067ffffffffffffffff8211156104ce576104cd610485565b5b6020830192506001820236038313156104ea576104e961048a565b5b509250929050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b600061052f83856104f2565b935061053c838584610503565b61054583610512565b840190509392505050565b6000604082019050818103600083015261056b818587610523565b905061057a60208301846101f8565b94935050505056fea26469706673582212208d3db17c081600e0a0203ac712a53a290f24ef219417697847e27c563ac3d09a64736f6c634300081a0033 +60a0604052348015600f57600080fd5b506040516107f63803806107f68339818101604052810190602f91906072565b806080818152505050609a565b600080fd5b6000819050919050565b6052816041565b8114605c57600080fd5b50565b600081519050606c81604b565b92915050565b6000602082840312156085576084603c565b5b6000609184828501605f565b91505092915050565b6080516107346100c260003960008181609e0152818161018d01526102e201526107346000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063534844a2146100465780635bcfd61614610064578063de43156e14610080575b600080fd5b61004e61009c565b60405161005b9190610383565b60405180910390f35b61007e600480360381019061007991906104bb565b6100c0565b005b61009a600480360381019061009591906104bb565b610215565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b8373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161011b92919061056e565b6020604051808303816000875af115801561013a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061015e91906105cf565b508373ffffffffffffffffffffffffffffffffffffffff1663c701262686806000019061018b919061060b565b7f00000000000000000000000000000000000000000000000000000000000000006040518463ffffffff1660e01b81526004016101ca939291906106cc565b6020604051808303816000875af11580156101e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020d91906105cf565b505050505050565b8373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161027092919061056e565b6020604051808303816000875af115801561028f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b391906105cf565b508373ffffffffffffffffffffffffffffffffffffffff1663c70126268680600001906102e0919061060b565b7f00000000000000000000000000000000000000000000000000000000000000006040518463ffffffff1660e01b815260040161031f939291906106cc565b6020604051808303816000875af115801561033e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036291906105cf565b505050505050565b6000819050919050565b61037d8161036a565b82525050565b60006020820190506103986000830184610374565b92915050565b600080fd5b600080fd5b600080fd5b6000606082840312156103c3576103c26103a8565b5b81905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006103f7826103cc565b9050919050565b610407816103ec565b811461041257600080fd5b50565b600081359050610424816103fe565b92915050565b6104338161036a565b811461043e57600080fd5b50565b6000813590506104508161042a565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261047b5761047a610456565b5b8235905067ffffffffffffffff8111156104985761049761045b565b5b6020830191508360018202830111156104b4576104b3610460565b5b9250929050565b6000806000806000608086880312156104d7576104d661039e565b5b600086013567ffffffffffffffff8111156104f5576104f46103a3565b5b610501888289016103ad565b955050602061051288828901610415565b945050604061052388828901610441565b935050606086013567ffffffffffffffff811115610544576105436103a3565b5b61055088828901610465565b92509250509295509295909350565b610568816103ec565b82525050565b6000604082019050610583600083018561055f565b6105906020830184610374565b9392505050565b60008115159050919050565b6105ac81610597565b81146105b757600080fd5b50565b6000815190506105c9816105a3565b92915050565b6000602082840312156105e5576105e461039e565b5b60006105f3848285016105ba565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610628576106276105fc565b5b80840192508235915067ffffffffffffffff82111561064a57610649610601565b5b60208301925060018202360383131561066657610665610606565b5b509250929050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b60006106ab838561066e565b93506106b883858461067f565b6106c18361068e565b840190509392505050565b600060408201905081810360008301526106e781858761069f565b90506106f66020830184610374565b94935050505056fea2646970667358221220eb0d0178243bc765ecffd41945dfc69d032eaf9e1347d0b6ee2ec8408676acd564736f6c634300081a0033 diff --git a/e2e/contracts/withdrawer/Withdrawer.go b/e2e/contracts/withdrawer/Withdrawer.go index 0d3ae0a3d5..99bd5fdfe3 100644 --- a/e2e/contracts/withdrawer/Withdrawer.go +++ b/e2e/contracts/withdrawer/Withdrawer.go @@ -38,8 +38,8 @@ type Context struct { // WithdrawerMetaData contains all meta data concerning the Withdrawer contract. var WithdrawerMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_withdrawAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"origin\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"}],\"internalType\":\"structContext\",\"name\":\"context\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCrossChainCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60a0604052348015600f57600080fd5b506040516106733803806106738339818101604052810190602f91906072565b806080818152505050609a565b600080fd5b6000819050919050565b6052816041565b8114605c57600080fd5b50565b600081519050606c81604b565b92915050565b6000602082840312156085576084603c565b5b6000609184828501605f565b91505092915050565b6080516105b86100bb600039600081816077015261016601526105b86000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063534844a21461003b578063de43156e14610059575b600080fd5b610043610075565b6040516100509190610207565b60405180910390f35b610073600480360381019061006e919061033f565b610099565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b8373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016100f49291906103f2565b6020604051808303816000875af1158015610113573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101379190610453565b508373ffffffffffffffffffffffffffffffffffffffff1663c7012626868060000190610164919061048f565b7f00000000000000000000000000000000000000000000000000000000000000006040518463ffffffff1660e01b81526004016101a393929190610550565b6020604051808303816000875af11580156101c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e69190610453565b505050505050565b6000819050919050565b610201816101ee565b82525050565b600060208201905061021c60008301846101f8565b92915050565b600080fd5b600080fd5b600080fd5b6000606082840312156102475761024661022c565b5b81905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061027b82610250565b9050919050565b61028b81610270565b811461029657600080fd5b50565b6000813590506102a881610282565b92915050565b6102b7816101ee565b81146102c257600080fd5b50565b6000813590506102d4816102ae565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126102ff576102fe6102da565b5b8235905067ffffffffffffffff81111561031c5761031b6102df565b5b602083019150836001820283011115610338576103376102e4565b5b9250929050565b60008060008060006080868803121561035b5761035a610222565b5b600086013567ffffffffffffffff81111561037957610378610227565b5b61038588828901610231565b955050602061039688828901610299565b94505060406103a7888289016102c5565b935050606086013567ffffffffffffffff8111156103c8576103c7610227565b5b6103d4888289016102e9565b92509250509295509295909350565b6103ec81610270565b82525050565b600060408201905061040760008301856103e3565b61041460208301846101f8565b9392505050565b60008115159050919050565b6104308161041b565b811461043b57600080fd5b50565b60008151905061044d81610427565b92915050565b60006020828403121561046957610468610222565b5b60006104778482850161043e565b91505092915050565b600080fd5b600080fd5b600080fd5b600080833560016020038436030381126104ac576104ab610480565b5b80840192508235915067ffffffffffffffff8211156104ce576104cd610485565b5b6020830192506001820236038313156104ea576104e961048a565b5b509250929050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b600061052f83856104f2565b935061053c838584610503565b61054583610512565b840190509392505050565b6000604082019050818103600083015261056b818587610523565b905061057a60208301846101f8565b94935050505056fea26469706673582212208d3db17c081600e0a0203ac712a53a290f24ef219417697847e27c563ac3d09a64736f6c634300081a0033", + ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_withdrawAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"origin\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"}],\"internalType\":\"structContext\",\"name\":\"context\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"origin\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"}],\"internalType\":\"structContext\",\"name\":\"context\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCrossChainCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x60a0604052348015600f57600080fd5b506040516107f63803806107f68339818101604052810190602f91906072565b806080818152505050609a565b600080fd5b6000819050919050565b6052816041565b8114605c57600080fd5b50565b600081519050606c81604b565b92915050565b6000602082840312156085576084603c565b5b6000609184828501605f565b91505092915050565b6080516107346100c260003960008181609e0152818161018d01526102e201526107346000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063534844a2146100465780635bcfd61614610064578063de43156e14610080575b600080fd5b61004e61009c565b60405161005b9190610383565b60405180910390f35b61007e600480360381019061007991906104bb565b6100c0565b005b61009a600480360381019061009591906104bb565b610215565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b8373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161011b92919061056e565b6020604051808303816000875af115801561013a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061015e91906105cf565b508373ffffffffffffffffffffffffffffffffffffffff1663c701262686806000019061018b919061060b565b7f00000000000000000000000000000000000000000000000000000000000000006040518463ffffffff1660e01b81526004016101ca939291906106cc565b6020604051808303816000875af11580156101e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020d91906105cf565b505050505050565b8373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161027092919061056e565b6020604051808303816000875af115801561028f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b391906105cf565b508373ffffffffffffffffffffffffffffffffffffffff1663c70126268680600001906102e0919061060b565b7f00000000000000000000000000000000000000000000000000000000000000006040518463ffffffff1660e01b815260040161031f939291906106cc565b6020604051808303816000875af115801561033e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036291906105cf565b505050505050565b6000819050919050565b61037d8161036a565b82525050565b60006020820190506103986000830184610374565b92915050565b600080fd5b600080fd5b600080fd5b6000606082840312156103c3576103c26103a8565b5b81905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006103f7826103cc565b9050919050565b610407816103ec565b811461041257600080fd5b50565b600081359050610424816103fe565b92915050565b6104338161036a565b811461043e57600080fd5b50565b6000813590506104508161042a565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261047b5761047a610456565b5b8235905067ffffffffffffffff8111156104985761049761045b565b5b6020830191508360018202830111156104b4576104b3610460565b5b9250929050565b6000806000806000608086880312156104d7576104d661039e565b5b600086013567ffffffffffffffff8111156104f5576104f46103a3565b5b610501888289016103ad565b955050602061051288828901610415565b945050604061052388828901610441565b935050606086013567ffffffffffffffff811115610544576105436103a3565b5b61055088828901610465565b92509250509295509295909350565b610568816103ec565b82525050565b6000604082019050610583600083018561055f565b6105906020830184610374565b9392505050565b60008115159050919050565b6105ac81610597565b81146105b757600080fd5b50565b6000815190506105c9816105a3565b92915050565b6000602082840312156105e5576105e461039e565b5b60006105f3848285016105ba565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610628576106276105fc565b5b80840192508235915067ffffffffffffffff82111561064a57610649610601565b5b60208301925060018202360383131561066657610665610606565b5b509250929050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b60006106ab838561066e565b93506106b883858461067f565b6106c18361068e565b840190509392505050565b600060408201905081810360008301526106e781858761069f565b90506106f66020830184610374565b94935050505056fea2646970667358221220eb0d0178243bc765ecffd41945dfc69d032eaf9e1347d0b6ee2ec8408676acd564736f6c634300081a0033", } // WithdrawerABI is the input ABI used to generate the binding from. @@ -240,6 +240,27 @@ func (_Withdrawer *WithdrawerCallerSession) WithdrawAmount() (*big.Int, error) { return _Withdrawer.Contract.WithdrawAmount(&_Withdrawer.CallOpts) } +// OnCall is a paid mutator transaction binding the contract method 0x5bcfd616. +// +// Solidity: function onCall((bytes,address,uint256) context, address zrc20, uint256 , bytes ) returns() +func (_Withdrawer *WithdrawerTransactor) OnCall(opts *bind.TransactOpts, context Context, zrc20 common.Address, arg2 *big.Int, arg3 []byte) (*types.Transaction, error) { + return _Withdrawer.contract.Transact(opts, "onCall", context, zrc20, arg2, arg3) +} + +// OnCall is a paid mutator transaction binding the contract method 0x5bcfd616. +// +// Solidity: function onCall((bytes,address,uint256) context, address zrc20, uint256 , bytes ) returns() +func (_Withdrawer *WithdrawerSession) OnCall(context Context, zrc20 common.Address, arg2 *big.Int, arg3 []byte) (*types.Transaction, error) { + return _Withdrawer.Contract.OnCall(&_Withdrawer.TransactOpts, context, zrc20, arg2, arg3) +} + +// OnCall is a paid mutator transaction binding the contract method 0x5bcfd616. +// +// Solidity: function onCall((bytes,address,uint256) context, address zrc20, uint256 , bytes ) returns() +func (_Withdrawer *WithdrawerTransactorSession) OnCall(context Context, zrc20 common.Address, arg2 *big.Int, arg3 []byte) (*types.Transaction, error) { + return _Withdrawer.Contract.OnCall(&_Withdrawer.TransactOpts, context, zrc20, arg2, arg3) +} + // OnCrossChainCall is a paid mutator transaction binding the contract method 0xde43156e. // // Solidity: function onCrossChainCall((bytes,address,uint256) context, address zrc20, uint256 , bytes ) returns() diff --git a/e2e/contracts/withdrawer/Withdrawer.json b/e2e/contracts/withdrawer/Withdrawer.json index 1cdbd6b916..26bfe6df7b 100644 --- a/e2e/contracts/withdrawer/Withdrawer.json +++ b/e2e/contracts/withdrawer/Withdrawer.json @@ -11,6 +11,51 @@ "stateMutability": "nonpayable", "type": "constructor" }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes", + "name": "origin", + "type": "bytes" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "chainID", + "type": "uint256" + } + ], + "internalType": "struct Context", + "name": "context", + "type": "tuple" + }, + { + "internalType": "address", + "name": "zrc20", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -70,5 +115,5 @@ "type": "function" } ], - "bin": "60a0604052348015600f57600080fd5b506040516106733803806106738339818101604052810190602f91906072565b806080818152505050609a565b600080fd5b6000819050919050565b6052816041565b8114605c57600080fd5b50565b600081519050606c81604b565b92915050565b6000602082840312156085576084603c565b5b6000609184828501605f565b91505092915050565b6080516105b86100bb600039600081816077015261016601526105b86000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063534844a21461003b578063de43156e14610059575b600080fd5b610043610075565b6040516100509190610207565b60405180910390f35b610073600480360381019061006e919061033f565b610099565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b8373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016100f49291906103f2565b6020604051808303816000875af1158015610113573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101379190610453565b508373ffffffffffffffffffffffffffffffffffffffff1663c7012626868060000190610164919061048f565b7f00000000000000000000000000000000000000000000000000000000000000006040518463ffffffff1660e01b81526004016101a393929190610550565b6020604051808303816000875af11580156101c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e69190610453565b505050505050565b6000819050919050565b610201816101ee565b82525050565b600060208201905061021c60008301846101f8565b92915050565b600080fd5b600080fd5b600080fd5b6000606082840312156102475761024661022c565b5b81905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061027b82610250565b9050919050565b61028b81610270565b811461029657600080fd5b50565b6000813590506102a881610282565b92915050565b6102b7816101ee565b81146102c257600080fd5b50565b6000813590506102d4816102ae565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126102ff576102fe6102da565b5b8235905067ffffffffffffffff81111561031c5761031b6102df565b5b602083019150836001820283011115610338576103376102e4565b5b9250929050565b60008060008060006080868803121561035b5761035a610222565b5b600086013567ffffffffffffffff81111561037957610378610227565b5b61038588828901610231565b955050602061039688828901610299565b94505060406103a7888289016102c5565b935050606086013567ffffffffffffffff8111156103c8576103c7610227565b5b6103d4888289016102e9565b92509250509295509295909350565b6103ec81610270565b82525050565b600060408201905061040760008301856103e3565b61041460208301846101f8565b9392505050565b60008115159050919050565b6104308161041b565b811461043b57600080fd5b50565b60008151905061044d81610427565b92915050565b60006020828403121561046957610468610222565b5b60006104778482850161043e565b91505092915050565b600080fd5b600080fd5b600080fd5b600080833560016020038436030381126104ac576104ab610480565b5b80840192508235915067ffffffffffffffff8211156104ce576104cd610485565b5b6020830192506001820236038313156104ea576104e961048a565b5b509250929050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b600061052f83856104f2565b935061053c838584610503565b61054583610512565b840190509392505050565b6000604082019050818103600083015261056b818587610523565b905061057a60208301846101f8565b94935050505056fea26469706673582212208d3db17c081600e0a0203ac712a53a290f24ef219417697847e27c563ac3d09a64736f6c634300081a0033" + "bin": "60a0604052348015600f57600080fd5b506040516107f63803806107f68339818101604052810190602f91906072565b806080818152505050609a565b600080fd5b6000819050919050565b6052816041565b8114605c57600080fd5b50565b600081519050606c81604b565b92915050565b6000602082840312156085576084603c565b5b6000609184828501605f565b91505092915050565b6080516107346100c260003960008181609e0152818161018d01526102e201526107346000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063534844a2146100465780635bcfd61614610064578063de43156e14610080575b600080fd5b61004e61009c565b60405161005b9190610383565b60405180910390f35b61007e600480360381019061007991906104bb565b6100c0565b005b61009a600480360381019061009591906104bb565b610215565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b8373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161011b92919061056e565b6020604051808303816000875af115801561013a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061015e91906105cf565b508373ffffffffffffffffffffffffffffffffffffffff1663c701262686806000019061018b919061060b565b7f00000000000000000000000000000000000000000000000000000000000000006040518463ffffffff1660e01b81526004016101ca939291906106cc565b6020604051808303816000875af11580156101e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020d91906105cf565b505050505050565b8373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161027092919061056e565b6020604051808303816000875af115801561028f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b391906105cf565b508373ffffffffffffffffffffffffffffffffffffffff1663c70126268680600001906102e0919061060b565b7f00000000000000000000000000000000000000000000000000000000000000006040518463ffffffff1660e01b815260040161031f939291906106cc565b6020604051808303816000875af115801561033e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036291906105cf565b505050505050565b6000819050919050565b61037d8161036a565b82525050565b60006020820190506103986000830184610374565b92915050565b600080fd5b600080fd5b600080fd5b6000606082840312156103c3576103c26103a8565b5b81905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006103f7826103cc565b9050919050565b610407816103ec565b811461041257600080fd5b50565b600081359050610424816103fe565b92915050565b6104338161036a565b811461043e57600080fd5b50565b6000813590506104508161042a565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261047b5761047a610456565b5b8235905067ffffffffffffffff8111156104985761049761045b565b5b6020830191508360018202830111156104b4576104b3610460565b5b9250929050565b6000806000806000608086880312156104d7576104d661039e565b5b600086013567ffffffffffffffff8111156104f5576104f46103a3565b5b610501888289016103ad565b955050602061051288828901610415565b945050604061052388828901610441565b935050606086013567ffffffffffffffff811115610544576105436103a3565b5b61055088828901610465565b92509250509295509295909350565b610568816103ec565b82525050565b6000604082019050610583600083018561055f565b6105906020830184610374565b9392505050565b60008115159050919050565b6105ac81610597565b81146105b757600080fd5b50565b6000815190506105c9816105a3565b92915050565b6000602082840312156105e5576105e461039e565b5b60006105f3848285016105ba565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610628576106276105fc565b5b80840192508235915067ffffffffffffffff82111561064a57610649610601565b5b60208301925060018202360383131561066657610665610606565b5b509250929050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b60006106ab838561066e565b93506106b883858461067f565b6106c18361068e565b840190509392505050565b600060408201905081810360008301526106e781858761069f565b90506106f66020830184610374565b94935050505056fea2646970667358221220eb0d0178243bc765ecffd41945dfc69d032eaf9e1347d0b6ee2ec8408676acd564736f6c634300081a0033" } diff --git a/e2e/contracts/withdrawer/Withdrawer.sol b/e2e/contracts/withdrawer/Withdrawer.sol index b58aa93aa6..13ac900ace 100644 --- a/e2e/contracts/withdrawer/Withdrawer.sol +++ b/e2e/contracts/withdrawer/Withdrawer.sol @@ -27,4 +27,11 @@ contract Withdrawer { IZRC20(zrc20).approve(address(zrc20), type(uint256).max); IZRC20(zrc20).withdraw(context.origin, withdrawAmount); } + + // perform a withdraw on cross chain call, v2 + function onCall(Context calldata context, address zrc20, uint256, bytes calldata) external { + // perform withdrawal with the target token + IZRC20(zrc20).approve(address(zrc20), type(uint256).max); + IZRC20(zrc20).withdraw(context.origin, withdrawAmount); + } } \ No newline at end of file