Source Code
Latest 25 from a total of 340 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Swap All Token | 10951125 | 1978 days ago | IN | 0 ETH | 0.02605939 | ||||
| Swap All Token | 10925395 | 1982 days ago | IN | 0 ETH | 0.01754242 | ||||
| Swap All Token | 10911217 | 1984 days ago | IN | 0 ETH | 0.02858654 | ||||
| Swap All Token | 10887051 | 1988 days ago | IN | 0 ETH | 0.07225005 | ||||
| Swap All Token I... | 10842921 | 1994 days ago | IN | 0 ETH | 0.29784465 | ||||
| Swap All Token I... | 10842887 | 1994 days ago | IN | 0 ETH | 0.29448355 | ||||
| Swap All Token I... | 10842881 | 1994 days ago | IN | 0 ETH | 0.31856526 | ||||
| Swap All Token I... | 10835802 | 1995 days ago | IN | 0 ETH | 0.1535502 | ||||
| Swap All Token I... | 10829836 | 1996 days ago | IN | 0 ETH | 0.66214712 | ||||
| Swap All Token I... | 10829835 | 1996 days ago | IN | 0 ETH | 0.66214712 | ||||
| Swap All Token I... | 10829834 | 1996 days ago | IN | 0 ETH | 0.60753811 | ||||
| Swap All Token I... | 10829826 | 1996 days ago | IN | 0 ETH | 0.60753705 | ||||
| Swap All Token I... | 10829760 | 1996 days ago | IN | 0 ETH | 0.59388348 | ||||
| Swap All Token I... | 10829620 | 1996 days ago | IN | 0 ETH | 0.60070762 | ||||
| Swap All Token I... | 10829613 | 1996 days ago | IN | 0 ETH | 0.60070868 | ||||
| Swap All Token I... | 10829603 | 1996 days ago | IN | 0 ETH | 0.6647168 | ||||
| Swap All Token I... | 10829575 | 1996 days ago | IN | 0 ETH | 0.65388201 | ||||
| Swap All Token I... | 10829569 | 1996 days ago | IN | 0 ETH | 0.65531856 | ||||
| Swap All Token I... | 10829563 | 1996 days ago | IN | 0 ETH | 0.65531971 | ||||
| Swap All Token I... | 10829560 | 1996 days ago | IN | 0 ETH | 0.07593902 | ||||
| Swap All Token I... | 10826906 | 1997 days ago | IN | 0 ETH | 0.7493911 | ||||
| Swap All Token I... | 10826894 | 1997 days ago | IN | 0 ETH | 0.07092108 | ||||
| Swap All Token I... | 10826891 | 1997 days ago | IN | 0 ETH | 0.74270011 | ||||
| Swap All Token I... | 10826877 | 1997 days ago | IN | 0 ETH | 0.07028786 | ||||
| Swap All Token I... | 10826861 | 1997 days ago | IN | 0 ETH | 0.74269878 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
SwapEngine
Compiler Version
v0.6.10+commit.00c0fcaf
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2020-08-24
*/
// Sources flattened with buidler v1.3.8 https://buidler.dev
// File @openzeppelin/contracts/token/ERC20/IERC20.sol@v3.1.0
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.6.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// File contracts/6/engine/IERC20Mintable.sol
/**
* @title Interface for mintable ERC20
* @author Validity Labs AG <info@validitylabs.org>
*/
pragma solidity ^0.6.0;
interface IERC20Mintable is IERC20 {
/**
* @dev Create `amount` tokens for `to`, increasing the total supply.
*
* Emits a {Transfer} event.
*/
function mint(address to, uint256 amount) external;
}
// File @openzeppelin/contracts/GSN/Context.sol@v3.1.0
pragma solidity ^0.6.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
// File @openzeppelin/contracts/access/Ownable.sol@v3.1.0
pragma solidity ^0.6.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
// File @openzeppelin/contracts/math/SafeMath.sol@v3.1.0
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;
}
}
// File @openzeppelin/contracts/utils/Address.sol@v3.1.0
pragma solidity ^0.6.2;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
// solhint-disable-next-line no-inline-assembly
assembly { codehash := extcodehash(account) }
return (codehash != accountHash && codehash != 0x0);
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
// File @openzeppelin/contracts/token/ERC20/SafeERC20.sol@v3.1.0
pragma solidity ^0.6.0;
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
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'
// solhint-disable-next-line max-line-length
require((value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).add(value);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) { // Return data is optional
// solhint-disable-next-line max-line-length
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
// File contracts/6/property/Reclaimable.sol
/**
* @title Reclaimable
* @dev This contract gives owner right to recover any ERC20 tokens accidentally sent to
* the token contract. The recovered token will be sent to the owner of token.
* @author Validity Labs AG <info@validitylabs.org>
*/
pragma solidity ^0.6.0;
contract Reclaimable is Ownable {
using SafeERC20 for IERC20;
using SafeMath for uint256;
mapping (address => uint256) private _allowedBalances;
/**
* @dev Emitted when the allowance of a `token` to be held by this contract.
*/
event AllowedTokenBalance(address indexed token, uint256 value);
/**
* @notice Let the owner to retrieve other tokens accidentally sent to this contract.
* @dev This function is suitable when no token of any kind shall be stored under
* the address of the inherited contract.
* @param tokenToBeRecovered address of the token to be recovered.
*/
function reclaimToken(IERC20 tokenToBeRecovered) public onlyOwner {
uint256 balance = tokenToBeRecovered.balanceOf(address(this)).sub(_allowedBalances[address(tokenToBeRecovered)]);
tokenToBeRecovered.safeTransfer(owner(), balance);
}
/**
* @dev Get the allowance of the `tokenToBeRecovered` token of this contract.
* @param tokenToBeRecovered address of the token to be recovered.
*/
function getAllowedBalance(address tokenToBeRecovered) public view returns (uint256) {
return _allowedBalances[tokenToBeRecovered];
}
/**
* @notice Atomically increases the allowance of token balance granted to `tokenToBeRecovered` by the caller.
* @dev Emits an {AllowedTokenBalance} event indicating the updated allowance.
* @param tokenToBeRecovered address of the token to be recovered.
* @param addedValue increase in the allowance.
*/
function increaseAllowedBalance(address tokenToBeRecovered, uint256 addedValue) internal virtual returns (bool) {
_setAllowedBalance(tokenToBeRecovered, _allowedBalances[tokenToBeRecovered].add(addedValue));
return true;
}
// /**
// * @notice Atomically decreases the allowance of token balance granted to `tokenToBeRecovered` by the caller.
// * @dev Emits an {AllowedTokenBalance} event indicating the updated allowance.
// * @param tokenToBeRecovered address of the token to be recovered.
// * @param subtractedValue decrease in the allowance.
// */
// function decreaseAllowedBalance(address tokenToBeRecovered, uint256 subtractedValue) internal virtual returns (bool) {
// _setAllowedBalance(tokenToBeRecovered, _allowedBalances[tokenToBeRecovered].sub(subtractedValue));
// return true;
// }
/**
* @notice Sets `amount` as the allowance of this contract over the `tokenToBeRecovered` tokens.
* @param tokenToBeRecovered address of the token to be recovered.
* @param amount allowance.
*/
function _setAllowedBalance(address tokenToBeRecovered, uint256 amount) internal virtual {
_allowedBalances[tokenToBeRecovered] = amount;
emit AllowedTokenBalance(tokenToBeRecovered, amount);
}
}
// File contracts/6/engine/SwapEngine.sol
/**
* @title Token upgrade swap engine
* @author Validity Labs AG <info@validitylabs.org>
*/
pragma solidity ^0.6.0;
contract SwapEngine is Context, Ownable, Reclaimable {
using SafeERC20 for IERC20;
using SafeMath for uint256;
IERC20 public oldToken;
IERC20Mintable public newToken;
uint256 public constant conversionRate = 10000000000; // 1 to 1 from 8 decimals to 18 decimals.
uint256 public totalConverted;
mapping(address=>uint256) public convertedBalanceOf;
/**
* @dev Emitted when old tokens are swaapped for new ones.
*/
event TokenSwapped(address indexed holder, address indexed caller, uint256 oldTokenAmount);
/**
* @dev Create a token swap engine providing an ERC20 token and a new one.
* @notice The difference in decimal between the old one and the new one is 10.
* @param _newOwner address of the swap engine contract owner
* @param _oldToken address of the old token contract
* @param _newToken address of the new token contract
*/
constructor(address _newOwner, address _oldToken, address _newToken) public {
transferOwnership(_newOwner);
oldToken = IERC20(_oldToken);
newToken = IERC20Mintable(_newToken);
}
/**
* @dev Swap all the tokens of the given token holders in a batch.
* @notice This function is restricted for the engine owner. If a non=token holder
* It does not revert when balance is zero, so that the rest can proceed.
* @param tokenHolders array of wallet addresses of token holders
*/
function swapAllTokenInBatch(address[] calldata tokenHolders) public onlyOwner {
for (uint256 i = 0; i < tokenHolders.length; i++) {
uint256 balance = oldToken.balanceOf(tokenHolders[i]);
_swap(tokenHolders[i], balance);
}
}
/**
* @dev Swap all the tokens of a given token holder.
* @notice This function is restricted for the engine owner or by tokenholders for themselves.
* It reverts when balance is zero. No need to proceed with the swap.
* @param tokenHolder wallet addresse of the token holder
*/
function swapAllToken(address tokenHolder) public {
require(owner() == _msgSender() || tokenHolder == _msgSender(), "Either the owner or a tokenholder can swapAllToken");
uint256 balance = oldToken.balanceOf(tokenHolder);
require(balance > 0, "No token to swap");
_swap(tokenHolder, balance);
}
/**
* @dev Swap some tokens of the caller
* @notice This function can be called by any account, even account without old token.
* It reverts when balance is zero. No need to proceed with the swap.
* @param amount amount of old token to be swapped into new ones.
*/
function swapToken(uint256 amount) public {
uint256 balance = oldToken.balanceOf(_msgSender());
require(balance > 0, "No token to swap");
require(amount <= balance, "Swap amount is bigger than the balance");
_swap(_msgSender(), amount);
}
/**
* @dev Swap some old tokens owned by a wallet.
* @notice core logic for token swap.
* @param tokenHolder wallet addresse of the token holder
* @param amount amount of old token to be swapped into new ones.
*/
function _swap(address tokenHolder, uint256 amount) internal {
if (amount == 0) {
return;
}
uint256 allowance = oldToken.allowance(tokenHolder, address(this));
require(amount <= allowance, "Swap amount is bigger than the allowance");
convertedBalanceOf[tokenHolder] = convertedBalanceOf[tokenHolder].add(amount);
totalConverted = totalConverted.add(amount);
increaseAllowedBalance(address(oldToken), amount);
uint256 newTokenToMint = amount.mul(conversionRate);
// transfer old token to the contract.
oldToken.safeTransferFrom(tokenHolder, address(this), amount);
// mint new token to the holder
newToken.mint(tokenHolder, newTokenToMint);
emit TokenSwapped(tokenHolder, _msgSender(), amount);
}
/**
* @dev OVERRIDE method to forbid the possibility of renouncing ownership
*/
function renounceOwnership() public override(Ownable) {
revert("There must be an owner");
}
}
// File @openzeppelin/contracts/utils/EnumerableSet.sol@v3.1.0
pragma solidity ^0.6.0;
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256`
* (`UintSet`) are supported.
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping (bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) { // Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
// When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
// so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.
bytes32 lastvalue = set._values[lastIndex];
// Move the last value to the index where the value to delete is
set._values[toDeleteIndex] = lastvalue;
// Update the index for the moved value
set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the index for the deleted slot
delete set._indexes[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
return set._values[index];
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(value)));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(value)));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(value)));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint256(_at(set._inner, index)));
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
}
// File @openzeppelin/contracts/access/AccessControl.sol@v3.1.0
pragma solidity ^0.6.0;
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/
abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view returns (bool) {
return _roles[role].members.contains(account);
}
/**
* @dev Returns the number of accounts that have `role`. Can be used
* together with {getRoleMember} to enumerate all bearers of a role.
*/
function getRoleMemberCount(bytes32 role) public view returns (uint256) {
return _roles[role].members.length();
}
/**
* @dev Returns one of the accounts that have `role`. `index` must be a
* value between 0 and {getRoleMemberCount}, non-inclusive.
*
* Role bearers are not sorted in any particular way, and their ordering may
* change at any point.
*
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
* you perform all queries on the same block. See the following
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
* for more information.
*/
function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
return _roles[role].members.at(index);
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) public virtual {
require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant");
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) public virtual {
require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke");
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) public virtual {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);
_roles[role].adminRole = adminRole;
}
function _grantRole(bytes32 role, address account) private {
if (_roles[role].members.add(account)) {
emit RoleGranted(role, account, _msgSender());
}
}
function _revokeRole(bytes32 role, address account) private {
if (_roles[role].members.remove(account)) {
emit RoleRevoked(role, account, _msgSender());
}
}
}
// File @openzeppelin/contracts/token/ERC20/ERC20.sol@v3.1.0
pragma solidity ^0.6.0;
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning `false` on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for {name} and {symbol}, initializes {decimals} with
* a default value of 18.
*
* To select a different value for {decimals}, use {_setupDecimals}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name, string memory symbol) public {
_name = name;
_symbol = symbol;
_decimals = 18;
}
/**
* @dev Returns the name of the token.
*/
function name() public view returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
* called.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view returns (uint8) {
return _decimals;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/
function _setupDecimals(uint8 decimals_) internal {
_decimals = decimals_;
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
// File @openzeppelin/contracts/token/ERC20/ERC20Burnable.sol@v3.1.0
pragma solidity ^0.6.0;
/**
* @dev Extension of {ERC20} that allows token holders to destroy both their own
* tokens and those that they have an allowance for, in a way that can be
* recognized off-chain (via event analysis).
*/
abstract contract ERC20Burnable is Context, ERC20 {
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public virtual {
_burn(_msgSender(), amount);
}
/**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/
function burnFrom(address account, uint256 amount) public virtual {
uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, "ERC20: burn amount exceeds allowance");
_approve(account, _msgSender(), decreasedAllowance);
_burn(account, amount);
}
}
// File @openzeppelin/contracts/token/ERC20/ERC20Capped.sol@v3.1.0
pragma solidity ^0.6.0;
/**
* @dev Extension of {ERC20} that adds a cap to the supply of tokens.
*/
abstract contract ERC20Capped is ERC20 {
uint256 private _cap;
/**
* @dev Sets the value of the `cap`. This value is immutable, it can only be
* set once during construction.
*/
constructor (uint256 cap) public {
require(cap > 0, "ERC20Capped: cap is 0");
_cap = cap;
}
/**
* @dev Returns the cap on the token's total supply.
*/
function cap() public view returns (uint256) {
return _cap;
}
/**
* @dev See {ERC20-_beforeTokenTransfer}.
*
* Requirements:
*
* - minted tokens must not cause the total supply to go over the cap.
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override {
super._beforeTokenTransfer(from, to, amount);
if (from == address(0)) { // When minting tokens
require(totalSupply().add(amount) <= _cap, "ERC20Capped: cap exceeded");
}
}
}
// File contracts/6/v2/StonToken.sol
/**
* @title New STON token
* @author Validity Labs AG <info@validitylabs.org>
*/
pragma solidity ^0.6.0;
contract StonToken is
Ownable,
Reclaimable,
AccessControl,
ERC20Burnable,
ERC20Capped
{
bytes32 public constant WHITELIST_MANAGER_ROLE = keccak256(
"WHITELIST_MANAGER_ROLE"
);
bytes32 public constant WHITELISTED_ROLE = keccak256("WHITELISTED_ROLE");
address public upgradeEngine;
bool public upgradeStarted;
/**
* @dev Emitted when the upgrade token swap engine is conected or disconnected to the token contract.
* @param engineConnected the status of the upgrade engine when the connection status changes
* @param upgradeEngine address of the engine contract.
*/
event SwapEngineConnected(bool indexed engineConnected, address indexed upgradeEngine);
/**
* @dev Set a new owner and let it become the default admin and whiteliste manager.
* @notice Capped at 370 million tokens. Set the role relation between WHITELISTED and WHITELIST_MANAGER
* @param newOwner address of the token contract owner
*/
constructor(address newOwner)
public
ERC20("STON", "STON")
ERC20Capped(370000000 ether)
{
_setRoleAdmin(WHITELISTED_ROLE, WHITELIST_MANAGER_ROLE);
transferOwnership(newOwner);
emit SwapEngineConnected(false, upgradeEngine);
}
/**
* @dev Connect the upgrade token swap engine so that this new Ston token can be minted for old Ston token holders.
* @notice Only owner can set the engineAddress. This action is one-time only.
* @param engineAddress address of the token upgrade token swap engine contract.
*/
function connectUpgradeEngine(address engineAddress) public onlyOwner {
require(
!upgradeStarted,
"Upgrade has started. Cannot set the engine address again!"
);
upgradeEngine = engineAddress;
upgradeStarted = true;
emit SwapEngineConnected(upgradeStarted, upgradeEngine);
}
/**
* @dev Disconnect the upgrade token swap engine and mint the remaining Ston tokens to the liquidity pool.
* @notice Only owner can disconnect the engine. This action is one-time only.
* @param poolAddress address to receive the remaining token.
*/
function removeUpgradeEngine(address poolAddress) public onlyOwner {
require(
upgradeStarted,
"Upgrade has not started yet. Cannot reset the engine address!"
);
require(
upgradeEngine != address(0),
"Upgrade has already been reset!"
);
// mint the remaining tokens to the pool
_mint(poolAddress, cap().sub(totalSupply()));
// leave the minter to address zero.
upgradeEngine = address(0);
emit SwapEngineConnected(false, upgradeEngine);
}
/**
* @dev Add a list of accounts to the whitelist
* @notice This whitelist is not used to control token transfer. It is reserved for tracking the eligibility of voting.
* @param accounts An array of accounts to tbe whitelisted
*/
function addAccountsToWhitelist(address[] calldata accounts) public {
require(hasRole(getRoleAdmin(WHITELISTED_ROLE), _msgSender()), "AccessControl: sender must be an admin to grant");
for (uint256 i = 0; i < accounts.length; i++) {
_setupRole(WHITELISTED_ROLE, accounts[i]);
}
}
/**
* @dev OVERRIDE Mint tokens, with a defined cap of 370 million tokens.
* @notice It should only be done by the upgrade token swap engine or upon disconnecting of the said engine.
* @param to recipient address.
* @param amount amount of token to be transferred.
*/
function mint(address to, uint256 amount) public {
require(
upgradeStarted && upgradeEngine == _msgSender(),
"STON can only be minted by the upgrade swap engine."
);
_mint(to, amount);
}
/**
* @dev OVERRIDE Burn tokens. It can only be called by the token owner.
* @param amount amount of token to be burnt.
*/
function burn(uint256 amount) public override(ERC20Burnable) onlyOwner {
super.burn(amount);
}
/**
* @dev OVERRIDE Burn tokens from an account. It can only be called by the token owner.
* @notice A suffient allowance is needed.
* @param account address of the token holder.
* @param amount amount of token to be burnt.
*/
function burnFrom(address account, uint256 amount)
public
override(ERC20Burnable)
onlyOwner
{
super.burnFrom(account, amount);
}
/**
* @dev OVERRIDE method to forbid the possibility of renouncing ownership
*/
function renounceOwnership() public override(Ownable) {
revert("There must be an owner");
}
/**
* @dev OVERRIDE transfer the ownership of this token
* @notice whitelist manager role and default admin (manages whitelist managers) are transfered at the same time.
* @param newOwner address of the new owner.
*/
function transferOwnership(address newOwner) public override(Ownable) {
super.renounceRole(DEFAULT_ADMIN_ROLE, _msgSender());
_setupRole(DEFAULT_ADMIN_ROLE, newOwner);
_setupRole(WHITELIST_MANAGER_ROLE, newOwner);
//if (newOwner != _msgSender()) {
//}
super.transferOwnership(newOwner);
}
/**
* @dev OVERRIDE renounce a role
* @notice The default admin (manages whitelist managers) cannot be renounced.
* @param role role to be renounced.
* @param account address that is about to renounce its role.
*/
function renounceRole(bytes32 role, address account) public override(AccessControl) {
require(role != DEFAULT_ADMIN_ROLE, "Cannot renounce the admin role");
super.renounceRole(role, account);
}
/**
* @dev OVERRIDE checker before token transfer
* @notice Inherit ERC20Capped
* @param from token sender address
* @param to token recipient address
* @param amount amount of tokens to be transferred.
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override(ERC20, ERC20Capped) {
super._beforeTokenTransfer(from, to, amount);
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"},{"internalType":"address","name":"_oldToken","type":"address"},{"internalType":"address","name":"_newToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"AllowedTokenBalance","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"holder","type":"address"},{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldTokenAmount","type":"uint256"}],"name":"TokenSwapped","type":"event"},{"inputs":[],"name":"conversionRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"convertedBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenToBeRecovered","type":"address"}],"name":"getAllowedBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newToken","outputs":[{"internalType":"contract IERC20Mintable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oldToken","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":"contract IERC20","name":"tokenToBeRecovered","type":"address"}],"name":"reclaimToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenHolder","type":"address"}],"name":"swapAllToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokenHolders","type":"address[]"}],"name":"swapAllTokenInBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"swapToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalConverted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b50604051620020da380380620020da833981810160405260608110156200003757600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505060006200006e620001a860201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506200011d83620001b060201b60201c565b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050620003c8565b600033905090565b620001c0620001a860201b60201c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000282576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156200030a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180620020b46026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611cdc80620003d86000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80638da5cb5b1161008c578063b31c710a11610066578063b31c710a146102eb578063ba82dc5214610335578063c42bd05a1461038d578063f2fde38b146103d7576100cf565b80638da5cb5b1461023f57806397fd3613146102895780639fa37b7d146102a7576100cf565b806317ffc320146100d45780632bac8e4f1461011857806345645fb6146101915780634bbf3a7a146101e9578063715018a6146102175780637ffdf53e14610221575b600080fd5b610116600480360360208110156100ea57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061041b565b005b61018f6004803603602081101561012e57600080fd5b810190808035906020019064010000000081111561014b57600080fd5b82018360208201111561015d57600080fd5b8035906020019184602083028401116401000000008311171561017f57600080fd5b9091929391929390505050610627565b005b6101d3600480360360208110156101a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061084c565b6040518082815260200191505060405180910390f35b610215600480360360208110156101ff57600080fd5b8101908080359060200190929190505050610864565b005b61021f610a2d565b005b610229610a9b565b6040518082815260200191505060405180910390f35b610247610aa4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610291610acd565b6040518082815260200191505060405180910390f35b6102e9600480360360208110156102bd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ad3565b005b6102f3610d04565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103776004803603602081101561034b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d2a565b6040518082815260200191505060405180910390f35b610395610d73565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610419600480360360208110156103ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d99565b005b610423610fa6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60006105ef600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156105a657600080fd5b505afa1580156105ba573d6000803e3d6000fd5b505050506040513d60208110156105d057600080fd5b8101908080519060200190929190505050610fae90919063ffffffff16565b90506106236105fc610aa4565b828473ffffffffffffffffffffffffffffffffffffffff16610ff89092919063ffffffff16565b5050565b61062f610fa6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008090505b82829050811015610847576000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a0823185858581811061074d57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156107ca57600080fd5b505afa1580156107de573d6000803e3d6000fd5b505050506040513d60208110156107f457600080fd5b8101908080519060200190929190505050905061083984848481811061081657fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16826110b0565b5080806001019150506106f6565b505050565b60056020528060005260406000206000915090505481565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a082316108ac610fa6565b6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561090c57600080fd5b505afa158015610920573d6000803e3d6000fd5b505050506040513d602081101561093657600080fd5b81019080805190602001909291905050509050600081116109bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4e6f20746f6b656e20746f20737761700000000000000000000000000000000081525060200191505060405180910390fd5b80821115610a18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611c576026913960400191505060405180910390fd5b610a29610a23610fa6565b836110b0565b5050565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f5468657265206d75737420626520616e206f776e65720000000000000000000081525060200191505060405180910390fd5b6402540be40081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60045481565b610adb610fa6565b73ffffffffffffffffffffffffffffffffffffffff16610af9610aa4565b73ffffffffffffffffffffffffffffffffffffffff161480610b4d5750610b1e610fa6565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610ba2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526032815260200180611c046032913960400191505060405180910390fd5b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610c4357600080fd5b505afa158015610c57573d6000803e3d6000fd5b505050506040513d6020811015610c6d57600080fd5b8101908080519060200190929190505050905060008111610cf6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4e6f20746f6b656e20746f20737761700000000000000000000000000000000081525060200191505060405180910390fd5b610d0082826110b0565b5050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610da1610fa6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e62576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ee8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611bb66026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b6000610ff083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506114a5565b905092915050565b6110ab8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611565565b505050565b60008114156110be576114a1565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e84306040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561119357600080fd5b505afa1580156111a7573d6000803e3d6000fd5b505050506040513d60208110156111bd57600080fd5b8101908080519060200190929190505050905080821115611229576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611bdc6028913960400191505060405180910390fd5b61127b82600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461165490919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506112d38260045461165490919063ffffffff16565b600481905550611305600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836116dc565b5060006113206402540be4008461174390919063ffffffff16565b9050611371843085600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117c9909392919063ffffffff16565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1985836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561141a57600080fd5b505af115801561142e573d6000803e3d6000fd5b5050505061143a610fa6565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f38b371795382cd347d12e0f76af054b31ff98effd35fc318a57fc628a4a100e4856040518082815260200191505060405180910390a350505b5050565b6000838311158290611552576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156115175780820151818401526020810190506114fc565b50505050905090810190601f1680156115445780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60606115c7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166118b69092919063ffffffff16565b905060008151111561164f578080602001905160208110156115e857600080fd5b810190808051906020019092919050505061164e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611c7d602a913960400191505060405180910390fd5b5b505050565b6000808284019050838110156116d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006117398361173484600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461165490919063ffffffff16565b6118ce565b6001905092915050565b60008083141561175657600090506117c3565b600082840290508284828161176757fe5b04146117be576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611c366021913960400191505060405180910390fd5b809150505b92915050565b6118b0846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611565565b50505050565b60606118c58484600085611964565b90509392505050565b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff167fbc70e1e3e4d0d2f1b5306de8d1922f7a30c955f7e4696b03f7973b4ec16a45b3826040518082815260200191505060405180910390a25050565b606061196f85611b6a565b6119e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081525060200191505060405180910390fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310611a315780518252602082019150602081019050602083039250611a0e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611a93576040519150601f19603f3d011682016040523d82523d6000602084013e611a98565b606091505b50915091508115611aad578092505050611b62565b600081511115611ac05780518082602001fd5b836040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611b27578082015181840152602081019050611b0c565b50505050905090810190601f168015611b545780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b949350505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015611bac57506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735377617020616d6f756e7420697320626967676572207468616e2074686520616c6c6f77616e636545697468657220746865206f776e6572206f72206120746f6b656e686f6c6465722063616e2073776170416c6c546f6b656e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775377617020616d6f756e7420697320626967676572207468616e207468652062616c616e63655361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220b836ebaed0d29a2f1d85fb564c7f03af74a3c7fae4b067dc19fa86777576a74364736f6c634300060a00334f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573730000000000000000000000003cfdddf82eef46f6436c214e849942460eb13c08000000000000000000000000660e78e77b0a4eef978ef198c7229259f0eff8ac000000000000000000000000dc47f2ba852669b178699449e50682d6ceaf8c07
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80638da5cb5b1161008c578063b31c710a11610066578063b31c710a146102eb578063ba82dc5214610335578063c42bd05a1461038d578063f2fde38b146103d7576100cf565b80638da5cb5b1461023f57806397fd3613146102895780639fa37b7d146102a7576100cf565b806317ffc320146100d45780632bac8e4f1461011857806345645fb6146101915780634bbf3a7a146101e9578063715018a6146102175780637ffdf53e14610221575b600080fd5b610116600480360360208110156100ea57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061041b565b005b61018f6004803603602081101561012e57600080fd5b810190808035906020019064010000000081111561014b57600080fd5b82018360208201111561015d57600080fd5b8035906020019184602083028401116401000000008311171561017f57600080fd5b9091929391929390505050610627565b005b6101d3600480360360208110156101a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061084c565b6040518082815260200191505060405180910390f35b610215600480360360208110156101ff57600080fd5b8101908080359060200190929190505050610864565b005b61021f610a2d565b005b610229610a9b565b6040518082815260200191505060405180910390f35b610247610aa4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610291610acd565b6040518082815260200191505060405180910390f35b6102e9600480360360208110156102bd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ad3565b005b6102f3610d04565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103776004803603602081101561034b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d2a565b6040518082815260200191505060405180910390f35b610395610d73565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610419600480360360208110156103ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d99565b005b610423610fa6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60006105ef600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156105a657600080fd5b505afa1580156105ba573d6000803e3d6000fd5b505050506040513d60208110156105d057600080fd5b8101908080519060200190929190505050610fae90919063ffffffff16565b90506106236105fc610aa4565b828473ffffffffffffffffffffffffffffffffffffffff16610ff89092919063ffffffff16565b5050565b61062f610fa6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008090505b82829050811015610847576000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a0823185858581811061074d57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156107ca57600080fd5b505afa1580156107de573d6000803e3d6000fd5b505050506040513d60208110156107f457600080fd5b8101908080519060200190929190505050905061083984848481811061081657fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16826110b0565b5080806001019150506106f6565b505050565b60056020528060005260406000206000915090505481565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a082316108ac610fa6565b6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561090c57600080fd5b505afa158015610920573d6000803e3d6000fd5b505050506040513d602081101561093657600080fd5b81019080805190602001909291905050509050600081116109bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4e6f20746f6b656e20746f20737761700000000000000000000000000000000081525060200191505060405180910390fd5b80821115610a18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611c576026913960400191505060405180910390fd5b610a29610a23610fa6565b836110b0565b5050565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f5468657265206d75737420626520616e206f776e65720000000000000000000081525060200191505060405180910390fd5b6402540be40081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60045481565b610adb610fa6565b73ffffffffffffffffffffffffffffffffffffffff16610af9610aa4565b73ffffffffffffffffffffffffffffffffffffffff161480610b4d5750610b1e610fa6565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610ba2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526032815260200180611c046032913960400191505060405180910390fd5b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610c4357600080fd5b505afa158015610c57573d6000803e3d6000fd5b505050506040513d6020811015610c6d57600080fd5b8101908080519060200190929190505050905060008111610cf6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4e6f20746f6b656e20746f20737761700000000000000000000000000000000081525060200191505060405180910390fd5b610d0082826110b0565b5050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610da1610fa6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e62576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ee8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611bb66026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b6000610ff083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506114a5565b905092915050565b6110ab8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611565565b505050565b60008114156110be576114a1565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e84306040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561119357600080fd5b505afa1580156111a7573d6000803e3d6000fd5b505050506040513d60208110156111bd57600080fd5b8101908080519060200190929190505050905080821115611229576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611bdc6028913960400191505060405180910390fd5b61127b82600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461165490919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506112d38260045461165490919063ffffffff16565b600481905550611305600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836116dc565b5060006113206402540be4008461174390919063ffffffff16565b9050611371843085600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117c9909392919063ffffffff16565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1985836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561141a57600080fd5b505af115801561142e573d6000803e3d6000fd5b5050505061143a610fa6565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f38b371795382cd347d12e0f76af054b31ff98effd35fc318a57fc628a4a100e4856040518082815260200191505060405180910390a350505b5050565b6000838311158290611552576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156115175780820151818401526020810190506114fc565b50505050905090810190601f1680156115445780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60606115c7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166118b69092919063ffffffff16565b905060008151111561164f578080602001905160208110156115e857600080fd5b810190808051906020019092919050505061164e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611c7d602a913960400191505060405180910390fd5b5b505050565b6000808284019050838110156116d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006117398361173484600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461165490919063ffffffff16565b6118ce565b6001905092915050565b60008083141561175657600090506117c3565b600082840290508284828161176757fe5b04146117be576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611c366021913960400191505060405180910390fd5b809150505b92915050565b6118b0846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611565565b50505050565b60606118c58484600085611964565b90509392505050565b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff167fbc70e1e3e4d0d2f1b5306de8d1922f7a30c955f7e4696b03f7973b4ec16a45b3826040518082815260200191505060405180910390a25050565b606061196f85611b6a565b6119e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081525060200191505060405180910390fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310611a315780518252602082019150602081019050602083039250611a0e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611a93576040519150601f19603f3d011682016040523d82523d6000602084013e611a98565b606091505b50915091508115611aad578092505050611b62565b600081511115611ac05780518082602001fd5b836040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611b27578082015181840152602081019050611b0c565b50505050905090810190601f168015611b545780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b949350505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015611bac57506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735377617020616d6f756e7420697320626967676572207468616e2074686520616c6c6f77616e636545697468657220746865206f776e6572206f72206120746f6b656e686f6c6465722063616e2073776170416c6c546f6b656e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775377617020616d6f756e7420697320626967676572207468616e207468652062616c616e63655361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220b836ebaed0d29a2f1d85fb564c7f03af74a3c7fae4b067dc19fa86777576a74364736f6c634300060a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003cfdddf82eef46f6436c214e849942460eb13c08000000000000000000000000660e78e77b0a4eef978ef198c7229259f0eff8ac000000000000000000000000dc47f2ba852669b178699449e50682d6ceaf8c07
-----Decoded View---------------
Arg [0] : _newOwner (address): 0x3cFddDf82eeF46f6436C214E849942460EB13C08
Arg [1] : _oldToken (address): 0x660E78E77B0a4eeF978eF198C7229259f0Eff8ac
Arg [2] : _newToken (address): 0xdC47f2Ba852669B178699449E50682D6CEAF8C07
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000003cfdddf82eef46f6436c214e849942460eb13c08
Arg [1] : 000000000000000000000000660e78e77b0a4eef978ef198c7229259f0eff8ac
Arg [2] : 000000000000000000000000dc47f2ba852669b178699449e50682d6ceaf8c07
Deployed Bytecode Sourcemap
25472:4299:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23004:257;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;26956:273;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;25803:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;28192:279;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;29663:105;;;:::i;:::-;;25666:52;;;:::i;:::-;;;;;;;;;;;;;;;;;;;5423:79;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;25767:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;27550:335;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;25600:22;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;23442:147;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;25629:30;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;6368:244;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;23004:257;5645:12;:10;:12::i;:::-;5635:22;;:6;;;;;;;;;;;:22;;;5627:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23081:15:::1;23099:94;23147:16;:45;23172:18;23147:45;;;;;;;;;;;;;;;;23099:18;:28;;;23136:4;23099:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;:47;;:94;;;;:::i;:::-;23081:112;;23204:49;23236:7;:5;:7::i;:::-;23245;23204:18;:31;;;;:49;;;;;:::i;:::-;5705:1;23004:257:::0;:::o;26956:273::-;5645:12;:10;:12::i;:::-;5635:22;;:6;;;;;;;;;;;:22;;;5627:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27051:9:::1;27063:1:::0;27051:13:::1;;27046:176;27070:12;;:19;;27066:1;:23;27046:176;;;27111:15;27129:8;;;;;;;;;;;:18;;;27148:12;;27161:1;27148:15;;;;;;;;;;;;;;;27129:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;27111:53;;27179:31;27185:12;;27198:1;27185:15;;;;;;;;;;;;;;;27202:7;27179:5;:31::i;:::-;27046:176;27091:3;;;;;;;27046:176;;;;26956:273:::0;;:::o;25803:51::-;;;;;;;;;;;;;;;;;:::o;28192:279::-;28245:15;28263:8;;;;;;;;;;;:18;;;28282:12;:10;:12::i;:::-;28263:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28245:50;;28324:1;28314:7;:11;28306:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28375:7;28365:6;:17;;28357:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28436:27;28442:12;:10;:12::i;:::-;28456:6;28436:5;:27::i;:::-;28192:279;;:::o;29663:105::-;29728:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25666:52;25707:11;25666:52;:::o;5423:79::-;5461:7;5488:6;;;;;;;;;;;5481:13;;5423:79;:::o;25767:29::-;;;;:::o;27550:335::-;27630:12;:10;:12::i;:::-;27619:23;;:7;:5;:7::i;:::-;:23;;;:54;;;;27661:12;:10;:12::i;:::-;27646:27;;:11;:27;;;27619:54;27611:117;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27739:15;27757:8;;;;;;;;;;;:18;;;27776:11;27757:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27739:49;;27817:1;27807:7;:11;27799:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27850:27;27856:11;27869:7;27850:5;:27::i;:::-;27550:335;;:::o;25600:22::-;;;;;;;;;;;;;:::o;23442:147::-;23518:7;23545:16;:36;23562:18;23545:36;;;;;;;;;;;;;;;;23538:43;;23442:147;;;:::o;25629:30::-;;;;;;;;;;;;;:::o;6368:244::-;5645:12;:10;:12::i;:::-;5635:22;;:6;;;;;;;;;;;:22;;;5627:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6477:1:::1;6457:22;;:8;:22;;;;6449:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6567:8;6538:38;;6559:6;::::0;::::1;;;;;;;;;6538:38;;;;;;;;;;;;6596:8;6587:6;::::0;:17:::1;;;;;;;;;;;;;;;;;;6368:244:::0;:::o;3967:106::-;4020:15;4055:10;4048:17;;3967:106;:::o;8016:136::-;8074:7;8101:43;8105:1;8108;8101:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;8094:50;;8016:136;;;;:::o;18930:177::-;19013:86;19033:5;19063:23;;;19088:2;19092:5;19040:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19013:19;:86::i;:::-;18930:177;;;:::o;28726:832::-;28812:1;28802:6;:11;28798:50;;;28830:7;;28798:50;28860:17;28880:8;;;;;;;;;;;:18;;;28899:11;28920:4;28880:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28860:66;;28955:9;28945:6;:19;;28937:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29054:43;29090:6;29054:18;:31;29073:11;29054:31;;;;;;;;;;;;;;;;:35;;:43;;;;:::i;:::-;29020:18;:31;29039:11;29020:31;;;;;;;;;;;;;;;:77;;;;29125:26;29144:6;29125:14;;:18;;:26;;;;:::i;:::-;29108:14;:43;;;;29162:49;29193:8;;;;;;;;;;;29204:6;29162:22;:49::i;:::-;;29222:22;29247:26;25707:11;29247:6;:10;;:26;;;;:::i;:::-;29222:51;;29332:61;29358:11;29379:4;29386:6;29332:8;;;;;;;;;;;:25;;;;:61;;;;;;:::i;:::-;29445:8;;;;;;;;;;;:13;;;29459:11;29472:14;29445:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29529:12;:10;:12::i;:::-;29503:47;;29516:11;29503:47;;;29543:6;29503:47;;;;;;;;;;;;;;;;;;28726:832;;;;;:::o;8455:192::-;8541:7;8574:1;8569;:6;;8577:12;8561:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8601:9;8617:1;8613;:5;8601:17;;8638:1;8631:8;;;8455:192;;;;;:::o;21235:761::-;21659:23;21685:69;21713:4;21685:69;;;;;;;;;;;;;;;;;21693:5;21685:27;;;;:69;;;;;:::i;:::-;21659:95;;21789:1;21769:10;:17;:21;21765:224;;;21911:10;21900:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21892:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21765:224;21235:761;;;:::o;7552:181::-;7610:7;7630:9;7646:1;7642;:5;7630:17;;7671:1;7666;:6;;7658:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7724:1;7717:8;;;7552:181;;;;:::o;23939:245::-;24045:4;24062:92;24081:18;24101:52;24142:10;24101:16;:36;24118:18;24101:36;;;;;;;;;;;;;;;;:40;;:52;;;;:::i;:::-;24062:18;:92::i;:::-;24172:4;24165:11;;23939:245;;;;:::o;8906:471::-;8964:7;9214:1;9209;:6;9205:47;;;9239:1;9232:8;;;;9205:47;9264:9;9280:1;9276;:5;9264:17;;9309:1;9304;9300;:5;;;;;;:10;9292:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9368:1;9361:8;;;8906:471;;;;;:::o;19115:205::-;19216:96;19236:5;19266:27;;;19295:4;19301:2;19305:5;19243:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19216:19;:96::i;:::-;19115:205;;;;:::o;15901:196::-;16004:12;16036:53;16059:6;16067:4;16073:1;16076:12;16036:22;:53::i;:::-;16029:60;;15901:196;;;;;:::o;25057:216::-;25196:6;25157:16;:36;25174:18;25157:36;;;;;;;;;;;;;;;:45;;;;25238:18;25218:47;;;25258:6;25218:47;;;;;;;;;;;;;;;;;;25057:216;;:::o;17278:979::-;17408:12;17441:18;17452:6;17441:10;:18::i;:::-;17433:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17567:12;17581:23;17608:6;:11;;17628:8;17639:4;17608:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17566:78;;;;17659:7;17655:595;;;17690:10;17683:17;;;;;;17655:595;17824:1;17804:10;:17;:21;17800:439;;;18067:10;18061:17;18128:15;18115:10;18111:2;18107:19;18100:44;18015:148;18210:12;18203:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17278:979;;;;;;;:::o;12786:619::-;12846:4;13108:16;13135:19;13157:66;13135:88;;;;13326:7;13314:20;13302:32;;13366:11;13354:8;:23;;:42;;;;;13393:3;13381:15;;:8;:15;;13354:42;13346:51;;;;12786:619;;;:::o
Swarm Source
ipfs://b836ebaed0d29a2f1d85fb564c7f03af74a3c7fae4b067dc19fa86777576a743
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.