Smart contracts for the Gate402 platform, including the GAToken (G402) ERC20 token with EIP-3009 support for gasless transfers.
GAToken is an ERC20 token with the following features:
- ERC20: Standard fungible token functionality
- EIP-3009: Transfer with authorization (gasless transfers via meta-transactions)
- ERC20Permit: Gasless approvals via EIP-2612
- ERC20Burnable: Token holders can burn their tokens
- Access Control: Role-based minting with MINTER_ROLE
Token details:
- Name: Gate402
- Symbol: G402
- Deployment: Deterministic addresses via Create2Deployer
Install dependencies using Foundry:
forge installCreate a .env file with the following variables:
# Required
PRIVATE_KEY=<your_private_key>
CREATE2_DEPLOYER=<create2_deployer_address>
SALT=<deployment_salt>
# Optional (defaults to deployer address)
ADMIN_ADDRESS=<admin_address>Deploy GAToken using the deployment script:
forge script script/DeployGAToken.s.sol:DeployGAToken \
--rpc-url <rpc_url> \
--broadcast \
--verifyExample for Mantle Sepolia:
forge script script/DeployGAToken.s.sol:DeployGAToken \
--rpc-url https://rpc.sepolia.mantle.xyz \
--broadcast \
--verifyforge buildforge testforge fmtforge snapshotBuilt with Foundry