0 txs
0 calls
constructor
No constructor.
functions
calculateL2TokenAddress
viewfunction calculateL2TokenAddress(address l1ERC20) view returns (address)
counterpartGateway
viewfunction counterpartGateway() view returns (address)
defaultGateway
viewfunction defaultGateway() view returns (address)
getGateway
viewfunction getGateway(address _token) view returns (address gateway)
getOutboundCalldata
viewfunction getOutboundCalldata(address _token, address _from, address _to, uint256 _amount, bytes _data) view returns (bytes)
inbox
viewfunction inbox() view returns (address)
l1TokenToGateway
viewfunction l1TokenToGateway(address) view returns (address)
owner
viewfunction owner() view returns (address)
router
viewfunction router() view returns (address)
whitelist
viewfunction whitelist() view returns (address)
finalizeInboundTransfer
payablefunction finalizeInboundTransfer(address _token, address _from, address _to, uint256 _amount, bytes _data) payable returns (bytes)
initialize
nonpayablefunction initialize(address _owner, address _defaultGateway, address _whitelist, address _counterpartGateway, address _inbox)
outboundTransfer
payablefunction outboundTransfer(address _token, address _to, uint256 _amount, uint256 _maxGas, uint256 _gasPriceBid, bytes _data) payable returns (bytes)
postUpgradeInit
nonpayablefunction postUpgradeInit()
setDefaultGateway
payablefunction setDefaultGateway(address newL1DefaultGateway, uint256 _maxGas, uint256 _gasPriceBid, uint256 _maxSubmissionCost) payable returns (uint256)
setGateway
payablefunction setGateway(address _gateway, uint256 _maxGas, uint256 _gasPriceBid, uint256 _maxSubmissionCost, address _creditBackAddress) payable returns (uint256)
setGateway
payablefunction setGateway(address _gateway, uint256 _maxGas, uint256 _gasPriceBid, uint256 _maxSubmissionCost) payable returns (uint256)
setGateways
payablefunction setGateways(address[] _token, address[] _gateway, uint256 _maxGas, uint256 _gasPriceBid, uint256 _maxSubmissionCost) payable returns (uint256)
setOwner
nonpayablefunction setOwner(address newOwner)
updateWhitelistSource
nonpayablefunction updateWhitelistSource(address newSource)
events
DefaultGatewayUpdated
event DefaultGatewayUpdated(address newDefaultGateway)
GatewaySet
event GatewaySet(address indexed l1Token, address indexed gateway)
TransferRouted
event TransferRouted(address indexed token, address indexed _userFrom, address indexed _userTo, address gateway)
TxToL2
event TxToL2(address indexed _from, address indexed _to, uint256 indexed _seqNum, bytes _data)
WhitelistSourceUpdated
event WhitelistSourceUpdated(address newSource)
errors
No errors.
creation bytecode
0x608060405234801561001057600080fd5b50611b8e806100206000396000f3fe60806040526004361061011f5760003560e01c806393e59dc1116100a0578063d2ce7d6511610064578063d2ce7d651461066a578063dd61456914610704578063ed08fdc61461073c578063f887ea401461076f578063fb0e722b146107845761011f565b806393e59dc11461050157806395fcea7814610516578063a0c76a961461052b578063a7e28d4814610604578063bda009fe146106375761011f565b80632e567b36116100e75780632e567b361461024857806347466f98146103535780635625a95214610386578063658b53f4146103be5780638da5cb5b146104ec5761011f565b8063032958021461012457806313af4035146101555780631459457a1461018a5780632d67b72d146101df5780632db09c1c14610233575b600080fd5b34801561013057600080fd5b50610139610799565b604080516001600160a01b039092168252519081900360200190f35b34801561016157600080fd5b506101886004803603602081101561017857600080fd5b50356001600160a01b03166107a8565b005b34801561019657600080fd5b50610188600480360360a08110156101ad57600080fd5b506001600160a01b03813581169160208101358216916040820135811691606081013582169160809091013516610861565b610221600480360360a08110156101f557600080fd5b506001600160a01b038135811691602081013591604082013591606081013591608090910135166108af565b60408051918252519081900360200190f35b34801561023f57600080fd5b50610139610a09565b6102de600480360360a081101561025e57600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b8111156102a057600080fd5b8201836020820111156102b257600080fd5b803590602001918460018302840111600160201b831117156102d357600080fd5b509092509050610a18565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610318578181015183820152602001610300565b50505050905090810190601f1680156103455780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561035f57600080fd5b506101886004803603602081101561037657600080fd5b50356001600160a01b0316610a5e565b6102216004803603608081101561039c57600080fd5b506001600160a01b038135169060208101359060408101359060600135610b01565b610221600480360360a08110156103d457600080fd5b810190602081018135600160201b8111156103ee57600080fd5b82018360208201111561040057600080fd5b803590602001918460208302840111600160201b8311171561042157600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561047057600080fd5b82018360208201111561048257600080fd5b803590602001918460208302840111600160201b831117156104a357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060208101359060400135610c9e565b3480156104f857600080fd5b50610139610d05565b34801561050d57600080fd5b50610139610d14565b34801561052257600080fd5b50610188610d23565b34801561053757600080fd5b506102de600480360360a081101561054e57600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b81111561059057600080fd5b8201836020820111156105a257600080fd5b803590602001918460018302840111600160201b831117156105c357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610d80945050505050565b34801561061057600080fd5b506101396004803603602081101561062757600080fd5b50356001600160a01b0316610f82565b34801561064357600080fd5b506101396004803603602081101561065a57600080fd5b50356001600160a01b0316611033565b6102de600480360360c081101561068057600080fd5b6001600160a01b0382358116926020810135909116916040820135916060810135916080820135919081019060c0810160a0820135600160201b8111156106c657600080fd5b8201836020820111156106d857600080fd5b803590602001918460018302840111600160201b831117156106f957600080fd5b509092509050611095565b6102216004803603608081101561071a57600080fd5b506001600160a01b03813516906020810135906040810135906060013561117e565b34801561074857600080fd5b506101396004803603602081101561075f57600080fd5b50356001600160a01b0316611196565b34801561077b57600080fd5b506101396111b1565b34801561079057600080fd5b506101396111c0565b6004546001600160a01b031681565b6005546001600160a01b031633146107f4576040805162461bcd60e51b815260206004820152600a60248201526927a7262cafa7aba722a960b11b604482015290519081900360640190fd5b6001600160a01b03811661083f576040805162461bcd60e51b815260206004820152600d60248201526c24a72b20a624a22fa7aba722a960991b604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b61086d826000866111cf565b600580546001600160a01b03199081166001600160a01b0397881617909155600080548216948716949094179093556006805490931694169390931790555050565b60006108ba33611246565b6108ff576040805162461bcd60e51b81526020600482015260116024820152701393d517d19493d357d0d3d395149050d5607a1b604482015290519081900360640190fd5b610911866001600160a01b0316611246565b610954576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d513d7d0d3d395149050d5608a1b604482015290519081900360640190fd5b60408051600180825281830190925260609160208083019080368337019050509050338160008151811061098457fe5b6001600160a01b03929092166020928302919091019091015260408051600180825281830190925260609181602001602082028036833701905050905087816000815181106109cf57fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506109fd82828989898961124c565b98975050505050505050565b6001546001600160a01b031681565b6040805162461bcd60e51b815260206004820152601460248201527327a7262cafa7aaaa2127aaa7222fa927aaaa22a960611b6044820152905160609181900360640190fd5b6000546001600160a01b03163314610aad576040805162461bcd60e51b815260206004820152600d60248201526c1393d517d19493d357d31254d5609a1b604482015290519081900360640190fd5b600080546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f37389c47920d5cc3229678a0205d0455002c07541a4139ebdce91ac2274657779181900360200190a150565b6005546000906001600160a01b03163314610b50576040805162461bcd60e51b815260206004820152600a60248201526927a7262cafa7aba722a960b11b604482015290519081900360640190fd5b600480546001600160a01b0387166001600160a01b0319909116811790915560408051918252517f3a8f8eb961383a94d41d193e16a3af73eaddfd5764a4c640257323a1603ac3319181900360200190a160006001600160a01b03861615610c1a57856001600160a01b0316632db09c1c6040518163ffffffff1660e01b815260040160206040518083038186803b158015610beb57600080fd5b505afa158015610bff573d6000803e3d6000fd5b505050506040513d6020811015610c1557600080fd5b505190505b604080516001600160a01b038084166024808401919091528351808403909101815260449092018352602082810180516001600160e01b031663f7c9362f60e01b17905260065460015485516060810187528981529283018b90529482018990529293610c939383169216903390349060009087611576565b979650505050505050565b6005546000906001600160a01b03163314610ced576040805162461bcd60e51b815260206004820152600a60248201526927a7262cafa7aba722a960b11b604482015290519081900360640190fd5b610cfb86868686863361124c565b9695505050505050565b6005546001600160a01b031681565b6000546001600160a01b031681565b6000610d2d611595565b9050336001600160a01b03821614610d7d576040805162461bcd60e51b815260206004820152600e60248201526d2727aa2fa32927a6afa0a226a4a760911b604482015290519081900360640190fd5b50565b60606000610d8d87611033565b9050806001600160a01b031663a0c76a9688888888886040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610e3d578181015183820152602001610e25565b50505050905090810190601f168015610e6a5780820380516001836020036101000a031916815260200191505b50965050505050505060006040518083038186803b158015610e8b57600080fd5b505afa158015610e9f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610ec857600080fd5b8101908080516040519392919084600160201b821115610ee757600080fd5b908301906020820185811115610efc57600080fd5b8251600160201b811182820188101715610f1557600080fd5b82525081516020918201929091019080838360005b83811015610f42578181015183820152602001610f2a565b50505050905090810190601f168015610f6f5780820380516001836020036101000a031916815260200191505b5060405250505091505095945050505050565b600080610f8e83611033565b90506001600160a01b038116610fa857600091505061102e565b806001600160a01b031663a7e28d48846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610ffe57600080fd5b505afa158015611012573d6000803e3d6000fd5b505050506040513d602081101561102857600080fd5b50519150505b919050565b6001600160a01b03808216600090815260036020526040902054168061106157506004546001600160a01b03165b6001600160a01b038116600114806110885750611086816001600160a01b0316611246565b155b1561102e5750600061102e565b6000546060906001600160a01b031615611163576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b1580156110f457600080fd5b505afa158015611108573d6000803e3d6000fd5b505050506040513d602081101561111e57600080fd5b5051611163576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b611172888888888888886115ba565b50979650505050505050565b600061118d85858585336108af565b95945050505050565b6003602052600090815260409020546001600160a01b031681565b6002546001600160a01b031681565b6006546001600160a01b031681565b6001600160a01b03821615611218576040805162461bcd60e51b815260206004820152600a6024820152692120a22fa927aaaa22a960b11b604482015290519081900360640190fd5b611222838361180f565b600480546001600160a01b0319166001600160a01b03929092169190911790555050565b3b151590565b60008551875114611293576040805162461bcd60e51b815260206004820152600c60248201526b0aea49e9c8ebe988a9c8ea8960a31b604482015290519081900360640190fd5b60005b8751811015611451578681815181106112ab57fe5b6020026020010151600360008a84815181106112c357fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b0316021790555086818151811061131b57fe5b60200260200101516001600160a01b031688828151811061133857fe5b60200260200101516001600160a01b03167f812ca95fe4492a9e2d1f2723c2c40c03a60a27b059581ae20ac4e4d73bfba35460405160405180910390a360006001600160a01b031687828151811061138c57fe5b60200260200101516001600160a01b031614611449578681815181106113ae57fe5b60200260200101516001600160a01b0316632db09c1c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113ee57600080fd5b505afa158015611402573d6000803e3d6000fd5b505050506040513d602081101561141857600080fd5b5051875188908390811061142857fe5b60200260200101906001600160a01b031690816001600160a01b0316815250505b600101611296565b506060634201f98560e01b8888604051602401808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156114a557818101518382015260200161148d565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156114e45781810151838201526020016114cc565b50505050905001945050505050604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b03838183161783525050505090506109fd600660009054906101000a90046001600160a01b0316600160009054906101000a90046001600160a01b03168534600060405180606001604052808b81526020018d81526020018c815250875b60006109fd8888888888886000015189602001518a604001518a6118db565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b606060006115c789611033565b905060606115d6338686611aee565b604080516001600160a01b0385811682529151929350818c169233928e16917f85291dff2161a93c2f12c819d31889c96c63042116f5bc5a205aa701c2c429f5919081900360200190a4816001600160a01b031663d2ce7d65348c8c8c8c8c886040518863ffffffff1660e01b815260040180876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b0316815260200185815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156116c45781810151838201526020016116ac565b50505050905090810190601f1680156116f15780820380516001836020036101000a031916815260200191505b509750505050505050506000604051808303818588803b15801561171457600080fd5b505af1158015611728573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052602081101561175257600080fd5b8101908080516040519392919084600160201b82111561177157600080fd5b90830190602082018581111561178657600080fd5b8251600160201b81118282018810171561179f57600080fd5b82525081516020918201929091019080838360005b838110156117cc5781810151838201526020016117b4565b50505050905090810190601f1680156117f95780820380516001836020036101000a031916815260200191505b5060405250505092505050979650505050505050565b6001600160a01b038216611860576040805162461bcd60e51b81526020600482015260136024820152721253959053125117d0d3d55395115494105495606a1b604482015290519081900360640190fd5b6001546001600160a01b0316156118ad576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b600180546001600160a01b039384166001600160a01b03199182161790915560028054929093169116179055565b6000808a6001600160a01b031663679b6ded898c8a8a8e8f8c8c8c6040518a63ffffffff1660e01b815260040180896001600160a01b03166001600160a01b03168152602001888152602001878152602001866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156119a257818101518382015260200161198a565b50505050905090810190601f1680156119cf5780820380516001836020036101000a031916815260200191505b5099505050505050505050506020604051808303818588803b1580156119f457600080fd5b505af1158015611a08573d6000803e3d6000fd5b50505050506040513d6020811015611a1f57600080fd5b81019080805190602001909291905050509050808a6001600160a01b03168a6001600160a01b03167fc1d1490cf25c3b40d600dfb27c7680340ed1ab901b7e8f3551280968a3b372b0866040518080602001828103825283818151815260200191508051906020019080838360005b83811015611aa6578181015183820152602001611a8e565b50505050905090810190601f168015611ad35780820380516001836020036101000a031916815260200191505b509250505060405180910390a49a9950505050505050505050565b606083838360405160200180846001600160a01b03166001600160a01b0316815260200180602001828103825284848281815260200192508082843760008184015260408051601f19601f909301831690940184810390920184525250999850505050505050505056fea26469706673582212207eae060722608c3ee98203a94d6b04939621b9f0d33e044817183880db5288d764736f6c634300060b0033