Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0xc65A680ed408Ff0987a4f751F1999c96dB597482
Balance 0 ETH
Nonce 1
Code Size 3693 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

3693 bytes
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806332cb6b0c1161009757806395d89b411161006657806395d89b41146101f0578063a457c2d7146101f8578063a9059cbb1461020b578063dd62ed3e1461021e576100f5565b806332cb6b0c146101b857806339509351146101c057806361a7af06146101d357806370a08231146101dd576100f5565b80631249c58b116100d35780631249c58b1461017a57806318160ddd1461018457806323b872dd14610196578063313ce567146101a9576100f5565b806306fdde03146100fa578063095ea7b3146101185780630c092acf1461013b575b600080fd5b610102610257565b60405161010f9190610c10565b60405180910390f35b61012b610126366004610be7565b6102e9565b604051901515815260200161010f565b6101627f00000000000000000000000041d2b13083f3b6d1ba871eb3a61f0fe6a4d198b481565b6040516001600160a01b03909116815260200161010f565b610182610301565b005b6002545b60405190815260200161010f565b61012b6101a4366004610bac565b61053f565b6040516007815260200161010f565b610188610565565b61012b6101ce366004610be7565b610583565b6101886101055481565b6101886101eb366004610b60565b6105c2565b6101026105e1565b61012b610206366004610be7565b6105f0565b61012b610219366004610be7565b6106a5565b61018861022c366004610b7a565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461026690610de6565b80601f016020809104026020016040519081016040528092919081815260200182805461029290610de6565b80156102df5780601f106102b4576101008083540402835291602001916102df565b820191906000526020600020905b8154815290600101906020018083116102c257829003601f168201915b5050505050905090565b6000336102f78185856106b3565b5060019392505050565b61010554608081106103805760405162461bcd60e51b815260206004820152602360248201527f424f5341474f52413a204d696e74696e67207363686564756c652066696e697360448201527f686564000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000600582608081106103a357634e487b7160e01b600052603260045260246000fd5b015490508042101561041d5760405162461bcd60e51b815260206004820152602960248201527f424f5341474f52413a204d696e74696e6720706572696f64206e6f742079657460448201527f2066696e697368656400000000000000000000000000000000000000000000006064820152608401610377565b60006085836080811061044057634e487b7160e01b600052603260045260246000fd5b01549050600061044f60025490565b905081811061047157610463846001610c81565b610105555061053d92505050565b600061047d8284610dcf565b9050801561052757610490856001610c81565b610105556104be7f00000000000000000000000041d2b13083f3b6d1ba871eb3a61f0fe6a4d198b48261080b565b60408051828152602081018790526001600160a01b037f00000000000000000000000041d2b13083f3b6d1ba871eb3a61f0fe6a4d198b416917f0d4d60ce368884fbc1757aad17dc63698232eec08c892c58ea47e976777495f2910160405180910390a2610537565b610532856001610c81565b610105555b50505050505b565b60003361054d8582856108ca565b61055885858561095c565b60019150505b9392505050565b6105716007600a610cdf565b610580906401270b0180610db0565b81565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091906102f790829086906105bd908790610c81565b6106b3565b6001600160a01b0381166000908152602081905260409020545b919050565b60606004805461026690610de6565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091908381101561068d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610377565b61069a82868684036106b3565b506001949350505050565b6000336102f781858561095c565b6001600160a01b03831661072e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610377565b6001600160a01b0382166107aa5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610377565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0382166108615760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610377565b80600260008282546108739190610c81565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461095657818110156109495760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610377565b61095684848484036106b3565b50505050565b6001600160a01b0383166109d85760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610377565b6001600160a01b038216610a545760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610377565b6001600160a01b03831660009081526020819052604090205481811015610ae35760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610377565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610956565b80356001600160a01b03811681146105dc57600080fd5b600060208284031215610b71578081fd5b61055e82610b49565b60008060408385031215610b8c578081fd5b610b9583610b49565b9150610ba360208401610b49565b90509250929050565b600080600060608486031215610bc0578081fd5b610bc984610b49565b9250610bd760208501610b49565b9150604084013590509250925092565b60008060408385031215610bf9578182fd5b610c0283610b49565b946020939093013593505050565b6000602080835283518082850152825b81811015610c3c57858101830151858201604001528201610c20565b81811115610c4d5783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b60008219821115610c9457610c94610e21565b500190565b80825b6001808611610cab5750610cd6565b818704821115610cbd57610cbd610e21565b80861615610cca57918102915b9490941c938002610c9c565b94509492505050565b600061055e60001960ff851684600082610cfb5750600161055e565b81610d085750600061055e565b8160018114610d1e5760028114610d2857610d55565b600191505061055e565b60ff841115610d3957610d39610e21565b6001841b915084821115610d4f57610d4f610e21565b5061055e565b5060208310610133831016604e8410600b8410161715610d88575081810a83811115610d8357610d83610e21565b61055e565b610d958484846001610c99565b808604821115610da757610da7610e21565b02949350505050565b6000816000190483118215151615610dca57610dca610e21565b500290565b600082821015610de157610de1610e21565b500390565b600281046001821680610dfa57607f821691505b60208210811415610e1b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220d22cf2acc9d5ff35f64dcfb10498a3625d72ad4e6af27db55407a75b869d4c1b64736f6c63430008020033

