Note: Our ether balance display is temporarily unavailable. Please check back later.
Source Code
Overview
ETH Balance
Ether balance is temporarily unavailable. Please check back later.
Token Holdings
More Info
ContractCreator
Multichain Info
N/A
Latest 9 from a total of 9 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Change Supply Co... | 4138509 | 1162 days ago | IN | 0 ETH | 0.00015847 | ||||
Mint | 4000532 | 1186 days ago | IN | 0 ETH | 0.00012848 | ||||
Set Governance | 3517713 | 1270 days ago | IN | 0 ETH | 0.00008753 | ||||
Set Governance | 3517712 | 1270 days ago | IN | 0 ETH | 0.00002875 | ||||
Set Governance | 3499563 | 1273 days ago | IN | 0 ETH | 0.00004376 | ||||
Mint | 3212428 | 1323 days ago | IN | 0 ETH | 0.00007115 | ||||
Transfer | 3161787 | 1332 days ago | IN | 0.001 ETH | 0.00021045 | ||||
Transfer | 3161768 | 1332 days ago | IN | 0.001 ETH | 0.000084 | ||||
Mint | 3160731 | 1332 days ago | IN | 0 ETH | 0.00007285 |
Latest 12 internal transactions
Advanced mode:
Parent Txn Hash | Block | From | To | Value | ||
---|---|---|---|---|---|---|
4138509 | 1162 days ago | 0 ETH | ||||
4000532 | 1186 days ago | 0 ETH | ||||
4000532 | 1186 days ago | 0 ETH | ||||
3212428 | 1323 days ago | 0 ETH | ||||
3212428 | 1323 days ago | 0 ETH | ||||
3160731 | 1332 days ago | 0 ETH | ||||
3160731 | 1332 days ago | 0 ETH | ||||
3160668 | 1332 days ago | 0 ETH | ||||
3160668 | 1332 days ago | 0 ETH | ||||
3160668 | 1332 days ago | 0 ETH | ||||
3160668 | 1332 days ago | 0 ETH | ||||
3160668 | 1332 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
ADXSupplyController
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-08-03 */ // SPDX-License-Identifier: agpl-3.0 pragma solidity ^0.6.12; library SafeMath { function mul(uint a, uint b) internal pure returns (uint) { uint c = a * b; require(a == 0 || c / a == b); return c; } function div(uint a, uint b) internal pure returns (uint) { require(b > 0); uint c = a / b; require(a == b * c + a % b); return c; } function sub(uint a, uint b) internal pure returns (uint) { require(b <= a); return a - b; } function add(uint a, uint b) internal pure returns (uint) { uint c = a + b; require(c >= a); return c; } function max64(uint64 a, uint64 b) internal pure returns (uint64) { return a >= b ? a : b; } function min64(uint64 a, uint64 b) internal pure returns (uint64) { return a < b ? a : b; } function max256(uint a, uint b) internal pure returns (uint) { return a >= b ? a : b; } function min256(uint a, uint b) internal pure returns (uint) { return a < b ? a : b; } } // NOTE: this interface lacks return values for transfer/transferFrom/approve on purpose, // as we use the SafeERC20 library to check the return value interface GeneralERC20 { function transfer(address to, uint256 amount) external; function transferFrom(address from, address to, uint256 amount) external; function approve(address spender, uint256 amount) external; function balanceOf(address spender) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); } library SafeERC20 { function checkSuccess() private pure returns (bool) { uint256 returnValue = 0; assembly { // check number of bytes returned from last function call switch returndatasize() // no bytes returned: assume success case 0x0 { returnValue := 1 } // 32 bytes returned: check if non-zero case 0x20 { // copy 32 bytes into scratch space returndatacopy(0x0, 0x0, 0x20) // load those bytes into returnValue returnValue := mload(0x0) } // not sure what was returned: don't mark as success default { } } return returnValue != 0; } function transfer(address token, address to, uint256 amount) internal { GeneralERC20(token).transfer(to, amount); require(checkSuccess()); } function transferFrom(address token, address from, address to, uint256 amount) internal { GeneralERC20(token).transferFrom(from, to, amount); require(checkSuccess()); } function approve(address token, address spender, uint256 amount) internal { GeneralERC20(token).approve(spender, amount); require(checkSuccess()); } } contract ADXSupplyController { enum GovernanceLevel { None, Mint, All } mapping (address => uint8) governance; constructor() public { governance[msg.sender] = uint8(GovernanceLevel.All); } function mint(ADXToken token, address owner, uint amount) external { require(governance[msg.sender] >= uint8(GovernanceLevel.Mint), 'NOT_GOVERNANCE'); uint totalSupplyAfter = SafeMath.add(token.totalSupply(), amount); // 10 September 2020 if (now < 1599696000) { // 50M * 10**18 require(totalSupplyAfter <= 50000000000000000000000000, 'EARLY_MINT_TOO_LARGE'); } else { // 150M * 10**18 require(totalSupplyAfter <= 150000000000000000000000000, 'MINT_TOO_LARGE'); } token.mint(owner, amount); } function changeSupplyController(ADXToken token, address newSupplyController) external { require(governance[msg.sender] >= uint8(GovernanceLevel.All), 'NOT_GOVERNANCE'); token.changeSupplyController(newSupplyController); } function setGovernance(address addr, uint8 level) external { require(governance[msg.sender] >= uint8(GovernanceLevel.All), 'NOT_GOVERNANCE'); governance[addr] = level; } } contract ADXToken { using SafeMath for uint; // Constants string public constant name = "AdEx Network"; string public constant symbol = "ADX"; uint8 public constant decimals = 18; // Mutable variables uint public totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; event Approval(address indexed owner, address indexed spender, uint amount); event Transfer(address indexed from, address indexed to, uint amount); address public supplyController; address public immutable PREV_TOKEN; constructor(address supplyControllerAddr, address prevTokenAddr) public { supplyController = supplyControllerAddr; PREV_TOKEN = prevTokenAddr; } function balanceOf(address owner) external view returns (uint balance) { return balances[owner]; } function transfer(address to, uint amount) external returns (bool success) { balances[msg.sender] = balances[msg.sender].sub(amount); balances[to] = balances[to].add(amount); emit Transfer(msg.sender, to, amount); return true; } function transferFrom(address from, address to, uint amount) external returns (bool success) { balances[from] = balances[from].sub(amount); allowed[from][msg.sender] = allowed[from][msg.sender].sub(amount); balances[to] = balances[to].add(amount); emit Transfer(from, to, amount); return true; } function approve(address spender, uint amount) external returns (bool success) { allowed[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function allowance(address owner, address spender) external view returns (uint remaining) { return allowed[owner][spender]; } // Supply control function innerMint(address owner, uint amount) internal { totalSupply = totalSupply.add(amount); balances[owner] = balances[owner].add(amount); // Because of https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#transfer-1 emit Transfer(address(0), owner, amount); } function mint(address owner, uint amount) external { require(msg.sender == supplyController, 'NOT_SUPPLYCONTROLLER'); innerMint(owner, amount); } function changeSupplyController(address newSupplyController) external { require(msg.sender == supplyController, 'NOT_SUPPLYCONTROLLER'); supplyController = newSupplyController; } // Swapping: multiplier is 10**(18-4) // NOTE: Burning by sending to 0x00 is not possible with many ERC20 implementations, but this one is made specifically for the old ADX uint constant PREV_TO_CURRENT_TOKEN_MULTIPLIER = 100000000000000; function swap(uint prevTokenAmount) external { innerMint(msg.sender, prevTokenAmount.mul(PREV_TO_CURRENT_TOKEN_MULTIPLIER)); SafeERC20.transferFrom(PREV_TOKEN, msg.sender, address(0), prevTokenAmount); } }
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"contract ADXToken","name":"token","type":"address"},{"internalType":"address","name":"newSupplyController","type":"address"}],"name":"changeSupplyController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ADXToken","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint8","name":"level","type":"uint8"}],"name":"setGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5060028081111561001d57fe5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360ff160217905550610746806100826000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806336a6915b14610046578063c6c3bbe614610097578063d0adebef14610105575b600080fd5b6100956004803603604081101561005c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190505050610169565b005b610103600480360360608110156100ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610296565b005b6101676004803603604081101561011b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061059a565b005b60028081111561017557fe5b60ff166000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff16101561023b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4e4f545f474f5645524e414e434500000000000000000000000000000000000081525060200191505060405180910390fd5b806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360ff1602179055505050565b600160028111156102a357fe5b60ff166000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff161015610369576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4e4f545f474f5645524e414e434500000000000000000000000000000000000081525060200191505060405180910390fd5b60006103f58473ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103b457600080fd5b505afa1580156103c8573d6000803e3d6000fd5b505050506040513d60208110156103de57600080fd5b8101908080519060200190929190505050836106f1565b9050635f596c80421015610489576a295be96e64066972000000811115610484576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4541524c595f4d494e545f544f4f5f4c4152474500000000000000000000000081525060200191505060405180910390fd5b61050b565b6a7c13bc4b2c133c5600000081111561050a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4d494e545f544f4f5f4c4152474500000000000000000000000000000000000081525060200191505060405180910390fd5b5b8373ffffffffffffffffffffffffffffffffffffffff166340c10f1984846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561057c57600080fd5b505af1158015610590573d6000803e3d6000fd5b5050505050505050565b6002808111156105a657fe5b60ff166000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff16101561066c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4e4f545f474f5645524e414e434500000000000000000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a4012b21826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156106d557600080fd5b505af11580156106e9573d6000803e3d6000fd5b505050505050565b60008082840190508381101561070657600080fd5b809150509291505056fea264697066735822122090f274234c4d3dad8ea08fc2c06a1e6b34d87868b83521deaf8b713995f024c364736f6c634300060c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100415760003560e01c806336a6915b14610046578063c6c3bbe614610097578063d0adebef14610105575b600080fd5b6100956004803603604081101561005c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190505050610169565b005b610103600480360360608110156100ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610296565b005b6101676004803603604081101561011b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061059a565b005b60028081111561017557fe5b60ff166000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff16101561023b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4e4f545f474f5645524e414e434500000000000000000000000000000000000081525060200191505060405180910390fd5b806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360ff1602179055505050565b600160028111156102a357fe5b60ff166000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff161015610369576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4e4f545f474f5645524e414e434500000000000000000000000000000000000081525060200191505060405180910390fd5b60006103f58473ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103b457600080fd5b505afa1580156103c8573d6000803e3d6000fd5b505050506040513d60208110156103de57600080fd5b8101908080519060200190929190505050836106f1565b9050635f596c80421015610489576a295be96e64066972000000811115610484576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4541524c595f4d494e545f544f4f5f4c4152474500000000000000000000000081525060200191505060405180910390fd5b61050b565b6a7c13bc4b2c133c5600000081111561050a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4d494e545f544f4f5f4c4152474500000000000000000000000000000000000081525060200191505060405180910390fd5b5b8373ffffffffffffffffffffffffffffffffffffffff166340c10f1984846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561057c57600080fd5b505af1158015610590573d6000803e3d6000fd5b5050505050505050565b6002808111156105a657fe5b60ff166000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff16101561066c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4e4f545f474f5645524e414e434500000000000000000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a4012b21826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156106d557600080fd5b505af11580156106e9573d6000803e3d6000fd5b505050505050565b60008082840190508381101561070657600080fd5b809150509291505056fea264697066735822122090f274234c4d3dad8ea08fc2c06a1e6b34d87868b83521deaf8b713995f024c364736f6c634300060c0033
Deployed Bytecode Sourcemap
2816:1154:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3790:177;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3020:531;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3556:229;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3790:177;3894:19;3888:26;;;;;;;;3862:52;;:10;:22;3873:10;3862:22;;;;;;;;;;;;;;;;;;;;;;;;;:52;;;;3854:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3957:5;3938:10;:16;3949:4;3938:16;;;;;;;;;;;;;;;;:24;;;;;;;;;;;;;;;;;;3790:177;;:::o;3020:531::-;3132:20;3126:27;;;;;;;;3100:53;;:10;:22;3111:10;3100:22;;;;;;;;;;;;;;;;;;;;;;;;;:53;;;;3092:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3177:21;3201:41;3214:5;:17;;;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3235:6;3201:12;:41::i;:::-;3177:65;;3281:10;3275:3;:16;3271:246;;;3347:26;3327:16;:46;;3319:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3271:246;;;3465:27;3445:16;:47;;3437:74;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3271:246;3521:5;:10;;;3532:5;3539:6;3521:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3020:531;;;;:::o;3556:229::-;3687:19;3681:26;;;;;;;;3655:52;;:10;:22;3666:10;3655:22;;;;;;;;;;;;;;;;;;;;;;;;;:52;;;;3647:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3731:5;:28;;;3760:19;3731:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3556:229;;:::o;554:136::-;606:4;623:6;636:1;632;:5;623:14;;661:1;656;:6;;648:15;;;;;;681:1;674:8;;;554:136;;;;:::o
Swarm Source
ipfs://90f274234c4d3dad8ea08fc2c06a1e6b34d87868b83521deaf8b713995f024c3
Loading...
Loading
[ Download: CSV Export ]
[ 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.