Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Initialize | 14754048 | 1011 days ago | IN | 0 ETH | 0.00439504 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
NiftyConnectTokenTransferProxy
Compiler Version
v0.4.26+commit.4563c3fc
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2022-05-24 */ // File: openzeppelin-solidity/contracts/token/ERC20/IERC20.sol pragma solidity ^0.4.24; /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer( address indexed from, address indexed to, uint256 value ); event Approval( address indexed owner, address indexed spender, uint256 value ); } // File: openzeppelin-solidity/contracts/math/SafeMath.sol pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on 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-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b); return c; } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } // File: openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol pragma solidity ^0.4.24; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure. * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; function safeTransfer( IERC20 token, address to, uint256 value ) internal { require(token.transfer(to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { require(token.transferFrom(from, to, value)); } function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require((value == 0) || (token.allowance(address(this), spender) == 0)); require(token.approve(spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); require(token.approve(spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value); require(token.approve(spender, newAllowance)); } } // File: contracts/TokenTransferProxy.sol pragma solidity 0.4.26; contract TokenTransferProxy { using SafeERC20 for IERC20; /* Whether initialized. */ bool public initialized = false; address public exchangeAddress; function initialize (address _exchangeAddress) public { require(!initialized); initialized = true; exchangeAddress = _exchangeAddress; } /** * Call ERC20 `transferFrom` * * @dev Authenticated contract only * @param token IERC20 token address * @param from From address * @param to To address * @param amount Transfer amount */ function transferFrom(address token, address from, address to, uint amount) public returns (bool) { require(msg.sender==exchangeAddress, "not authorized"); IERC20(token).safeTransferFrom(from, to, amount); return true; } } // File: contracts/NiftyConnectTokenTransferProxy.sol pragma solidity 0.4.26; contract NiftyConnectTokenTransferProxy is TokenTransferProxy { }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"initialized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"exchangeAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_exchangeAddress","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526000805460ff1916905534801561001a57600080fd5b506103018061002a6000396000f3006080604052600436106100615763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663158ef93e811461006657806315dacbea1461008f5780639cd01605146100bf578063c4d66de8146100f0575b600080fd5b34801561007257600080fd5b5061007b610113565b604080519115158252519081900360200190f35b34801561009b57600080fd5b5061007b600160a060020a036004358116906024358116906044351660643561011c565b3480156100cb57600080fd5b506100d46101c1565b60408051600160a060020a039092168252519081900360200190f35b3480156100fc57600080fd5b50610111600160a060020a03600435166101d5565b005b60005460ff1681565b600080546101009004600160a060020a0316331461019b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6e6f7420617574686f72697a6564000000000000000000000000000000000000604482015290519081900360640190fd5b6101b6600160a060020a03861685858563ffffffff61022416565b506001949350505050565b6000546101009004600160a060020a031681565b60005460ff16156101e557600080fd5b60008054600160a060020a039092166101000274ffffffffffffffffffffffffffffffffffffffff001960ff1990931660011792909216919091179055565b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0385811660048301528481166024830152604482018490529151918616916323b872dd916064808201926020929091908290030181600087803b15801561029857600080fd5b505af11580156102ac573d6000803e3d6000fd5b505050506040513d60208110156102c257600080fd5b505115156102cf57600080fd5b505050505600a165627a7a72305820a2fffa5d500e26ccb8dda632eaf9a491f1e01ada1b1720fc23c4f06107546f3c0029
Deployed Bytecode
0x6080604052600436106100615763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663158ef93e811461006657806315dacbea1461008f5780639cd01605146100bf578063c4d66de8146100f0575b600080fd5b34801561007257600080fd5b5061007b610113565b604080519115158252519081900360200190f35b34801561009b57600080fd5b5061007b600160a060020a036004358116906024358116906044351660643561011c565b3480156100cb57600080fd5b506100d46101c1565b60408051600160a060020a039092168252519081900360200190f35b3480156100fc57600080fd5b50610111600160a060020a03600435166101d5565b005b60005460ff1681565b600080546101009004600160a060020a0316331461019b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6e6f7420617574686f72697a6564000000000000000000000000000000000000604482015290519081900360640190fd5b6101b6600160a060020a03861685858563ffffffff61022416565b506001949350505050565b6000546101009004600160a060020a031681565b60005460ff16156101e557600080fd5b60008054600160a060020a039092166101000274ffffffffffffffffffffffffffffffffffffffff001960ff1990931660011792909216919091179055565b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0385811660048301528481166024830152604482018490529151918616916323b872dd916064808201926020929091908290030181600087803b15801561029857600080fd5b505af11580156102ac573d6000803e3d6000fd5b505050506040513d60208110156102c257600080fd5b505115156102cf57600080fd5b505050505600a165627a7a72305820a2fffa5d500e26ccb8dda632eaf9a491f1e01ada1b1720fc23c4f06107546f3c0029
Deployed Bytecode Sourcemap
5459:68:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4591:31;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4591:31:0;;;;;;;;;;;;;;;;;;;;;;5097:267;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5097:267:0;-1:-1:-1;;;;;5097:267:0;;;;;;;;;;;;;;;;;4631:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4631:30:0;;;;;;;;-1:-1:-1;;;;;4631:30:0;;;;;;;;;;;;;;4670:178;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4670:178:0;-1:-1:-1;;;;;4670:178:0;;;;;;;4591:31;;;;;;:::o;5097:267::-;5199:4;5241:15;;;;;-1:-1:-1;;;;;5241:15:0;5229:10;:27;5221:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5286:48;-1:-1:-1;;;;;5286:30:0;;5317:4;5323:2;5327:6;5286:48;:30;:48;:::i;:::-;-1:-1:-1;5352:4:0;5097:267;;;;;;:::o;4631:30::-;;;;;;-1:-1:-1;;;;;4631:30:0;;:::o;4670:178::-;4754:11;;;;4753:12;4745:21;;;;;;4777:11;:18;;-1:-1:-1;;;;;4806:34:0;;;4777:18;4806:34;-1:-1:-1;;;;4777:18:0;;;4791:4;4777:18;4806:34;;;;;;;;;;4670:178::o;3261:180::-;3399:35;;;;;;-1:-1:-1;;;;;3399:35:0;;;;;;;;;;;;;;;;;;;;;;:18;;;;;;:35;;;;;;;;;;;;;;;-1:-1:-1;3399:18:0;:35;;;5:2:-1;;;;30:1;27;20:12;5:2;3399:35:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3399:35:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3399:35:0;3391:44;;;;;;;;3261:180;;;;:::o
Swarm Source
bzzr://a2fffa5d500e26ccb8dda632eaf9a491f1e01ada1b1720fc23c4f06107546f3c
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 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.