Main Token Contract

The OpenWork token is used for Governing the OpenWork system, incentivising participants and driving growth.

The token contract should have the following features:

  1. Should be ERC20.

  2. Main Token Contract on Ethereum + [to be decided on closer inspection]Availability on other chains(L2s, XDC & Custom L2)

  3. Compatible with governance

  4. Fixed token supply of 1B across all chains, all created initially on the Ethereum Mainnet.

  5. It must have other standard practices and have other aspects we haven’t discussed.

Here is the smart contract (draft) for it:
// SPDX-License-Identifier: MIT
// Compatible with OpenZeppelin Contracts ^5.0.0
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";

contract OpenWork is ERC20, ERC20Burnable, ERC20Permit, ERC20Votes {
    constructor() ERC20("OpenWork", "OWORK") ERC20Permit("OpenWork") {
        _mint(msg.sender, 10000000000 * 10 ** decimals());
    }

    function clock() public view override returns (uint48) {
        return uint48(block.timestamp);
    }

    // solhint-disable-next-line func-name-mixedcase
    function CLOCK_MODE() public pure override returns (string memory) {
        return "mode=timestamp";
    }

    // The following functions are overrides required by Solidity.

    function _update(address from, address to, uint256 value)
        internal
        override(ERC20, ERC20Votes)
    {
        super._update(from, to, value);
    }

    function nonces(address owner)
        public
        view
        override(ERC20Permit, Nonces)
        returns (uint256)
    {
        return super.nonces(owner);
    }
}



Last updated