Abstract Onboard
Deploy smart contracts and bridge assets to Abstract (ZK Stack L2). Use when an agent needs to deploy contracts on Abstract, bridge ETH/tokens to Abstract, trade/swap tokens, place predictions on Myri
Deploy smart contracts and bridge assets to Abstract (ZK Stack L2). Use when an agent needs to deploy contracts on Abstract, bridge ETH/tokens to Abstract, trade/swap tokens, place predictions on Myri
Real data. Real impact.
Growing
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
Everything an AI agent needs to operate on Abstract (ZK Stack L2).
# Check if you're ready to operate node scripts/quick-start.js check <your-wallet-address>Or get the full setup guide
node scripts/quick-start.js
AGW is a smart contract wallet that earns XP on Abstract. Essential for agents!
⚠️ CRITICAL: Understand the 3 layers first:
Private Key → EOA (signer) → AGW (smart contract wallet)
The correct funding flow:
1. Fund EOA with small ETH (for gas) 2. Create/deploy AGW (EOA pays gas for first tx) 3. Fund AGW with your main balance 4. Everything runs through AGW from now on
export WALLET_PRIVATE_KEY=0x... node scripts/create-agw.js
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.
node scripts/check-balances.js <wallet> all
export WALLET_PRIVATE_KEY=0x... node scripts/relay-bridge.js --from base --amount 0.01
export WALLET_PRIVATE_KEY=0x... node scripts/deploy-abstract.js ./artifacts/MyContract.json "constructor-arg"
export WALLET_PRIVATE_KEY=0x... node scripts/transfer.js --to 0x... --amount 0.01 # ETH node scripts/transfer.js --to 0x... --amount 100 --token USDC # Token
export WALLET_PRIVATE_KEY=0x... export DEX_ROUTER=0x... # Set DEX router address node scripts/swap-tokens.js --from ETH --to USDC --amount 0.01
Abstract has multiple DEXs. Use the protocol-specific scripts for best results:
# Kona Finance (V2) - USDC → ETH export WALLET_PRIVATE_KEY=0x... node scripts/swap-kona.jsAborean (Velodrome-style) - when router is available
node scripts/swap-aborean.js
Generic Uniswap V2
node scripts/swap-uniswap-v2.js
See
references/dex.md for contract addresses and supported pools.
Trade on Myriad Markets — the largest prediction market on Abstract (415K+ users, $100M+ volume).
# List open markets node scripts/myriad-trade.js listGet market details
node scripts/myriad-trade.js info <marketId>
Buy shares (place a prediction)
export WALLET_PRIVATE_KEY=0x... node scripts/myriad-buy-direct.js <marketId> <outcomeId> <amount>
Example: $1 USDC.e on "Yes" for market 765
node scripts/myriad-buy-direct.js 765 0 1
See
references/myriad.md for contract addresses, ABI details, and token info.
# Read node scripts/call-contract.js --address 0x... --abi ./abi.json --function balanceOf --args 0x1234Write
export WALLET_PRIVATE_KEY=0x... node scripts/call-contract.js --address 0x... --abi ./abi.json --function transfer --args 0x1234,100 --write
# Deploy SimpleNFT.sol first, then mint export WALLET_PRIVATE_KEY=0x...Mint to existing contract
node scripts/mint-nft.js --contract 0x... --image QmIPFShash --to 0xRecipient --name "My NFT"
See
references/SimpleNFT.sol for a basic NFT contract template.
# Check USDC balance node scripts/usdc-ops.js balance <wallet>Transfer USDC
export WALLET_PRIVATE_KEY=0x... node scripts/usdc-ops.js transfer <to> <amount>
Approve spender
node scripts/usdc-ops.js approve <spender> <amount>
Check allowance
node scripts/usdc-ops.js allowance <owner> <spender>
# Get current gas prices node scripts/estimate-gas.jsEstimate transfer cost
node scripts/estimate-gas.js transfer <to> <amount>
Estimate deployment cost
node scripts/estimate-gas.js deploy <bytecodeSize>
# Watch new blocks node scripts/watch-events.js blocksWatch ETH transfers to/from wallet
node scripts/watch-events.js transfers <wallet>
Watch ERC20 transfers
node scripts/watch-events.js erc20 <token> <wallet>
Watch contract events
node scripts/watch-events.js contract <address>
# Get faucet instructions node scripts/testnet-setup.js faucetCheck testnet balance
node scripts/testnet-setup.js check <wallet>
Verify testnet setup
node scripts/testnet-setup.js verify <wallet>
| Item | Value |
|---|---|
| Chain ID | 2741 |
| RPC | https://api.mainnet.abs.xyz |
| Explorer | https://abscan.org |
| Bridge | https://relay.link/bridge/abstract |
| USDC | |
| WETH | |
| Kona Router | |
| Uniswap V2 Router | |
| Myriad PM Contract | |
| Myriad PTS Token | |
| Myriad API | |
| Script | Purpose |
|---|---|
| START HERE - Setup guide & health check |
| Create Abstract Global Wallet (earns XP!) |
| Check ETH and token balances |
| Bridge ETH from other chains |
| Bridge USDC via Relay API |
| Deploy contracts to Abstract (with verification!) |
| Verify contract has bytecode (SAFETY CHECK) |
| Send ETH or tokens |
| USDC transfers, approvals, allowances |
| Trade tokens via DEX (generic) |
| Swap on Kona Finance (V2) ✅ |
| Swap on Aborean (Velodrome-style) |
| Swap on Uniswap V2 |
| List markets, get info (Myriad API) |
| Place predictions on Myriad (on-chain) ✅ |
| Call any contract function |
| Mint NFTs to existing contract |
| Estimate gas costs before transactions |
| Monitor on-chain events in real-time |
| Setup and verify testnet access |
| File | Contents |
|---|---|
| Abstract Global Wallet guide (XP, activation) |
| DEX contracts & swap patterns (Kona, Aborean) |
| Myriad prediction market contracts, ABI & trading |
| Working Hardhat config for Abstract |
| Key contract addresses |
| Common errors and fixes |
| Basic NFT contract template |
Abstract is a zkSync-based chain. Standard EVM deployment methods DON'T WORK.
// Use zksync-ethers (NOT viem, NOT standard ethers) const { ContractFactory } = require("zksync-ethers"); const factory = new ContractFactory(abi, bytecode, wallet); const contract = await factory.deploy(args);// ALWAYS verify bytecode after deploy const code = await provider.getCode(address); if (code === '0x') throw new Error("Deploy failed!");
// DON'T use viem's deployContract await walletClient.deployContract({...}); // Returns success but NO BYTECODE// DON'T use standard ethers ContractFactory // DON'T trust transaction success alone
zksync-ethers ContractFactoryeth_getCode != 0x after deploySee
references/troubleshooting.md for detailed solutions.
# Core dependencies npm install ethers zksync-ethers viemFor contract deployment
npm install @matterlabs/hardhat-zksync
For AGW (Abstract Global Wallet) - PIN THE VERSION!
Different versions compute different AGW addresses
npm install @abstract-foundation/agw-client@1.10.0
⚠️ 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!
No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.