More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,758 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Do Swap | 12251097 | 1222 days ago | IN | 0 ETH | 0.01135125 | ||||
Do Swap | 12245201 | 1223 days ago | IN | 0 ETH | 0.00518032 | ||||
Do Swap | 12242758 | 1224 days ago | IN | 0 ETH | 0.00619428 | ||||
Do Swap | 12236405 | 1225 days ago | IN | 0 ETH | 0.00471159 | ||||
Do Swap | 12223462 | 1227 days ago | IN | 0 ETH | 0.00398022 | ||||
Do Swap | 12222438 | 1227 days ago | IN | 0 ETH | 0.00417293 | ||||
Do Swap | 12219006 | 1227 days ago | IN | 0 ETH | 0.00440741 | ||||
Do Swap | 12215760 | 1228 days ago | IN | 0 ETH | 0.00457118 | ||||
Do Swap | 12214641 | 1228 days ago | IN | 0 ETH | 0.00496777 | ||||
Do Swap | 12212749 | 1228 days ago | IN | 0 ETH | 0.00669114 | ||||
Do Swap | 12211968 | 1228 days ago | IN | 0 ETH | 0.00503401 | ||||
Do Swap | 12211419 | 1229 days ago | IN | 0 ETH | 0.00523272 | ||||
Do Swap | 12206541 | 1229 days ago | IN | 0 ETH | 0.01085893 | ||||
Do Swap | 12205450 | 1229 days ago | IN | 0 ETH | 0.00456116 | ||||
Do Swap | 12205423 | 1229 days ago | IN | 0 ETH | 0.00616115 | ||||
Do Swap | 12204889 | 1230 days ago | IN | 0 ETH | 0.00629251 | ||||
Do Swap | 12203442 | 1230 days ago | IN | 0 ETH | 0.00584238 | ||||
Do Swap | 12203081 | 1230 days ago | IN | 0 ETH | 0.00589616 | ||||
Do Swap | 12201102 | 1230 days ago | IN | 0 ETH | 0.0066237 | ||||
Do Swap | 12190153 | 1232 days ago | IN | 0 ETH | 0.0085247 | ||||
Do Swap | 12175976 | 1234 days ago | IN | 0 ETH | 0.0060938 | ||||
Do Swap | 12173534 | 1234 days ago | IN | 0 ETH | 0.00668993 | ||||
Do Swap | 12168697 | 1235 days ago | IN | 0 ETH | 0.00953336 | ||||
Do Swap | 12168068 | 1235 days ago | IN | 0 ETH | 0.00961761 | ||||
Do Swap | 12167109 | 1235 days ago | IN | 0 ETH | 0.00854457 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
SwapContract
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity Multiple files format)
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "./TransferHelper.sol"; import "./SafeMath.sol"; contract SwapContract { using SafeMath for uint256; address public unc; address public uncx; constructor (address _unc, address _uncx) public { unc = _unc; uncx = _uncx; } function swapAmount (uint256 _amount) public pure returns (uint256) { uint256 credit = _amount.div(4000); return credit; } function doSwap (uint256 _amount) public { TransferHelper.safeTransferFrom(unc, address(msg.sender), address(this), _amount); uint256 credit = _amount.div(4000); require(credit > 0, 'Amount 0'); TransferHelper.safeTransfer(uncx, address(msg.sender), credit); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
pragma solidity 0.6.12; // helper methods for interacting with ERC20 tokens that do not consistently return true/false library TransferHelper { function safeApprove(address token, address to, uint value) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED'); } function safeTransfer(address token, address to, uint value) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED'); } function safeTransferFrom(address token, address from, address to, uint value) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED'); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_unc","type":"address"},{"internalType":"address","name":"_uncx","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"doSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"swapAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"unc","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uncx","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516108943803806108948339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506107b4806100e06000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063608fa60d14610051578063bc4af3dc1461007f578063e66e294a146100c1578063f8644992146100f5575b600080fd5b61007d6004803603602081101561006757600080fd5b8101908080359060200190929190505050610129565b005b6100ab6004803603602081101561009557600080fd5b8101908080359060200190929190505050610215565b6040518082815260200191505060405180910390f35b6100c9610238565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fd61025e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61015560008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16333084610282565b600061016c610fa08361046790919063ffffffff16565b9050600081116101e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f416d6f756e74203000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b610211600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633836104b1565b5050565b60008061022d610fa08461046790919063ffffffff16565b905080915050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060608573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200193505050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106103635780518252602082019150602081019050602083039250610340565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146103c5576040519150601f19603f3d011682016040523d82523d6000602084013e6103ca565b606091505b509150915081801561040a575060008151148061040957508080602001905160208110156103f757600080fd5b81019080805190602001909291905050505b5b61045f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061075b6024913960400191505060405180910390fd5b505050505050565b60006104a983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610694565b905092915050565b600060608473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401808373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106105745780518252602082019150602081019050602083039250610551565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146105d6576040519150601f19603f3d011682016040523d82523d6000602084013e6105db565b606091505b509150915081801561061b575060008151148061061a575080806020019051602081101561060857600080fd5b81019080805190602001909291905050505b5b61068d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5472616e7366657248656c7065723a205452414e534645525f4641494c45440081525060200191505060405180910390fd5b5050505050565b60008083118290610740576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107055780820151818401526020810190506106ea565b50505050905090810190601f1680156107325780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161074c57fe5b04905080915050939250505056fe5472616e7366657248656c7065723a205452414e534645525f46524f4d5f4641494c4544a2646970667358221220375d9f6d4624bdedba96e79ca9bf8672ba033a7b1eeef8763fd3e7f2d3a4213564736f6c634300060c0033000000000000000000000000f29e46887ffae92f1ff87dfe39713875da541373000000000000000000000000adb2437e6f65682b85f814fbc12fec0508a7b1d0
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c8063608fa60d14610051578063bc4af3dc1461007f578063e66e294a146100c1578063f8644992146100f5575b600080fd5b61007d6004803603602081101561006757600080fd5b8101908080359060200190929190505050610129565b005b6100ab6004803603602081101561009557600080fd5b8101908080359060200190929190505050610215565b6040518082815260200191505060405180910390f35b6100c9610238565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fd61025e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61015560008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16333084610282565b600061016c610fa08361046790919063ffffffff16565b9050600081116101e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f416d6f756e74203000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b610211600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633836104b1565b5050565b60008061022d610fa08461046790919063ffffffff16565b905080915050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060608573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200193505050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106103635780518252602082019150602081019050602083039250610340565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146103c5576040519150601f19603f3d011682016040523d82523d6000602084013e6103ca565b606091505b509150915081801561040a575060008151148061040957508080602001905160208110156103f757600080fd5b81019080805190602001909291905050505b5b61045f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061075b6024913960400191505060405180910390fd5b505050505050565b60006104a983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610694565b905092915050565b600060608473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401808373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106105745780518252602082019150602081019050602083039250610551565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146105d6576040519150601f19603f3d011682016040523d82523d6000602084013e6105db565b606091505b509150915081801561061b575060008151148061061a575080806020019051602081101561060857600080fd5b81019080805190602001909291905050505b5b61068d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5472616e7366657248656c7065723a205452414e534645525f4641494c45440081525060200191505060405180910390fd5b5050505050565b60008083118290610740576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107055780820151818401526020810190506106ea565b50505050905090810190601f1680156107325780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161074c57fe5b04905080915050939250505056fe5472616e7366657248656c7065723a205452414e534645525f46524f4d5f4641494c4544a2646970667358221220375d9f6d4624bdedba96e79ca9bf8672ba033a7b1eeef8763fd3e7f2d3a4213564736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f29e46887ffae92f1ff87dfe39713875da541373000000000000000000000000adb2437e6f65682b85f814fbc12fec0508a7b1d0
-----Decoded View---------------
Arg [0] : _unc (address): 0xf29e46887FFAE92f1ff87DfE39713875Da541373
Arg [1] : _uncx (address): 0xaDB2437e6F65682B85F814fBc12FeC0508A7B1D0
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000f29e46887ffae92f1ff87dfe39713875da541373
Arg [1] : 000000000000000000000000adb2437e6f65682b85f814fbc12fec0508a7b1d0
Deployed Bytecode Sourcemap
122:675:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;501:293;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;352:141;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;215:19;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;190:18;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;501:293;551:81;583:3;;;;;;;;;;596:10;617:4;624:7;551:31;:81::i;:::-;641:14;658:17;670:4;658:7;:11;;:17;;;;:::i;:::-;641:34;;701:1;692:6;:10;684:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;724:62;752:4;;;;;;;;;;;766:10;779:6;724:27;:62::i;:::-;501:293;;:::o;352:141::-;411:7;429:14;446:17;458:4;446:7;:11;;:17;;;;:::i;:::-;429:34;;479:6;472:13;;;352:141;;;:::o;215:19::-;;;;;;;;;;;;;:::o;190:18::-;;;;;;;;;;;;:::o;755:323:2:-;855:12;869:17;890:5;:10;;924;936:4;942:2;946:5;901:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;890:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;854:99;;;;972:7;:57;;;;;999:1;984:4;:11;:16;:44;;;;1015:4;1004:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;984:44;972:57;964:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;755:323;;;;;;:::o;3101:130:0:-;3159:7;3185:39;3189:1;3192;3185:39;;;;;;;;;;;;;;;;;:3;:39::i;:::-;3178:46;;3101:130;;;;:::o;453:294:2:-;535:12;549:17;570:5;:10;;604;616:2;620:5;581:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;570:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;534:93;;;;646:7;:57;;;;;673:1;658:4;:11;:16;:44;;;;689:4;678:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;658:44;646:57;638:101;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;453:294;;;;;:::o;3713:272:0:-;3799:7;3830:1;3826;:5;3833:12;3818:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3856:9;3872:1;3868;:5;;;;;;3856:17;;3977:1;3970:8;;;3713:272;;;;;:::o
Swarm Source
ipfs://375d9f6d4624bdedba96e79ca9bf8672ba033a7b1eeef8763fd3e7f2d3a42135
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.