How agoric-labs/dapp-evm works
Project Type and Purpose
• This is a full‑stack, cross‑chain dApp that lets users create Agoric chain accounts, register IBC tokens (AUSDC, WAVAX), deploy an Axelar General Message Passing (GMP) EVM contract, and then use a browser UI to send tokens across chains.
• Key features:
• Agoric smart‑contract wrappers (contract/*.js)
• Solidity EVM contracts for GMP (solidity/contracts)
• Node scripts for deployment and chain initialization (deploy/, integration/, getDenom.js)
• React/Vite UI for wallets and contract invocation (ui/)
File Structure
Top‑level layers:
• contract/ – Agoric “wrapper” contracts and flows (JavaScript)
• solidity/ – Hardhat + ignition scripts for EVM contracts, tests
• deploy/ – Node.js scripts to build & deploy the Agoric contract
• integration/ – End‑to‑end scripts for environment setup, cross‑chain flows
• ui/ – Frontend React/Vite app
• .github/workflows – CI for tests and merges
• getDenom.js – Utility to lookup IBC denoms on local chain
Architectural patterns:
• Multi‑chain microservices: separate modules for contract logic, EVM logic, deployment, integration, UI
• Event‑driven cross‑chain flow via Hermes relayer and Axelar relayer
Insights from README
• Uses Docker to run an Agoric local chain and Hermes relayer for IBC to Osmosis testnet.
• Instructions to register tokens via Agoric SDK builder.
• Deploy GMP contract on Agoric chain, then use UI.
• Can also hook into a local Axelar development environment.
Final Recommendations
• Build/deploy pipelines (GitHub Actions → deploy scripts → chain).