Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AgentPay Smart Contracts (agentpay_contracts)

Smart contracts powering AgentPay AI on BotChain EVM networks (Testnet 968 & Mainnet 677).


Deployed Contracts

BotChain Testnet (Chain ID: 968)

  • APAYToken (UUPS ERC1967Proxy): 0xFd7bF688d5a772A81DfE39da502F69FD99cE92c7

    • Standard: ERC-20 + EIP-3009 (Transfer With Authorization) + UUPS Upgradeable
    • Implementation Address: 0xc530F8Dc1BfE6F0849b318bABF369D86FaB2ff5E
    • Contract Owner & Governance: 0x903a72f5C79fdeBbc5928c19fe757AC304EC09Ae
    • Decimals: 18
    • Name: AgentPay Token
    • Symbol: APAY
    • Initial Supply: 1,000,000,000 APAY
  • AgentPayRegistry.sol: 0xc1eBB154EFf9bf9c08e39978E1447cC05e726dC6

    • UUPS ERC1967 Proxy Vault & Prompt Record Ledger

Features

  1. UUPS Upgradeability:
    • Uses OpenZeppelin ERC1967Proxy + UUPSUpgradeable.
    • Upgrade function upgradeToAndCall(newImplementation, data) restricted to onlyOwner.
  2. EIP-3009 Gasless Payments:
    • transferWithAuthorization(from, to, value, validAfter, validBefore, nonce, v, r, s)
    • receiveWithAuthorization(from, to, value, validAfter, validBefore, nonce, v, r, s)
    • cancelAuthorization(authorizer, nonce, v, r, s)
  3. Parallel 32-Byte Nonces:
    • Supports parallel nonces (bytes32 nonce), allowing autonomous AI bots to issue concurrent pay-per-prompt requests without sequential nonce locks.

Testing & Deployment

# Run Foundry Test Suite
forge test

# Deploy UUPS Upgradeable APAYToken to BotChain Testnet
forge script script/DeployAPAYToken.s.sol:DeployAPAYToken \
  --rpc-url https://rpc.bohr.life \
  --broadcast

About

Foundry smart contracts for AgentPay AI — AgentPayRegistry, ERC-8004 identity, and token

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages