Token Monavale
Polygon Sponsored slots available. Book your slot here!
Overview ERC-20
Price
$0.00 @ 0.000000 MATIC
Fully Diluted Market Cap
Total Supply:
1,474.980766 MONA
Holders:
895 addresses
Contract:
Decimals:
18
[ Download CSV Export ]
[ Download CSV Export ]
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
MONA
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-06-13 */ // File: @openzeppelin\contracts\token\ERC20\IERC20.sol // SPDX-License-Identifier: MIT pragma solidity 0.6.12; /** * @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); } /** * @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, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @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) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @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) { 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, reverting 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) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting 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) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * 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); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * 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); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * 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; } } /** * @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.3.0, sets of type `bytes32` (`Bytes32Set`), `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]; } // Bytes32Set struct Bytes32Set { 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(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, 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(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set 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(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, 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(uint160(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(uint160(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(uint160(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(uint160(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)); } } /** * @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) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @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"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { 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); } } } } /* * @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; } } /** * @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()); } } } /** * @notice Access Controls contract for the Digitalax Platform * @author BlockRocket.tech */ contract DigitalaxAccessControls is AccessControl { /// @notice Role definitions bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant SMART_CONTRACT_ROLE = keccak256("SMART_CONTRACT_ROLE"); bytes32 public constant VERIFIED_MINTER_ROLE = keccak256("VERIFIED_MINTER_ROLE"); /// @notice Events for adding and removing various roles event AdminRoleGranted( address indexed beneficiary, address indexed caller ); event AdminRoleRemoved( address indexed beneficiary, address indexed caller ); event MinterRoleGranted( address indexed beneficiary, address indexed caller ); event MinterRoleRemoved( address indexed beneficiary, address indexed caller ); event SmartContractRoleGranted( address indexed beneficiary, address indexed caller ); event SmartContractRoleRemoved( address indexed beneficiary, address indexed caller ); event VerifiedMinterRoleGranted( address indexed beneficiary, address indexed caller ); event VerifiedMinterRoleRemoved( address indexed beneficiary, address indexed caller ); /** * @notice The deployer is automatically given the admin role which will allow them to then grant roles to other addresses */ constructor() public { _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); } ///////////// // Lookups // ///////////// /** * @notice Used to check whether an address has the admin role * @param _address EOA or contract being checked * @return bool True if the account has the role or false if it does not */ function hasAdminRole(address _address) external view returns (bool) { return hasRole(DEFAULT_ADMIN_ROLE, _address); } /** * @notice Used to check whether an address has the minter role * @param _address EOA or contract being checked * @return bool True if the account has the role or false if it does not */ function hasMinterRole(address _address) external view returns (bool) { return hasRole(MINTER_ROLE, _address); } /** * @notice Used to check whether an address has the verified minter role * @param _address EOA or contract being checked * @return bool True if the account has the role or false if it does not */ function hasVerifiedMinterRole(address _address) external view returns (bool) { return hasRole(VERIFIED_MINTER_ROLE, _address); } /** * @notice Used to check whether an address has the smart contract role * @param _address EOA or contract being checked * @return bool True if the account has the role or false if it does not */ function hasSmartContractRole(address _address) external view returns (bool) { return hasRole(SMART_CONTRACT_ROLE, _address); } /////////////// // Modifiers // /////////////// /** * @notice Grants the admin role to an address * @dev The sender must have the admin role * @param _address EOA or contract receiving the new role */ function addAdminRole(address _address) external { grantRole(DEFAULT_ADMIN_ROLE, _address); emit AdminRoleGranted(_address, _msgSender()); } /** * @notice Removes the admin role from an address * @dev The sender must have the admin role * @param _address EOA or contract affected */ function removeAdminRole(address _address) external { revokeRole(DEFAULT_ADMIN_ROLE, _address); emit AdminRoleRemoved(_address, _msgSender()); } /** * @notice Grants the minter role to an address * @dev The sender must have the admin role * @param _address EOA or contract receiving the new role */ function addMinterRole(address _address) external { grantRole(MINTER_ROLE, _address); emit MinterRoleGranted(_address, _msgSender()); } /** * @notice Removes the minter role from an address * @dev The sender must have the admin role * @param _address EOA or contract affected */ function removeMinterRole(address _address) external { revokeRole(MINTER_ROLE, _address); emit MinterRoleRemoved(_address, _msgSender()); } /** * @notice Grants the verified minter role to an address * @dev The sender must have the admin role * @param _address EOA or contract receiving the new role */ function addVerifiedMinterRole(address _address) external { grantRole(VERIFIED_MINTER_ROLE, _address); emit VerifiedMinterRoleGranted(_address, _msgSender()); } /** * @notice Removes the verified minter role from an address * @dev The sender must have the admin role * @param _address EOA or contract affected */ function removeVerifiedMinterRole(address _address) external { revokeRole(VERIFIED_MINTER_ROLE, _address); emit VerifiedMinterRoleRemoved(_address, _msgSender()); } /** * @notice Grants the smart contract role to an address * @dev The sender must have the admin role * @param _address EOA or contract receiving the new role */ function addSmartContractRole(address _address) external { grantRole(SMART_CONTRACT_ROLE, _address); emit SmartContractRoleGranted(_address, _msgSender()); } /** * @notice Removes the smart contract role from an address * @dev The sender must have the admin role * @param _address EOA or contract affected */ function removeSmartContractRole(address _address) external { revokeRole(SMART_CONTRACT_ROLE, _address); emit SmartContractRoleRemoved(_address, _msgSender()); } } /** * a contract must implement this interface in order to support relayed transaction. * It is better to inherit the BaseRelayRecipient as its implementation. */ abstract contract IRelayRecipient { /** * return if the forwarder is trusted to forward relayed transactions to us. * the forwarder is required to verify the sender's signature, and verify * the call is not a replay. */ function isTrustedForwarder(address forwarder) public virtual view returns(bool); /** * return the sender of this call. * if the call came through our trusted forwarder, then the real sender is appended as the last 20 bytes * of the msg.data. * otherwise, return `msg.sender` * should be used in the contract anywhere instead of msg.sender */ function msgSender() internal virtual view returns (address payable); function versionRecipient() external virtual view returns (string memory); } /** * A base contract to be inherited by any contract that want to receive relayed transactions * A subclass must use "_msgSender()" instead of "msg.sender" */ abstract contract BaseRelayRecipient is IRelayRecipient { /* * Forwarder singleton we accept calls from */ address public trustedForwarder; /* * require a function to be called through GSN only */ modifier trustedForwarderOnly() { require(msg.sender == address(trustedForwarder), "Function can only be called through the trusted Forwarder"); _; } function isTrustedForwarder(address forwarder) public override view returns(bool) { return forwarder == trustedForwarder; } /** * return the sender of this call. * if the call came through our trusted forwarder, return the original sender. * otherwise, return `msg.sender`. * should be used in the contract anywhere instead of msg.sender */ function msgSender() internal override view returns (address payable ret) { if (msg.data.length >= 24 && isTrustedForwarder(msg.sender)) { // At this point we know that the sender is a trusted forwarder, // so we trust that the last bytes of msg.data are the verified sender address. // extract sender address from the end of msg.data assembly { ret := shr(96,calldataload(sub(calldatasize(),20))) } } else { return msg.sender; } } } contract MONA is IERC20, BaseRelayRecipient{ using SafeMath for uint; string _symbol; string _name; uint8 _decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; uint public cap; bool public freezeCap; DigitalaxAccessControls public accessControls; event CapUpdated(uint256 cap, bool freezeCap); event Deposit( address indexed token, address indexed from, uint256 amount, uint256 output1 ); event Withdraw( address indexed token, address indexed from, uint256 amount, uint256 output1 ); address public childChain; modifier onlyChildChain() { require( msg.sender == childChain, "Child token: caller is not the child chain contract" ); _; } constructor( string memory symbol_, string memory name_, uint8 decimals_, DigitalaxAccessControls accessControls_, address tokenOwner, uint256 initialSupply, address childChain_, address trustedForwarder_ ) public { _symbol = symbol_; _name = name_; _decimals = decimals_; accessControls = accessControls_; balances[tokenOwner] = initialSupply; _totalSupply = initialSupply; childChain = childChain_; trustedForwarder = trustedForwarder_; emit Transfer(address(0), tokenOwner, _totalSupply); } /** * Override this function. * This version is to keep track of BaseRelayRecipient you are using * in your contract. */ function versionRecipient() external view override returns (string memory) { return "1"; } function symbol() external view returns (string memory) { return _symbol; } function name() external view returns (string memory) { return _name; } function decimals() external view returns (uint8) { return _decimals; } function totalSupply() override external view returns (uint) { return _totalSupply.sub(balances[address(0)]); } function balanceOf(address tokenOwner) override public view returns (uint balance) { return balances[tokenOwner]; } function transfer(address to, uint tokens) override external returns (bool success) { balances[_msgSender()] = balances[_msgSender()].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(_msgSender(), to, tokens); return true; } function approve(address spender, uint tokens) override external returns (bool success) { allowed[_msgSender()][spender] = tokens; emit Approval(_msgSender(), spender, tokens); return true; } function transferFrom(address from, address to, uint tokens) override external returns (bool success) { balances[from] = balances[from].sub(tokens); allowed[from][_msgSender()] = allowed[from][_msgSender()].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(from, to, tokens); return true; } function allowance(address tokenOwner, address spender) override external view returns (uint remaining) { return allowed[tokenOwner][spender]; } function setTrustedForwarder(address _trustedForwarder) external { require( accessControls.hasAdminRole(_msgSender()), "MONA.setTrustedForwarder: Sender must be admin" ); trustedForwarder = _trustedForwarder; } // This is to support Native meta transactions // never use msg.sender directly, use _msgSender() instead function _msgSender() internal view returns (address payable sender) { return BaseRelayRecipient.msgSender(); } function setCap(uint _cap, bool _freezeCap) external { require( accessControls.hasAdminRole(_msgSender()), "MONA.setCap: Sender must be admin" ); require(_freezeCap || _cap >= _totalSupply, "Cap less than totalSupply"); require(!freezeCap, "Cap frozen"); (cap, freezeCap) = (_cap, _freezeCap); emit CapUpdated(cap, freezeCap); } function _mint(address tokenOwner, uint tokens) internal virtual returns (bool success) { require(tokenOwner != address(0), "ERC20: mint to the zero address"); require(cap == 0 || _totalSupply + tokens <= cap, "Cap exceeded"); balances[tokenOwner] = balances[tokenOwner].add(tokens); _totalSupply = _totalSupply.add(tokens); emit Transfer(address(0), tokenOwner, tokens); return true; } function burn(uint tokens) public returns (bool success) { balances[_msgSender()] = balances[_msgSender()].sub(tokens); _totalSupply = _totalSupply.sub(tokens); emit Transfer(_msgSender(), address(0), tokens); return true; } /** * Deposit tokens * * ChildChainManagerProxy - * Mumbai - 0xb5505a6d998549090530911180f38aC5130101c6 * MainNet - 0xA6FA4fB5f76172d178d61B04b0ecd319C5d1C0aa * @notice called when token is deposited on root chain * @dev Should be callable only by ChildChainManager * Should handle deposit by minting the required amount for user * Make sure minting is done only by this function * @param user user address for whom deposit is being done * @param depositData abi encoded amount */ function deposit(address user, bytes calldata depositData) external onlyChildChain { uint256 amount = abi.decode(depositData, (uint256)); _mint(user, amount); emit Deposit(address(this), user, amount, balanceOf(user)); } /** * Withdraw tokens * * @param amount tokens */ function withdraw(uint256 amount) public payable { burn(amount); emit Withdraw(address(this), _msgSender(), amount, balanceOf(_msgSender())); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"contract DigitalaxAccessControls","name":"accessControls_","type":"address"},{"internalType":"address","name":"tokenOwner","type":"address"},{"internalType":"uint256","name":"initialSupply","type":"uint256"},{"internalType":"address","name":"childChain_","type":"address"},{"internalType":"address","name":"trustedForwarder_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cap","type":"uint256"},{"indexed":false,"internalType":"bool","name":"freezeCap","type":"bool"}],"name":"CapUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"output1","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"output1","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"accessControls","outputs":[{"internalType":"contract DigitalaxAccessControls","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenOwner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"remaining","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenOwner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"childChain","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes","name":"depositData","type":"bytes"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freezeCap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cap","type":"uint256"},{"internalType":"bool","name":"_freezeCap","type":"bool"}],"name":"setCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_trustedForwarder","type":"address"}],"name":"setTrustedForwarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620014663803806200146683398181016040526101008110156200003857600080fd5b81019080805160405193929190846401000000008211156200005957600080fd5b9083019060208201858111156200006f57600080fd5b82516401000000008111828201881017156200008a57600080fd5b82525081516020918201929091019080838360005b83811015620000b95781810151838201526020016200009f565b50505050905090810190601f168015620000e75780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010b57600080fd5b9083019060208201858111156200012157600080fd5b82516401000000008111828201881017156200013c57600080fd5b82525081516020918201929091019080838360005b838110156200016b57818101518382015260200162000151565b50505050905090810190601f168015620001995780820380516001836020036101000a031916815260200191505b506040908152602082810151918301516060840151608085015160a086015160c0909601518a51959850929650909490939092620001dd916001918b0190620002ad565b508651620001f39060029060208a0190620002ad565b506003805460ff191660ff881617905560088054610100600160a81b0319166101006001600160a01b03888116919091029190911790915584811660008181526005602090815260408083208890556004889055600980546001600160a01b03199081168988161790915583541694861694909417825583518781529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3505050505050505062000349565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620002f057805160ff191683800117855562000320565b8280016001018555821562000320579182015b828111156200032057825182559160200191906001019062000303565b506200032e92915062000332565b5090565b5b808211156200032e576000815560010162000333565b61110d80620003596000396000f3fe60806040526004361061012a5760003560e01c8063486ff0cd116100ab5780637da0a8771161006f5780637da0a8771461040157806395d89b4114610416578063a9059cbb1461042b578063cf2c52cb14610464578063da742228146104f1578063dd62ed3e146105245761012a565b8063486ff0cd1461035c57806351955a0e14610371578063572b6c051461038657806370a08231146103b9578063748365ef146103ec5761012a565b80632e1a7d4d116100f25780632e1a7d4d146102a4578063313ce567146102c1578063355274ea146102ec57806342966c681461030157806342fc47fb1461032b5761012a565b806306fdde031461012f578063095ea7b3146101b9578063156d3a461461020657806318160ddd1461023a57806323b872dd14610261575b600080fd5b34801561013b57600080fd5b5061014461055f565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017e578181015183820152602001610166565b50505050905090810190601f1680156101ab5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101c557600080fd5b506101f2600480360360408110156101dc57600080fd5b506001600160a01b0381351690602001356105f3565b604080519115158252519081900360200190f35b34801561021257600080fd5b506102386004803603604081101561022957600080fd5b50803590602001351515610683565b005b34801561024657600080fd5b5061024f610841565b60408051918252519081900360200190f35b34801561026d57600080fd5b506101f26004803603606081101561028457600080fd5b506001600160a01b0381358116916020810135909116906040013561087e565b610238600480360360208110156102ba57600080fd5b50356109a0565b3480156102cd57600080fd5b506102d6610a09565b6040805160ff9092168252519081900360200190f35b3480156102f857600080fd5b5061024f610a12565b34801561030d57600080fd5b506101f26004803603602081101561032457600080fd5b5035610a18565b34801561033757600080fd5b50610340610aa0565b604080516001600160a01b039092168252519081900360200190f35b34801561036857600080fd5b50610144610aaf565b34801561037d57600080fd5b506101f2610aca565b34801561039257600080fd5b506101f2600480360360208110156103a957600080fd5b50356001600160a01b0316610ad3565b3480156103c557600080fd5b5061024f600480360360208110156103dc57600080fd5b50356001600160a01b0316610ae7565b3480156103f857600080fd5b50610340610b02565b34801561040d57600080fd5b50610340610b16565b34801561042257600080fd5b50610144610b25565b34801561043757600080fd5b506101f26004803603604081101561044e57600080fd5b506001600160a01b038135169060200135610b85565b34801561047057600080fd5b506102386004803603604081101561048757600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156104b257600080fd5b8201836020820111156104c457600080fd5b803590602001918460018302840111640100000000831117156104e657600080fd5b509092509050610c38565b3480156104fd57600080fd5b506102386004803603602081101561051457600080fd5b50356001600160a01b0316610cf6565b34801561053057600080fd5b5061024f6004803603604081101561054757600080fd5b506001600160a01b0381358116916020013516610dda565b60028054604080516020601f60001961010060018716150201909416859004938401819004810282018101909252828152606093909290918301828280156105e85780601f106105bd576101008083540402835291602001916105e8565b820191906000526020600020905b8154815290600101906020018083116105cb57829003601f168201915b505050505090505b90565b60008160066000610602610e05565b6001600160a01b039081168252602080830193909352604091820160009081209188168082529190935291209190915561063a610e05565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a350600192915050565b60085461010090046001600160a01b031663c395fcb36106a1610e05565b6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156106de57600080fd5b505afa1580156106f2573d6000803e3d6000fd5b505050506040513d602081101561070857600080fd5b50516107455760405162461bcd60e51b81526004018080602001828103825260218152602001806110b76021913960400191505060405180910390fd5b808061075357506004548210155b6107a4576040805162461bcd60e51b815260206004820152601960248201527f436170206c657373207468616e20746f74616c537570706c7900000000000000604482015290519081900360640190fd5b60085460ff16156107e9576040805162461bcd60e51b815260206004820152600a60248201526921b0b810333937bd32b760b11b604482015290519081900360640190fd5b6008805460ff1916821515179081905560078390556040805184815260ff9092161515602083015280517f5ccbef86c2b45d438491635b517911230f8ef84521dd19d85290980f9d0e6d859281900390910190a15050565b600080805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc5460045461087991610e0f565b905090565b6001600160a01b0383166000908152600560205260408120546108a19083610e0f565b6001600160a01b038516600090815260056020908152604080832093909355600690529081206108f6918491906108d6610e05565b6001600160a01b0316815260208101919091526040016000205490610e0f565b6001600160a01b038516600090815260066020526040812090610917610e05565b6001600160a01b03908116825260208083019390935260409182016000908120949094558616835260059091529020546109519083610e6c565b6001600160a01b03808516600081815260056020908152604091829020949094558051868152905191939288169260008051602061106483398151915292918290030190a35060019392505050565b6109a981610a18565b506109b2610e05565b6001600160a01b0316307ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb567836109ee6109e9610e05565b610ae7565b6040805192835260208301919091528051918290030190a350565b60035460ff1690565b60075481565b6000610a2a82600560006108d6610e05565b60056000610a36610e05565b6001600160a01b03168152602081019190915260400160002055600454610a5d9083610e0f565b6004556000610a6a610e05565b6001600160a01b0316600080516020611064833981519152846040518082815260200191505060405180910390a3506001919050565b6009546001600160a01b031681565b6040805180820190915260018152603160f81b602082015290565b60085460ff1681565b6000546001600160a01b0390811691161490565b6001600160a01b031660009081526005602052604090205490565b60085461010090046001600160a01b031681565b6000546001600160a01b031681565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156105e85780601f106105bd576101008083540402835291602001916105e8565b6000610b9782600560006108d6610e05565b60056000610ba3610e05565b6001600160a01b0390811682526020808301939093526040918201600090812094909455861683526005909152902054610bdd9083610e6c565b6001600160a01b038416600081815260056020526040902091909155610c01610e05565b6001600160a01b0316600080516020611064833981519152846040518082815260200191505060405180910390a350600192915050565b6009546001600160a01b03163314610c815760405162461bcd60e51b81526004018080602001828103825260338152602001806110846033913960400191505060405180910390fd5b600082826020811015610c9357600080fd5b50359050610ca18482610ecd565b506001600160a01b038416307fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d783610cd888610ae7565b6040805192835260208301919091528051918290030190a350505050565b60085461010090046001600160a01b031663c395fcb3610d14610e05565b6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610d5157600080fd5b505afa158015610d65573d6000803e3d6000fd5b505050506040513d6020811015610d7b57600080fd5b5051610db85760405162461bcd60e51b815260040180806020018281038252602e815260200180611036602e913960400191505060405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b6000610879611003565b600082821115610e66576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015610ec6576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60006001600160a01b038316610f2a576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6007541580610f3f5750600754826004540111155b610f7f576040805162461bcd60e51b815260206004820152600c60248201526b10d85c08195e18d95959195960a21b604482015290519081900360640190fd5b6001600160a01b038316600090815260056020526040902054610fa29083610e6c565b6001600160a01b038416600090815260056020526040902055600454610fc89083610e6c565b6004556040805183815290516001600160a01b038516916000916000805160206110648339815191529181900360200190a350600192915050565b60006018361080159061101a575061101a33610ad3565b1561102e575060131936013560601c6105f0565b50336105f056fe4d4f4e412e73657454727573746564466f727761726465723a2053656e646572206d7573742062652061646d696eddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef4368696c6420746f6b656e3a2063616c6c6572206973206e6f7420746865206368696c6420636861696e20636f6e74726163744d4f4e412e7365744361703a2053656e646572206d7573742062652061646d696ea2646970667358221220a4452cd0542eff19ed6230aaa57d7e8485a7ef8d4639d08d2484b410d5054b8664736f6c634300060c0033000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000012000000000000000000000000be5c84e6b036cb41a7a6b5008b9427a5f4f1c9f500000000000000000000000010c0b0da2a682c12bd36516a95cb8474c02d83de0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a6fa4fb5f76172d178d61b04b0ecd319c5d1c0aa0000000000000000000000009399bb24dbb5c4b782c70c2969f58716ebbd6a3b00000000000000000000000000000000000000000000000000000000000000044d4f4e410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084d6f6e6176616c65000000000000000000000000000000000000000000000000
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000012000000000000000000000000be5c84e6b036cb41a7a6b5008b9427a5f4f1c9f500000000000000000000000010c0b0da2a682c12bd36516a95cb8474c02d83de0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a6fa4fb5f76172d178d61b04b0ecd319c5d1c0aa0000000000000000000000009399bb24dbb5c4b782c70c2969f58716ebbd6a3b00000000000000000000000000000000000000000000000000000000000000044d4f4e410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084d6f6e6176616c65000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : symbol_ (string): MONA
Arg [1] : name_ (string): Monavale
Arg [2] : decimals_ (uint8): 18
Arg [3] : accessControls_ (address): 0xbe5c84e6b036cb41a7a6b5008b9427a5f4f1c9f5
Arg [4] : tokenOwner (address): 0x10c0b0da2a682c12bd36516a95cb8474c02d83de
Arg [5] : initialSupply (uint256): 0
Arg [6] : childChain_ (address): 0xa6fa4fb5f76172d178d61b04b0ecd319c5d1c0aa
Arg [7] : trustedForwarder_ (address): 0x9399bb24dbb5c4b782c70c2969f58716ebbd6a3b
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [3] : 000000000000000000000000be5c84e6b036cb41a7a6b5008b9427a5f4f1c9f5
Arg [4] : 00000000000000000000000010c0b0da2a682c12bd36516a95cb8474c02d83de
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [6] : 000000000000000000000000a6fa4fb5f76172d178d61b04b0ecd319c5d1c0aa
Arg [7] : 0000000000000000000000009399bb24dbb5c4b782c70c2969f58716ebbd6a3b
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [9] : 4d4f4e4100000000000000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [11] : 4d6f6e6176616c65000000000000000000000000000000000000000000000000
Deployed ByteCode Sourcemap
44835:6208:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;46808:85;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47546:223;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;47546:223:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;48851:414;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;48851:414:0;;;;;;;;;:::i;:::-;;46990:125;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;47775:358;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;47775:358:0;;;;;;;;;;;;;;;;;:::i;50873:167::-;;;;;;;;;;;;;;;;-1:-1:-1;50873:167:0;;:::i;46899:85::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;45105:15;;;;;;;;;;;;;:::i;49728:265::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;49728:265:0;;:::i;45552:25::-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;45552:25:0;;;;;;;;;;;;;;46601:104;;;;;;;;;;;;;:::i;45127:21::-;;;;;;;;;;;;;:::i;43871:137::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;43871:137:0;-1:-1:-1;;;;;43871:137:0;;:::i;47121:129::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;47121:129:0;-1:-1:-1;;;;;47121:129:0;;:::i;45157:45::-;;;;;;;;;;;;;:::i;43577:31::-;;;;;;;;;;;;;:::i;46713:89::-;;;;;;;;;;;;;:::i;47256:284::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;47256:284:0;;;;;;;;:::i;50543:252::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;50543:252:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;50543:252:0;;-1:-1:-1;50543:252:0;-1:-1:-1;50543:252:0;:::i;48305:269::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;48305:269:0;-1:-1:-1;;;;;48305:269:0;;:::i;48139:158::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;48139:158:0;;;;;;;;;;:::i;46808:85::-;46880:5;46873:12;;;;;;;-1:-1:-1;;46873:12:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;46847:13;;46873:12;;46880:5;;46873:12;;46880:5;46873:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;46808:85;;:::o;47546:223::-;47620:12;47678:6;47645:7;:21;47653:12;:10;:12::i;:::-;-1:-1:-1;;;;;47645:21:0;;;;;;;;;;;;;;;;;-1:-1:-1;47645:21:0;;;:30;;;;;;;;;;;;:39;;;;47709:12;:10;:12::i;:::-;-1:-1:-1;;;;;47700:39:0;;47732:6;47700:39;;;;;;;;;;;;;;;;;;-1:-1:-1;47757:4:0;47546:223;;;;:::o;48851:414::-;48938:14;;;;;-1:-1:-1;;;;;48938:14:0;:27;48966:12;:10;:12::i;:::-;48938:41;;;;;;;;;;;;;-1:-1:-1;;;;;48938:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;48938:41:0;48916:124;;;;-1:-1:-1;;;48916:124:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49059:10;:34;;;;49081:12;;49073:4;:20;;49059:34;49051:72;;;;;-1:-1:-1;;;49051:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;49143:9;;;;49142:10;49134:33;;;;;-1:-1:-1;;;49134:33:0;;;;;;;;;;;;-1:-1:-1;;;49134:33:0;;;;;;;;;;;;;;;49184:9;49178:37;;-1:-1:-1;;49178:37:0;;;;;;;;;49179:3;49178:37;;;49231:26;;;;;;49178:37;49247:9;;;49231:26;;;;;;;;;;;;;;;;;;48851:414;;:::o;46990:125::-;47045:4;47086:20;;;:8;:20;;;;47069:12;;:38;;:16;:38::i;:::-;47062:45;;46990:125;:::o;47775:358::-;-1:-1:-1;;;;;47905:14:0;;47863:12;47905:14;;;:8;:14;;;;;;:26;;47924:6;47905:18;:26::i;:::-;-1:-1:-1;;;;;47888:14:0;;;;;;:8;:14;;;;;;;;:43;;;;47972:7;:13;;;;;:39;;48004:6;;47972:13;47986:12;:10;:12::i;:::-;-1:-1:-1;;;;;47972:27:0;;;;;;;;;;;;-1:-1:-1;47972:27:0;;;:31;:39::i;:::-;-1:-1:-1;;;;;47942:13:0;;;;;;:7;:13;;;;;;47956:12;:10;:12::i;:::-;-1:-1:-1;;;;;47942:27:0;;;;;;;;;;;;;;;;;-1:-1:-1;47942:27:0;;;:69;;;;48037:12;;;;:8;:12;;;;;;:24;;48054:6;48037:16;:24::i;:::-;-1:-1:-1;;;;;48022:12:0;;;;;;;:8;:12;;;;;;;;;:39;;;;48077:26;;;;;;;48022:12;;48077:26;;;;-1:-1:-1;;;;;;;;;;;48077:26:0;;;;;;;;-1:-1:-1;48121:4:0;47775:358;;;;;:::o;50873:167::-;50934:12;50939:6;50934:4;:12::i;:::-;;50986;:10;:12::i;:::-;-1:-1:-1;;;;;50962:70:0;50979:4;50962:70;51000:6;51008:23;51018:12;:10;:12::i;:::-;51008:9;:23::i;:::-;50962:70;;;;;;;;;;;;;;;;;;;;;;50873:167;:::o;46899:85::-;46967:9;;;;46899:85;:::o;45105:15::-;;;;:::o;49728:265::-;49771:12;49821:34;49848:6;49821:8;:22;49830:12;:10;:12::i;49821:34::-;49796:8;:22;49805:12;:10;:12::i;:::-;-1:-1:-1;;;;;49796:22:0;;;;;;;;;;;;-1:-1:-1;49796:22:0;:59;49881:12;;:24;;49898:6;49881:16;:24::i;:::-;49866:12;:39;49952:1;49930:12;:10;:12::i;:::-;-1:-1:-1;;;;;49921:42:0;-1:-1:-1;;;;;;;;;;;49956:6:0;49921:42;;;;;;;;;;;;;;;;;;-1:-1:-1;49981:4:0;49728:265;;;:::o;45552:25::-;;;-1:-1:-1;;;;;45552:25:0;;:::o;46601:104::-;46687:10;;;;;;;;;;;;-1:-1:-1;;;46687:10:0;;;;46601:104;:::o;45127:21::-;;;;;;:::o;43871:137::-;43947:4;43984:16;-1:-1:-1;;;;;43984:16:0;;;43971:29;;;;43871:137::o;47121:129::-;-1:-1:-1;;;;;47222:20:0;47190:12;47222:20;;;:8;:20;;;;;;;47121:129::o;45157:45::-;;;;;;-1:-1:-1;;;;;45157:45:0;;:::o;43577:31::-;;;-1:-1:-1;;;;;43577:31:0;;:::o;46713:89::-;46787:7;46780:14;;;;;;;;-1:-1:-1;;46780:14:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;46754:13;;46780:14;;46787:7;;46780:14;;46787:7;46780:14;;;;;;;;;;;;;;;;;;;;;;;;47256:284;47326:12;47376:34;47403:6;47376:8;:22;47385:12;:10;:12::i;47376:34::-;47351:8;:22;47360:12;:10;:12::i;:::-;-1:-1:-1;;;;;47351:22:0;;;;;;;;;;;;;;;;;-1:-1:-1;47351:22:0;;;:59;;;;47436:12;;;;:8;:12;;;;;;:24;;47453:6;47436:16;:24::i;:::-;-1:-1:-1;;;;;47421:12:0;;;;;;:8;:12;;;;;:39;;;;47485:12;:10;:12::i;:::-;-1:-1:-1;;;;;47476:34:0;-1:-1:-1;;;;;;;;;;;47503:6:0;47476:34;;;;;;;;;;;;;;;;;;-1:-1:-1;47528:4:0;47256:284;;;;:::o;50543:252::-;45659:10;;-1:-1:-1;;;;;45659:10:0;45645;:24;45623:125;;;;-1:-1:-1;;;45623:125:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50637:14:::1;50665:11;;50654:34;;;;;;;::::0;::::1;;-1:-1:-1::0;50654:34:0::1;::::0;-1:-1:-1;50699:19:0::1;50705:4:::0;50654:34;50699:5:::1;:19::i;:::-;-1:-1:-1::0;;;;;;50734:53:0;::::1;50750:4;50734:53;50763:6:::0;50771:15:::1;50757:4:::0;50771:9:::1;:15::i;:::-;50734:53;::::0;;;;;::::1;::::0;::::1;::::0;;;;;;;;;;;;::::1;45759:1;50543:252:::0;;;:::o;48305:269::-;48404:14;;;;;-1:-1:-1;;;;;48404:14:0;:27;48432:12;:10;:12::i;:::-;48404:41;;;;;;;;;;;;;-1:-1:-1;;;;;48404:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;48404:41:0;48382:137;;;;-1:-1:-1;;;48382:137:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;48530:16;:36;;-1:-1:-1;;;;;;48530:36:0;-1:-1:-1;;;;;48530:36:0;;;;;;;;;;48305:269::o;48139:158::-;-1:-1:-1;;;;;48261:19:0;;;48227:14;48261:19;;;:7;:19;;;;;;;;:28;;;;;;;;;;;;;48139:158::o;48698:145::-;48758:22;48805:30;:28;:30::i;6002:158::-;6060:7;6093:1;6088;:6;;6080:49;;;;;-1:-1:-1;;;6080:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6147:5:0;;;6002:158::o;5540:179::-;5598:7;5630:5;;;5654:6;;;;5646:46;;;;;-1:-1:-1;;;5646:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;5710:1;5540:179;-1:-1:-1;;;5540:179:0:o;49275:445::-;49349:12;-1:-1:-1;;;;;49382:24:0;;49374:68;;;;;-1:-1:-1;;;49374:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;49461:3;;:8;;:40;;;49498:3;;49488:6;49473:12;;:21;:28;;49461:40;49453:65;;;;;-1:-1:-1;;;49453:65:0;;;;;;;;;;;;-1:-1:-1;;;49453:65:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;49552:20:0;;;;;;:8;:20;;;;;;:32;;49577:6;49552:24;:32::i;:::-;-1:-1:-1;;;;;49529:20:0;;;;;;:8;:20;;;;;:55;49610:12;;:24;;49627:6;49610:16;:24::i;:::-;49595:12;:39;49650:40;;;;;;;;-1:-1:-1;;;;;49650:40:0;;;49667:1;;-1:-1:-1;;;;;;;;;;;49650:40:0;;;;;;;;-1:-1:-1;49708:4:0;49275:445;;;;:::o;44268:558::-;44321:19;44376:2;44357:8;:21;;;;:55;;;44382:30;44401:10;44382:18;:30::i;:::-;44353:466;;;-1:-1:-1;;;44723:14:0;44719:22;44706:36;44703:2;44699:44;44673:85;;;-1:-1:-1;44797:10:0;44790:17;
Swarm Source
ipfs://a4452cd0542eff19ed6230aaa57d7e8485a7ef8d4639d08d2484b410d5054b86