Abstract Onboard
Everything an AI agent needs to operate on Abstract (ZK Stack L2).
🚀 New Agent? Start Here
CODEBLOCK0
Quick Start
Create Abstract Global Wallet (AGW)
AGW is a smart contract wallet that earns XP on Abstract. Essential for agents!
⚠️ CRITICAL: Understand the 3 layers first:
CODEBLOCK1
The correct funding flow:
CODEBLOCK2
CODEBLOCK3
Your EOA becomes the signer, AGW is a separate smart contract address.
⚠️ Version Warning: Different agw-client versions may compute different AGW addresses! Always pin your version. See references/agw.md for details.
Check Balances
CODEBLOCK4
Bridge ETH to Abstract
CODEBLOCK5
Deploy a Contract
CODEBLOCK6
Transfer Tokens
CODEBLOCK7
Swap Tokens
CODEBLOCK8
DEX Trading (Kona & Aborean)
Abstract has multiple DEXs. Use the protocol-specific scripts for best results:
CODEBLOCK9
See references/dex.md for contract addresses and supported pools.
Myriad Prediction Markets
Trade on Myriad Markets — the largest prediction market on Abstract (415K+ users, $100M+ volume).
CODEBLOCK10
See references/myriad.md for contract addresses, ABI details, and token info.
Call Any Contract
CODEBLOCK11
Mint NFT
CODEBLOCK12
See references/SimpleNFT.sol for a basic NFT contract template.
USDC Operations
CODEBLOCK13
Estimate Gas
CODEBLOCK14
Watch Events
CODEBLOCK15
Testnet Setup
CODEBLOCK16
Key Information
https://api.mainnet.abs.xyz |
| Explorer | https://abscan.org |
| Bridge | https://relay.link/bridge/abstract |
| USDC |
0x84A71ccD554Cc1b02749b35d22F684CC8ec987e1 |
| WETH |
0x3439153EB7AF838Ad19d56E1571FBD09333C2809 |
| Kona Router |
0x441E0627Db5173Da098De86b734d136b27925250 |
| Uniswap V2 Router |
0xad1eCa41E6F772bE3cb5A48A6141f9bcc1AF9F7c |
| Myriad PM Contract |
0x3e0F5F8F5Fb043aBFA475C0308417Bf72c463289 |
| Myriad PTS Token |
0x0b07cf011B6e2b7E0803b892d97f751659940F23 |
| Myriad API |
https://api-v2.myriadprotocol.com |
Scripts
| Script | Purpose |
|---|
| INLINECODE12 | START HERE - Setup guide & health check |
| INLINECODE13 |
Create Abstract Global Wallet (earns XP!) |
|
check-balances.js | Check ETH and token balances |
|
relay-bridge.js | Bridge ETH from other chains |
|
bridge-usdc-relay.js | Bridge USDC via Relay API |
|
deploy-abstract.js | Deploy contracts to Abstract (with verification!) |
|
verify-contract.js | Verify contract has bytecode (SAFETY CHECK) |
|
transfer.js | Send ETH or tokens |
|
usdc-ops.js | USDC transfers, approvals, allowances |
|
swap-tokens.js | Trade tokens via DEX (generic) |
|
swap-kona.js | Swap on Kona Finance (V2) ✅ |
|
swap-aborean.js | Swap on Aborean (Velodrome-style) |
|
swap-uniswap-v2.js | Swap on Uniswap V2 |
|
myriad-trade.js | List markets, get info (Myriad API) |
|
myriad-buy-direct.js | Place predictions on Myriad (on-chain) ✅ |
|
call-contract.js | Call any contract function |
|
mint-nft.js | Mint NFTs to existing contract |
|
estimate-gas.js | Estimate gas costs before transactions |
|
watch-events.js | Monitor on-chain events in real-time |
|
testnet-setup.js | Setup and verify testnet access |
References
| File | Contents |
|---|
| INLINECODE32 | Abstract Global Wallet guide (XP, activation) |
| INLINECODE33 |
DEX contracts & swap patterns (Kona, Aborean) |
|
myriad.md | Myriad prediction market contracts, ABI & trading |
|
hardhat.config.js | Working Hardhat config for Abstract |
|
addresses.md | Key contract addresses |
|
troubleshooting.md | Common errors and fixes |
|
SimpleNFT.sol | Basic NFT contract template |
⚠️ CRITICAL: Contract Deployment
Abstract is a zkSync-based chain. Standard EVM deployment methods DON'T WORK.
What WORKS ✅
CODEBLOCK17
What DOESN'T WORK ❌
CODEBLOCK18
Deployment Checklist
- - [ ] Compiled with zksolc (not standard solc)
- [ ] Using
zksync-ethers ContractFactory - [ ] Verify
eth_getCode != 0x after deploy - [ ] Test contract functions before sending tokens
Common Issues
- 1. Gas estimation fails → Use Hardhat, not foundry-zksync
- Compiler errors → Use Solidity 0.8.x with zksolc
- TX stuck → Check gas price, verify on abscan.org
- Deploy succeeds but no bytecode → Use zksync-ethers, not viem
- Tokens sent to empty address → Always verify bytecode first!
See references/troubleshooting.md for detailed solutions.
Dependencies
CODEBLOCK19
⚠️ agw-client version warning: Newer versions may use different factory contracts, computing different AGW addresses for the same EOA. If you change versions, verify your AGW address hasn't changed before sending funds!