More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,034 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Swap Bridged Dfx... | 67713950 | 10 days ago | IN | 0 POL | 0.0043477 | ||||
Swap Bridged Dfx... | 67640688 | 12 days ago | IN | 0 POL | 0.00948334 | ||||
Swap Bridged Dfx... | 67497741 | 15 days ago | IN | 0 POL | 0.00782362 | ||||
Swap Bridged Dfx... | 66695472 | 35 days ago | IN | 0 POL | 0.0043483 | ||||
Swap Bridged Dfx... | 66695008 | 35 days ago | IN | 0 POL | 0.0043477 | ||||
Swap Bridged Dfx... | 66694889 | 35 days ago | IN | 0 POL | 0.0034927 | ||||
Swap Bridged Dfx... | 66694853 | 35 days ago | IN | 0 POL | 0.0043471 | ||||
Swap Bridged Dfx... | 66491601 | 41 days ago | IN | 0 POL | 0.01231814 | ||||
Swap Bridged Dfx... | 66458955 | 41 days ago | IN | 0 POL | 0.0090353 | ||||
Swap Bridged Dfx... | 66458765 | 41 days ago | IN | 0 POL | 0.00617327 | ||||
Swap Bridged Dfx... | 66458488 | 41 days ago | IN | 0 POL | 0.01223416 | ||||
Swap Bridged Dfx... | 66300802 | 45 days ago | IN | 0 POL | 0.00312464 | ||||
Swap Bridged Dfx... | 66186685 | 48 days ago | IN | 0 POL | 0.00313089 | ||||
Swap Bridged Dfx... | 65935799 | 55 days ago | IN | 0 POL | 0.00252826 | ||||
Swap Bridged Dfx... | 65932581 | 55 days ago | IN | 0 POL | 0.00743948 | ||||
Swap Bridged Dfx... | 65723281 | 60 days ago | IN | 0 POL | 0.00679886 | ||||
Swap Bridged Dfx... | 65290612 | 71 days ago | IN | 0 POL | 0.00809214 | ||||
Swap Bridged Dfx... | 65290498 | 71 days ago | IN | 0 POL | 0.0043465 | ||||
Swap Bridged Dfx... | 65240645 | 72 days ago | IN | 0 POL | 0.0043465 | ||||
Swap Bridged Dfx... | 65240503 | 72 days ago | IN | 0 POL | 0.0043465 | ||||
Swap Bridged Dfx... | 65240402 | 72 days ago | IN | 0 POL | 0.0043465 | ||||
Swap Bridged Dfx... | 65240318 | 72 days ago | IN | 0 POL | 0.0043465 | ||||
Swap Bridged Dfx... | 65240239 | 72 days ago | IN | 0 POL | 0.0043465 | ||||
Swap Bridged Dfx... | 65192160 | 74 days ago | IN | 0 POL | 0.0043465 | ||||
Swap Bridged Dfx... | 65192029 | 74 days ago | IN | 0 POL | 0.0043465 |
Loading...
Loading
Contract Name:
Migrator
Compiler Version
v0.8.22+commit.4fc1097e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "IERC20.sol"; /// @title Migrator /// @dev This contract allows users to swap DFX for clDFX. contract Migrator { event ChangeOwner(address newOwner); event Exchange(address user, uint256 amount); event Withdraw(address admin, uint256 amount); address public owner; IERC20 public bridgedDfx; IERC20 public ccipDfx; /// @notice Ensures only the owner can call the function. modifier onlyOwner() { require(msg.sender == owner, "Not the contract owner"); _; } /// @param _dfx The address of bridged DFX. /// @param _ccipDfx The address of CCIP DFX. constructor(address _dfx, address _ccipDfx) { owner = msg.sender; bridgedDfx = IERC20(_dfx); ccipDfx = IERC20(_ccipDfx); } /// @notice Swaps `amount` of bridged DFX for an equivalent amount of CCIP DFX. /// @param amount The amount of bridged DFX to be swapped. function swapBridgedDfxToCcipDfx(uint256 amount) external { require(bridgedDfx.transferFrom(msg.sender, address(this), amount), "Transfer of bridged DFX failed"); require(ccipDfx.transfer(msg.sender, amount), "Transfer of CCIP DFX failed"); emit Exchange(msg.sender, amount); } /// @notice Allows the owner to withdraw any ERC20 token from the contract. /// @param tokenAddress The address of the ERC20 token to be withdrawn. function adminWithdraw(address tokenAddress, uint256 amount) external onlyOwner { IERC20 token = IERC20(tokenAddress); require(token.transfer(owner, amount), "Emergency withdraw failed"); emit Withdraw(msg.sender, amount); } /// @notice Allows the owner to set a new contract owner. /// @param newOwner The address of the new contract owner. function setOwner(address newOwner) external onlyOwner { owner = newOwner; emit ChangeOwner(newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; interface IERC20 { function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); }
{ "evmVersion": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "libraries": { "Migrator.sol": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_dfx","type":"address"},{"internalType":"address","name":"_ccipDfx","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"ChangeOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Exchange","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"admin","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"adminWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bridgedDfx","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ccipDfx","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"swapBridgedDfxToCcipDfx","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5060405161065938038061065983398101604081905261002f91610087565b600080546001600160a01b03199081163317909155600180546001600160a01b03948516908316179055600280549290931691161790556100ba565b80516001600160a01b038116811461008257600080fd5b919050565b6000806040838503121561009a57600080fd5b6100a38361006b565b91506100b16020840161006b565b90509250929050565b610590806100c96000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806311c532d61461006757806313af403514610096578063401d4482146100ab57806357916a27146100be5780638da5cb5b146100d1578063cc095ee5146100e4575b600080fd5b60025461007a906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b6100a96100a43660046104d3565b6100f7565b005b6100a96100b93660046104f5565b6101a4565b60015461007a906001600160a01b031681565b60005461007a906001600160a01b031681565b6100a96100f236600461051f565b6102f9565b6000546001600160a01b0316331461014f5760405162461bcd60e51b81526020600482015260166024820152752737ba103a34329031b7b73a3930b1ba1037bbb732b960511b60448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527ff285329298fd841af46eb83bbe90d1ebe2951c975a65b19a02f965f842ee69c5906020015b60405180910390a150565b6000546001600160a01b031633146101f75760405162461bcd60e51b81526020600482015260166024820152752737ba103a34329031b7b73a3930b1ba1037bbb732b960511b6044820152606401610146565b60005460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101839052839182169063a9059cbb906044016020604051808303816000875af115801561024b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026f9190610538565b6102bb5760405162461bcd60e51b815260206004820152601960248201527f456d657267656e6379207769746864726177206661696c6564000000000000006044820152606401610146565b60408051338152602081018490527f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364910160405180910390a1505050565b6001546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610350573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103749190610538565b6103c05760405162461bcd60e51b815260206004820152601e60248201527f5472616e73666572206f66206272696467656420444658206661696c656400006044820152606401610146565b60025460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015610411573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104359190610538565b6104815760405162461bcd60e51b815260206004820152601b60248201527f5472616e73666572206f66204343495020444658206661696c656400000000006044820152606401610146565b60408051338152602081018390527f5988e4c12f4844b895de0739f562558435dca9602fd8b970720ee3cf8dff39be9101610199565b80356001600160a01b03811681146104ce57600080fd5b919050565b6000602082840312156104e557600080fd5b6104ee826104b7565b9392505050565b6000806040838503121561050857600080fd5b610511836104b7565b946020939093013593505050565b60006020828403121561053157600080fd5b5035919050565b60006020828403121561054a57600080fd5b815180151581146104ee57600080fdfea264697066735822122073a1318b0023408829a970f7d9b75d5294d5258251ea9371a6db2c2a9ca558d164736f6c63430008160033000000000000000000000000e7804d91dfcde7f776c90043e03eaa6df87e639500000000000000000000000027f485b62c4a7e635f561a87560adf5090239e93
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100625760003560e01c806311c532d61461006757806313af403514610096578063401d4482146100ab57806357916a27146100be5780638da5cb5b146100d1578063cc095ee5146100e4575b600080fd5b60025461007a906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b6100a96100a43660046104d3565b6100f7565b005b6100a96100b93660046104f5565b6101a4565b60015461007a906001600160a01b031681565b60005461007a906001600160a01b031681565b6100a96100f236600461051f565b6102f9565b6000546001600160a01b0316331461014f5760405162461bcd60e51b81526020600482015260166024820152752737ba103a34329031b7b73a3930b1ba1037bbb732b960511b60448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527ff285329298fd841af46eb83bbe90d1ebe2951c975a65b19a02f965f842ee69c5906020015b60405180910390a150565b6000546001600160a01b031633146101f75760405162461bcd60e51b81526020600482015260166024820152752737ba103a34329031b7b73a3930b1ba1037bbb732b960511b6044820152606401610146565b60005460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101839052839182169063a9059cbb906044016020604051808303816000875af115801561024b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026f9190610538565b6102bb5760405162461bcd60e51b815260206004820152601960248201527f456d657267656e6379207769746864726177206661696c6564000000000000006044820152606401610146565b60408051338152602081018490527f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364910160405180910390a1505050565b6001546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610350573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103749190610538565b6103c05760405162461bcd60e51b815260206004820152601e60248201527f5472616e73666572206f66206272696467656420444658206661696c656400006044820152606401610146565b60025460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015610411573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104359190610538565b6104815760405162461bcd60e51b815260206004820152601b60248201527f5472616e73666572206f66204343495020444658206661696c656400000000006044820152606401610146565b60408051338152602081018390527f5988e4c12f4844b895de0739f562558435dca9602fd8b970720ee3cf8dff39be9101610199565b80356001600160a01b03811681146104ce57600080fd5b919050565b6000602082840312156104e557600080fd5b6104ee826104b7565b9392505050565b6000806040838503121561050857600080fd5b610511836104b7565b946020939093013593505050565b60006020828403121561053157600080fd5b5035919050565b60006020828403121561054a57600080fd5b815180151581146104ee57600080fdfea264697066735822122073a1318b0023408829a970f7d9b75d5294d5258251ea9371a6db2c2a9ca558d164736f6c63430008160033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e7804d91dfcde7f776c90043e03eaa6df87e639500000000000000000000000027f485b62c4a7e635f561a87560adf5090239e93
-----Decoded View---------------
Arg [0] : _dfx (address): 0xE7804D91dfCDE7F776c90043E03eAa6Df87E6395
Arg [1] : _ccipDfx (address): 0x27f485b62C4A7E635F561A87560Adf5090239E93
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000e7804d91dfcde7f776c90043e03eaa6df87e6395
Arg [1] : 00000000000000000000000027f485b62c4a7e635f561a87560adf5090239e93
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
POL | 100.00% | $0.020878 | 55,572.685 | $1,160.27 |
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.