Verified Source Code Full Match

Compiler: v0.8.2+commit.661d1103 EVM: istanbul Optimization: Yes (2000 runs)
ERC20.sol 365 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @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.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead 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, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override 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 default value returned by this function, unless
     * it's overridden.
     *
     * 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 virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, 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}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, 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}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        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) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + 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) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This 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:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(address from, address to, uint256 amount) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _balances[to] += amount;
        }

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, 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:
     *
     * - `account` 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 += amount;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _balances[account] += amount;
        }
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(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);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _totalSupply -= amount;
        }

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This 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 Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @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 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 {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}
IERC20Metadata.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}
IERC20.sol 78 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool);
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)

pragma solidity ^0.8.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 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) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}
BOSAGORA.sol 371 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.2;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

/**
 * @title BOSAGORA Token
 * @dev Implementation of the BOSAGORA token with scheduled minting based on yearly timestamps.
 *
 * This contract implements the BOSAGORA token with the following features:
 * - Fixed maximum supply of 4.95 billion BOA tokens
 * - 7 decimal places
 * - Scheduled minting over 128 years based on predefined deadlines and cumulative limits.
 * - Minting up to the yearly limit targets a specific asset account.
 * - Permissionless minting trigger (anyone can call mint after conditions are met).
 * - No ownership or administrative functions after deployment.
 */
