[ { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "chainId", "type": "uint256" } ], "name": "AddSupportedChainId", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "contractAddress", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "supplyIncrement", "type": "uint256" } ], "name": "AddSwapToken", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "newBridgeRoleAddress", "type": "address" } ], "name": "MigrateBridgeRole", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "feeAddress", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "feeAmount", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "originTxId", "type": "bytes32" } ], "name": "Mint", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "contractAddress", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "supplyDecrement", "type": "uint256" } ], "name": "RemoveSwapToken", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Swap", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "chainId", "type": "uint256" } ], "name": "Unwrap", "type": "event" }, { "inputs": [ { "internalType": "uint256", "name": "chainId", "type": "uint256" } ], "name": "addSupportedChainId", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "contractAddress", "type": "address" }, { "internalType": "uint256", "name": "supplyIncrement", "type": "uint256" } ], "name": "addSwapToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "spender", "type": "address" } ], "name": "allowance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "approve", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "burn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "burnFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "chainIds", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "decimals", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } ], "name": "decreaseAllowance", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "addedValue", "type": "uint256" } ], "name": "increaseAllowance", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newBridgeRoleAddress", "type": "address" } ], "name": "migrateBridgeRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "feeAddress", "type": "address" }, { "internalType": "uint256", "name": "feeAmount", "type": "uint256" }, { "internalType": "bytes32", "name": "originTxId", "type": "bytes32" } ], "name": "mint", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "contractAddress", "type": "address" }, { "internalType": "uint256", "name": "supplyDecrement", "type": "uint256" } ], "name": "removeSwapToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "swap", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" } ], "name": "swapSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "symbol", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "transfer", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "chainId", "type": "uint256" } ], "name": "unwrap", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ]
60806040523480156200001157600080fd5b50604080518082018252600d81526c2bb930b83832b21022ba3432b960991b602080830191825283518085019094526006845265574554482e6560d01b9084015281519192916200006591600391620001dd565b5080516200007b906004906020840190620001dd565b50505062000099336005620000d460201b62000e781790919060201c565b6000805260076020527f6d5257204ebe7d88fd91ae87941cb2dd9d8062b64ae5a2bd2d28ec40b9fbf6df805460ff19166001179055620002c0565b620000e0828262000158565b15620001335760405162461bcd60e51b815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c650060448201526064015b60405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b60006001600160a01b038216620001bd5760405162461bcd60e51b815260206004820152602260248201527f526f6c65733a206163636f756e7420697320746865207a65726f206164647265604482015261737360f01b60648201526084016200012a565b506001600160a01b03166000908152602091909152604090205460ff1690565b828054620001eb9062000283565b90600052602060002090601f0160209004810192826200020f57600085556200025a565b82601f106200022a57805160ff19168380011785556200025a565b828001600101855582156200025a579182015b828111156200025a5782518255916020019190600101906200023d565b50620002689291506200026c565b5090565b5b808211156200026857600081556001016200026d565b600181811c908216806200029857607f821691505b60208210811415620002ba57634e487b7160e01b600052602260045260246000fd5b50919050565b6117b680620002d06000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80636e286671116100b8578063a457c2d71161007c578063a457c2d7146102aa578063a9059cbb146102bd578063ab32dbb7146102d0578063d004f0f7146102fc578063dd62ed3e1461030f578063eff038301461034857600080fd5b80636e2866711461024057806370a082311461025357806379cc67901461027c5780637c38b4571461028f57806395d89b41146102a257600080fd5b8063313ce5671161010a578063313ce567146101d057806339509351146101df57806342966c68146101f25780635d9898d31461020757806366de3b361461021a57806367fc19bb1461022d57600080fd5b806306fdde0314610147578063095ea7b31461016557806318160ddd1461018857806321d930901461019a57806323b872dd146101bd575b600080fd5b61014f61035b565b60405161015c9190611524565b60405180910390f35b610178610173366004611595565b6103ed565b604051901515815260200161015c565b6002545b60405190815260200161015c565b6101786101a83660046115bf565b60076020526000908152604090205460ff1681565b6101786101cb3660046115d8565b610403565b6040516012815260200161015c565b6101786101ed366004611595565b6104b9565b6102056102003660046115bf565b6104f0565b005b610205610215366004611614565b6104fd565b6102056102283660046115bf565b610579565b61020561023b366004611636565b610668565b61020561024e366004611684565b610708565b61018c610261366004611614565b6001600160a01b031660009081526020819052604090205490565b61020561028a366004611595565b6107fa565b61020561029d366004611595565b610882565b61014f610a4d565b6101786102b8366004611595565b610a5c565b6101786102cb366004611595565b610af7565b61018c6102de366004611614565b6001600160a01b031660009081526006602052604090206001015490565b61020561030a366004611595565b610b04565b61018c61031d3660046116a6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610205610356366004611595565b610d1a565b60606003805461036a906116d9565b80601f0160208091040260200160405190810160405280929190818152602001828054610396906116d9565b80156103e35780601f106103b8576101008083540402835291602001916103e3565b820191906000526020600020905b8154815290600101906020018083116103c657829003601f168201915b5050505050905090565b60006103fa338484610ef4565b50600192915050565b6000610410848484611019565b6001600160a01b03841660009081526001602090815260408083203384529091529020548281101561049a5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6104ae85336104a9868561172a565b610ef4565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916103fa9185906104a9908690611741565b6104fa33826111f1565b50565b610508600533611340565b6105245760405162461bcd60e51b815260040161049190611759565b61052f6005336113c3565b61053a600582610e78565b6040516001600160a01b03821681527f871b00a4e20f8436702d0174eb87d84d7cd1dd5c34d4bb1b4e75438b3398d5129060200160405180910390a150565b610584600533611340565b6105a05760405162461bcd60e51b815260040161049190611759565b46818114156105f15760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74206164642063757272656e7420636861696e2049442e000000006044820152606401610491565b60008281526007602052604090205460ff16151560011415610611575050565b60008281526007602052604090819020805460ff19166001179055517f677e2d9a4ed9201aa86725fef875137fc53876e6b68036b974404762682bd1229061065c9084815260200190565b60405180910390a15050565b610673600533611340565b61068f5760405162461bcd60e51b815260040161049190611759565b6106998585611445565b81156106a9576106a98383611445565b604080516001600160a01b03878116825260208201879052851681830152606081018490526080810183905290517f918d77674bb88eaf75afb307c9723ea6037706de68d6fc07dd0c6cba423a52509181900360a00190a15050505050565b3233146107575760405162461bcd60e51b815260206004820152601d60248201527f436f6e74726163742063616c6c73206e6f7420737570706f727465642e0000006044820152606401610491565b60008181526007602052604090205460ff1615156001146107ba5760405162461bcd60e51b815260206004820152601760248201527f436861696e204944206e6f7420737570706f727465642e0000000000000000006044820152606401610491565b6107c433836111f1565b60408051838152602081018390527f37a06799a3500428a773d00284aa706101f5ad94dae9ec37e1c3773aa54c3304910161065c565b6000610806833361031d565b9050818110156108645760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610491565b61087383336104a9858561172a565b61087d83836111f1565b505050565b61088d600533611340565b6108c85760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b6044820152606401610491565b813b6109115760405162461bcd60e51b815260206004820152601860248201527720b2323932b9b99034b9903737ba1031b7b73a3930b1ba1760411b6044820152606401610491565b6001600160a01b03828116600090815260066020526040902054166109785760405162461bcd60e51b815260206004820152601860248201527f5377617020746f6b656e206e6f7420737570706f7274656400000000000000006044820152606401610491565b6001600160a01b0382166000908152600660205260409020600101548110156109e3576001600160a01b0382166000908152600660205260409020600101546109c290829061172a565b6001600160a01b038316600090815260066020526040902060010155610a0e565b6001600160a01b038216600090815260066020526040812080546001600160a01b0319168155600101555b604080516001600160a01b0384168152602081018390527fd3b4025ff115b79bf2ec5a73c9c784ba8aa9f8f6ba9186b255895c1a9f9042a3910161065c565b60606004805461036a906116d9565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610ade5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610491565b610aed33856104a9868561172a565b5060019392505050565b60006103fa338484611019565b813b610b525760405162461bcd60e51b815260206004820152601860248201527f546f6b656e206973206e6f74206120636f6e74726163742e00000000000000006044820152606401610491565b6001600160a01b0382811660009081526006602052604090205416610bb95760405162461bcd60e51b815260206004820152601d60248201527f5377617020746f6b656e206973206e6f74206120636f6e74726163742e0000006044820152606401610491565b6001600160a01b038216600090815260066020526040902060010154811115610c245760405162461bcd60e51b815260206004820181905260248201527f5377617020616d6f756e74206973206d6f7265207468616e20737570706c792e6044820152606401610491565b6001600160a01b038216600090815260066020526040902060010154610c4b90829061172a565b6001600160a01b038381166000908152600660205260409081902060018101939093559154915163079cc67960e41b81523360048201526024810184905291169081906379cc679090604401600060405180830381600087803b158015610cb157600080fd5b505af1158015610cc5573d6000803e3d6000fd5b50505050610cd33383611445565b604080516001600160a01b0385168152602081018490527f562c219552544ec4c9d7a8eb850f80ea152973e315372bf4999fe7c953ea004f910160405180910390a1505050565b610d25600533611340565b610d415760405162461bcd60e51b815260040161049190611759565b813b610d8a5760405162461bcd60e51b815260206004820152601860248201527720b2323932b9b99034b9903737ba1031b7b73a3930b1ba1760411b6044820152606401610491565b6001600160a01b0382811660009081526006602052604090205416610df5576040805180820182526001600160a01b03848116808352602080840186815260009283526006909152939020915182546001600160a01b03191691161781559051600190910155610e39565b6001600160a01b038216600090815260066020526040902060010154610e1c908290611741565b6001600160a01b0383166000908152600660205260409020600101555b604080516001600160a01b0384168152602081018390527f3e4fdfb0f47da284fe8b5b3a7e5d10b211e323c9a0c144c421ae1d211873f853910161065c565b610e828282611340565b15610ecf5760405162461bcd60e51b815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c65006044820152606401610491565b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b6001600160a01b038316610f565760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610491565b6001600160a01b038216610fb75760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610491565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b03831661107d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610491565b6001600160a01b0382166110df5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610491565b6001600160a01b038316600090815260208190526040902054818110156111575760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610491565b611161828261172a565b6001600160a01b038086166000908152602081905260408082209390935590851681529081208054849290611197908490611741565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516111e391815260200190565b60405180910390a350505050565b6001600160a01b0382166112515760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610491565b6001600160a01b038216600090815260208190526040902054818110156112c55760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610491565b6112cf828261172a565b6001600160a01b038416600090815260208190526040812091909155600280548492906112fd90849061172a565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200161100c565b60006001600160a01b0382166113a35760405162461bcd60e51b815260206004820152602260248201527f526f6c65733a206163636f756e7420697320746865207a65726f206164647265604482015261737360f01b6064820152608401610491565b506001600160a01b03166000908152602091909152604090205460ff1690565b6113cd8282611340565b6114235760405162461bcd60e51b815260206004820152602160248201527f526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c6044820152606560f81b6064820152608401610491565b6001600160a01b0316600090815260209190915260409020805460ff19169055565b6001600160a01b03821661149b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610491565b80600260008282546114ad9190611741565b90915550506001600160a01b038216600090815260208190526040812080548392906114da908490611741565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600060208083528351808285015260005b8181101561155157858101830151858201604001528201611535565b81811115611563576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461159057600080fd5b919050565b600080604083850312156115a857600080fd5b6115b183611579565b946020939093013593505050565b6000602082840312156115d157600080fd5b5035919050565b6000806000606084860312156115ed57600080fd5b6115f684611579565b925061160460208501611579565b9150604084013590509250925092565b60006020828403121561162657600080fd5b61162f82611579565b9392505050565b600080600080600060a0868803121561164e57600080fd5b61165786611579565b94506020860135935061166c60408701611579565b94979396509394606081013594506080013592915050565b6000806040838503121561169757600080fd5b50508035926020909101359150565b600080604083850312156116b957600080fd5b6116c283611579565b91506116d060208401611579565b90509250929050565b600181811c908216806116ed57607f821691505b6020821081141561170e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008282101561173c5761173c611714565b500390565b6000821982111561175457611754611714565b500190565b6020808252600d908201526c2ab730baba3437b934bd32b21760991b60408201526060019056fea2646970667358221220a84c69c2870a0727649ece6a804c8f92f2467dfdc1164099b962eb14866e36a264736f6c63430008090033