contract BOSAGORA is ERC20 {
    /*
     *  Constants
     */
    string private constant NAME = "BOSAGORA";
    string private constant SYMBOL = "BOA";
    uint8 private constant DECIMALS = 7;
    uint256 public constant MAX_SUPPLY = 4_950_000_000 * 10 ** DECIMALS;

    // --- Minting Schedule Constants (128 Years) ---
    // Starts from 2022-12-31 UTC
    uint256[128] private YEARLY_DEADLINE_TIMESTAMPS = [
        1672444800, // 2022-12-31
        1703980800, // 2023-12-31
        1735603200, // 2024-12-31
        1767139200, // 2025-12-31
        1798675200, // 2026-12-31
        1830211200, // 2027-12-31
        1861833600, // 2028-12-31
        1893369600, // 2029-12-31
        1924905600, // 2030-12-31
        1956441600, // 2031-12-31
        1988064000, // 2032-12-31
        2019600000, // 2033-12-31
        2051136000, // 2034-12-31
        2082672000, // 2035-12-31
        2114294400, // 2036-12-31
        2145830400, // 2037-12-31
        2177366400, // 2038-12-31
        2208902400, // 2039-12-31
        2240524800, // 2040-12-31
        2272060800, // 2041-12-31
        2303596800, // 2042-12-31
        2335132800, // 2043-12-31
        2366755200, // 2044-12-31
        2398291200, // 2045-12-31
        2429827200, // 2046-12-31
        2461363200, // 2047-12-31
        2492985600, // 2048-12-31
        2524521600, // 2049-12-31
        2556057600, // 2050-12-31
        2587593600, // 2051-12-31
        2619216000, // 2052-12-31
        2650752000, // 2053-12-31
        2682288000, // 2054-12-31
        2713824000, // 2055-12-31
        2745446400, // 2056-12-31
        2776982400, // 2057-12-31
        2808518400, // 2058-12-31
        2840054400, // 2059-12-31
        2871676800, // 2060-12-31
        2903212800, // 2061-12-31
        2934748800, // 2062-12-31
        2966284800, // 2063-12-31
        2997907200, // 2064-12-31
        3029443200, // 2065-12-31
        3060979200, // 2066-12-31
        3092515200, // 2067-12-31
        3124137600, // 2068-12-31
        3155673600, // 2069-12-31
        3187209600, // 2070-12-31
        3218745600, // 2071-12-31
        3250368000, // 2072-12-31
        3281904000, // 2073-12-31
        3313440000, // 2074-12-31
        3344976000, // 2075-12-31
        3376598400, // 2076-12-31
        3408134400, // 2077-12-31
        3439670400, // 2078-12-31
        3471206400, // 2079-12-31
        3502828800, // 2080-12-31
        3534364800, // 2081-12-31
        3565900800, // 2082-12-31
        3597436800, // 2083-12-31
        3629059200, // 2084-12-31
        3660595200, // 2085-12-31
        3692131200, // 2086-12-31
        3723667200, // 2087-12-31
        3755289600, // 2088-12-31
        3786825600, // 2089-12-31
        3818361600, // 2090-12-31
        3849897600, // 2091-12-31
        3881520000, // 2092-12-31
        3913056000, // 2093-12-31
        3944592000, // 2094-12-31
        3976128000, // 2095-12-31
        4007750400, // 2096-12-31
        4039286400, // 2097-12-31
        4070822400, // 2098-12-31
        4102358400, // 2099-12-31
        4133894400, // 2100-12-31
        4165430400, // 2101-12-31
        4196966400, // 2102-12-31
        4228502400, // 2103-12-31
        4260124800, // 2104-12-31
        4291660800, // 2105-12-31
        4323196800, // 2106-12-31
        4354732800, // 2107-12-31
        4386355200, // 2108-12-31
        4417891200, // 2109-12-31
        4449427200, // 2110-12-31
        4480963200, // 2111-12-31
        4512585600, // 2112-12-31
        4544121600, // 2113-12-31
        4575657600, // 2114-12-31
        4607193600, // 2115-12-31
        4638816000, // 2116-12-31
        4670352000, // 2117-12-31
        4701888000, // 2118-12-31
        4733424000, // 2119-12-31
        4765046400, // 2120-12-31
        4796582400, // 2121-12-31
        4828118400, // 2122-12-31
        4859654400, // 2123-12-31
        4891276800, // 2124-12-31
        4922812800, // 2125-12-31
        4954348800, // 2126-12-31
        4985884800, // 2127-12-31
        5017507200, // 2128-12-31
        5049043200, // 2129-12-31
        5080579200, // 2130-12-31
        5112115200, // 2131-12-31
        5143737600, // 2132-12-31
        5175273600, // 2133-12-31
        5206809600, // 2134-12-31
        5238345600, // 2135-12-31
        5269968000, // 2136-12-31
        5301504000, // 2137-12-31
        5333040000, // 2138-12-31
        5364576000, // 2139-12-31
        5396198400, // 2140-12-31
        5427734400, // 2141-12-31
        5459270400, // 2142-12-31
        5490806400, // 2143-12-31
        5522428800, // 2144-12-31
        5553964800, // 2145-12-31
        5585500800, // 2146-12-31
        5617036800, // 2147-12-31
        5648659200, // 2148-12-31
        5680195200 // 2149-12-31
    ];

    uint256[128] private YEARLY_CUMULATIVE_SUPPLY_LIMITS = [
        809_510_400 * 10 ** DECIMALS, // 2022-12-31
        1_168_426_094 * 10 ** DECIMALS, // 2023-12-31
        1_526_755_093 * 10 ** DECIMALS, // 2024-12-31
        1_884_505_300 * 10 ** DECIMALS, // 2025-12-31
        2_241_684_510 * 10 ** DECIMALS, // 2026-12-31
        2_506_140_416 * 10 ** DECIMALS, // 2027-12-31
        2_546_840_604 * 10 ** DECIMALS, // 2028-12-31
        2_586_992_561 * 10 ** DECIMALS, // 2029-12-31
        2_626_603_671 * 10 ** DECIMALS, // 2030-12-31
        2_665_681_220 * 10 ** DECIMALS, // 2031-12-31
        2_704_232_394 * 10 ** DECIMALS, // 2032-12-31
        2_742_264_284 * 10 ** DECIMALS, // 2033-12-31
        2_779_783_884 * 10 ** DECIMALS, // 2034-12-31
        2_816_798_095 * 10 ** DECIMALS, // 2035-12-31
        2_853_313_724 * 10 ** DECIMALS, // 2036-12-31
        2_889_337_489 * 10 ** DECIMALS, // 2037-12-31
        2_924_876_013 * 10 ** DECIMALS, // 2038-12-31
        2_959_935_833 * 10 ** DECIMALS, // 2039-12-31
        2_994_523_397 * 10 ** DECIMALS, // 2040-12-31
        3_028_645_067 * 10 ** DECIMALS, // 2041-12-31
        3_062_307_118 * 10 ** DECIMALS, // 2042-12-31
        3_095_515_741 * 10 ** DECIMALS, // 2043-12-31
        3_128_277_044 * 10 ** DECIMALS, // 2044-12-31
        3_160_597_052 * 10 ** DECIMALS, // 2045-12-31
        3_192_481_710 * 10 ** DECIMALS, // 2046-12-31
        3_223_936_881 * 10 ** DECIMALS, // 2047-12-31
        3_254_968_351 * 10 ** DECIMALS, // 2048-12-31
        3_285_581_828 * 10 ** DECIMALS, // 2049-12-31
        3_315_782_941 * 10 ** DECIMALS, // 2050-12-31
        3_345_577_244 * 10 ** DECIMALS, // 2051-12-31
        3_374_970_219 * 10 ** DECIMALS, // 2052-12-31
        3_403_967_270 * 10 ** DECIMALS, // 2053-12-31
        3_432_573_731 * 10 ** DECIMALS, // 2054-12-31
        3_460_794_863 * 10 ** DECIMALS, // 2055-12-31
        3_488_635_856 * 10 ** DECIMALS, // 2056-12-31
        3_516_101_831 * 10 ** DECIMALS, // 2057-12-31
        3_543_197_839 * 10 ** DECIMALS, // 2058-12-31
        3_569_928_864 * 10 ** DECIMALS, // 2059-12-31
        3_596_299_823 * 10 ** DECIMALS, // 2060-12-31
        3_622_315_564 * 10 ** DECIMALS, // 2061-12-31
        3_647_980_873 * 10 ** DECIMALS, // 2062-12-31
        3_673_300_471 * 10 ** DECIMALS, // 2063-12-31
        3_698_279_014 * 10 ** DECIMALS, // 2064-12-31
        3_722_921_095 * 10 ** DECIMALS, // 2065-12-31
        3_747_231_248 * 10 ** DECIMALS, // 2066-12-31
        3_771_213_943 * 10 ** DECIMALS, // 2067-12-31
        3_794_873_591 * 10 ** DECIMALS, // 2068-12-31
        3_818_214_544 * 10 ** DECIMALS, // 2069-12-31
        3_841_241_094 * 10 ** DECIMALS, // 2070-12-31
        3_863_957_477 * 10 ** DECIMALS, // 2071-12-31
        3_886_367_869 * 10 ** DECIMALS, // 2072-12-31
        3_908_476_394 * 10 ** DECIMALS, // 2073-12-31
        3_930_287_117 * 10 ** DECIMALS, // 2074-12-31
        3_951_804_050 * 10 ** DECIMALS, // 2075-12-31
        3_973_031_149 * 10 ** DECIMALS, // 2076-12-31
        3_993_972_320 * 10 ** DECIMALS, // 2077-12-31
        4_014_631_413 * 10 ** DECIMALS, // 2078-12-31
        4_035_012_227 * 10 ** DECIMALS, // 2079-12-31
        4_055_118_513 * 10 ** DECIMALS, // 2080-12-31
        4_074_953_966 * 10 ** DECIMALS, // 2081-12-31
        4_094_522_236 * 10 ** DECIMALS, // 2082-12-31
        4_113_826_922 * 10 ** DECIMALS, // 2083-12-31
        4_132_871_573 * 10 ** DECIMALS, // 2084-12-31
        4_151_659_693 * 10 ** DECIMALS, // 2085-12-31
        4_170_194_737 * 10 ** DECIMALS, // 2086-12-31
        4_188_480_114 * 10 ** DECIMALS, // 2087-12-31
        4_206_519_187 * 10 ** DECIMALS, // 2088-12-31
        4_224_315_273 * 10 ** DECIMALS, // 2089-12-31
        4_241_871_647 * 10 ** DECIMALS, // 2090-12-31
        4_259_191_536 * 10 ** DECIMALS, // 2091-12-31
        4_276_278_126 * 10 ** DECIMALS, // 2092-12-31
        4_293_134_559 * 10 ** DECIMALS, // 2093-12-31
        4_309_763_937 * 10 ** DECIMALS, // 2094-12-31
        4_326_169_316 * 10 ** DECIMALS, // 2095-12-31
        4_342_353_716 * 10 ** DECIMALS, // 2096-12-31
        4_358_320_111 * 10 ** DECIMALS, // 2097-12-31
        4_374_071_439 * 10 ** DECIMALS, // 2098-12-31
        4_389_610_597 * 10 ** DECIMALS, // 2099-12-31
        4_404_940_442 * 10 ** DECIMALS, // 2100-12-31
        4_420_063_795 * 10 ** DECIMALS, // 2101-12-31
        4_434_983_435 * 10 ** DECIMALS, // 2102-12-31
        4_449_702_108 * 10 ** DECIMALS, // 2103-12-31
        4_464_222_521 * 10 ** DECIMALS, // 2104-12-31
        4_478_547_344 * 10 ** DECIMALS, // 2105-12-31
        4_492_679_211 * 10 ** DECIMALS, // 2106-12-31
        4_506_620_722 * 10 ** DECIMALS, // 2107-12-31
        4_520_374_441 * 10 ** DECIMALS, // 2108-12-31
        4_533_942_897 * 10 ** DECIMALS, // 2109-12-31
        4_547_328_586 * 10 ** DECIMALS, // 2110-12-31
        4_560_533_970 * 10 ** DECIMALS, // 2111-12-31
        4_573_561_478 * 10 ** DECIMALS, // 2112-12-31
        4_586_413_505 * 10 ** DECIMALS, // 2113-12-31
        4_599_092_415 * 10 ** DECIMALS, // 2114-12-31
        4_611_600_540 * 10 ** DECIMALS, // 2115-12-31
        4_623_940_181 * 10 ** DECIMALS, // 2116-12-31
        4_636_113_606 * 10 ** DECIMALS, // 2117-12-31
        4_648_123_056 * 10 ** DECIMALS, // 2118-12-31
        4_659_970_738 * 10 ** DECIMALS, // 2119-12-31
        4_671_658_833 * 10 ** DECIMALS, // 2120-12-31
        4_683_189_488 * 10 ** DECIMALS, // 2121-12-31
        4_694_564_826 * 10 ** DECIMALS, // 2122-12-31
        4_705_786_938 * 10 ** DECIMALS, // 2123-12-31
        4_716_857_887 * 10 ** DECIMALS, // 2124-12-31
        4_727_779_712 * 10 ** DECIMALS, // 2125-12-31
        4_738_554_419 * 10 ** DECIMALS, // 2126-12-31
        4_749_183_991 * 10 ** DECIMALS, // 2127-12-31
        4_759_670_383 * 10 ** DECIMALS, // 2128-12-31
        4_770_015_523 * 10 ** DECIMALS, // 2129-12-31
        4_780_221_313 * 10 ** DECIMALS, // 2130-12-31
        4_790_289_632 * 10 ** DECIMALS, // 2131-12-31
        4_800_222_331 * 10 ** DECIMALS, // 2132-12-31
        4_810_021_236 * 10 ** DECIMALS, // 2133-12-31
        4_819_688_150 * 10 ** DECIMALS, // 2134-12-31
        4_829_224_851 * 10 ** DECIMALS, // 2135-12-31
        4_838_633_092 * 10 ** DECIMALS, // 2136-12-31
        4_847_914_604 * 10 ** DECIMALS, // 2137-12-31
        4_857_071_095 * 10 ** DECIMALS, // 2138-12-31
        4_866_104_247 * 10 ** DECIMALS, // 2139-12-31
        4_875_015_723 * 10 ** DECIMALS, // 2140-12-31
        4_883_807_161 * 10 ** DECIMALS, // 2141-12-31
        4_892_480_178 * 10 ** DECIMALS, // 2142-12-31
        4_901_036_370 * 10 ** DECIMALS, // 2143-12-31
        4_909_477_311 * 10 ** DECIMALS, // 2144-12-31
        4_917_804_551 * 10 ** DECIMALS, // 2145-12-31
        4_926_019_624 * 10 ** DECIMALS, // 2146-12-31
        4_934_124_040 * 10 ** DECIMALS, // 2147-12-31
        4_942_119_289 * 10 ** DECIMALS, // 2148-12-31
        MAX_SUPPLY // 2149-12-31
    ];
    // --- End Minting Schedule Constants ---

    /*
     *  Storage
     */
    address public immutable assetAccount; // Address that receives all minted tokens.
    // Index of the next minting period deadline in the timestamp array.
    uint256 public nextMintingPeriodIndex;

    /*
     *  Events
     */
    /**
     * @notice Emitted when tokens are created according to the schedule.
     * @param account The account that received the minted tokens (always assetAccount).
     * @param amount The amount of tokens minted.
     * @param periodIndex The index of the minting period that was just completed.
     */
    event ScheduledTokensMinted(address indexed account, uint256 amount, uint256 periodIndex);

    /*
     * Public functions
     */
    /**
     * @dev Initializes the contract, setting the asset account address.
     * @param account The address that will receive all minted tokens.
     *
     * Requirements:
     * - The account cannot be the zero address.
     */
    constructor(address account) ERC20(NAME, SYMBOL) {
        require(account != address(0), "BOSAGORA: Asset account is zero address");
        assetAccount = account;
    }

    /**
     * @dev Mints new tokens according to the schedule if the current timestamp has passed the next deadline.
     * Can be called by anyone.
     * Mints tokens up to the cumulative limit defined for the passed deadline.
     *
     * Requirements:
     * - The current timestamp must be greater than or equal to the timestamp at `nextMintingPeriodIndex`.
     * - `nextMintingPeriodIndex` must be within the bounds of the schedule arrays.
     * - Current total supply must be less than the limit for the completed period.
     *
     * Emits a {ScheduledTokensMinted} event if tokens are minted.
     */
    function mint() external {
        uint256 currentIndex = nextMintingPeriodIndex;
        require(currentIndex < 128, "BOSAGORA: Minting schedule finished");

        // Access storage array directly
        uint256 currentDeadline = YEARLY_DEADLINE_TIMESTAMPS[currentIndex];
        require(block.timestamp >= currentDeadline, "BOSAGORA: Minting period not yet finished");

        // Access storage array directly
        uint256 targetSupply = YEARLY_CUMULATIVE_SUPPLY_LIMITS[currentIndex];

        uint256 currentSupply = totalSupply();
        if (currentSupply >= targetSupply) {
            nextMintingPeriodIndex = currentIndex + 1;
            return;
        }

        uint256 amount = targetSupply - currentSupply;
        if (amount > 0) {
            nextMintingPeriodIndex = currentIndex + 1;
            _mint(assetAccount, amount);
            emit ScheduledTokensMinted(assetAccount, amount, currentIndex);
        } else {
            nextMintingPeriodIndex = currentIndex + 1;
        }
    }

    /**
     * @dev Returns the number of decimals.
     */
    function decimals() public view virtual override returns (uint8) {
        return DECIMALS;
    }
}

Read Contract

MAX_SUPPLY 0x32cb6b0c → uint256
allowance 0xdd62ed3e → uint256
assetAccount 0x0c092acf → address
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
nextMintingPeriodIndex 0x61a7af06 → uint256
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256

Write Contract 6 functions

These functions modify contract state and require a wallet transaction to execute.

approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
mint 0x1249c58b
No parameters
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool

Recent Transactions

No transactions found for this address