AiderDocs
Open app

Core concepts

Watching activity

Every event the contract emits, and how to follow them in the app or your own code.

Events

Everything that changes a wallet emits an event. Indexed fields can be used as filters.

EventFields (indexed in bold)When
WalletCreatedwalletId, ownerA wallet is created
DepositedwalletId, amountThe owner deposits
WithdrawnwalletId, amountThe owner withdraws
WalletPausedEventwalletId, pausedPause or resume
AgentAddedwalletId, agent, labelAn agent is added or re-added
AgentUpdatedwalletId, agentLimits or expiry changed
AgentRevokedwalletId, agentAn agent is revoked
AgentPaidwalletId, agent, to, amount, memoA direct payment
PaymentRequestedrequestId, walletId, agent, to, amount, memo, expiresAtA request is created
RequestApprovedrequestId, walletIdA request is approved and paid
RequestRejectedrequestId, walletIdA request is rejected
RequestExpiredrequestId, walletIdA request is released
RecipientModeSetwalletId, modeAnyone / allowlist only
AllowlistUpdatedwalletId, recipient, allowedAllowlist change
BlocklistUpdatedwalletId, recipient, blockedBlocklist change

In the app

Activity lists every event for your wallet with the memo, amounts and an explorer link, and filters by type and agent. The app reads the events straight from Arc in windows of up to 10,000 blocks (the RPC's limit) and caches what it has read in your browser.

In your own code

A short script with viem that lists one wallet's direct payments:

payments.ts
import { createPublicClient, http, parseAbiItem } from 'viem'
import { arcTestnet } from 'viem/chains'

const client = createPublicClient({ chain: arcTestnet, transport: http() })
const latest = await client.getBlockNumber()

const logs = await client.getLogs({
  address: '0xed32e15d81e7864bf19caea4333bd0781f328ba3',
  event: parseAbiItem('event AgentPaid(uint256 indexed walletId, address indexed agent, address indexed to, uint256 amount, string memo)'),
  args: { walletId: 1n },
  fromBlock: latest - 9_999n, // the RPC allows at most 10,000 blocks per call
  toBlock: latest,
})

for (const log of logs) console.log(log.args.to, log.args.amount, log.args.memo)

To follow events live, use watchContractEvent with the same address, event and args.

On the explorer

Every transaction has an explorer link in the app and in the CLI output. On Arc Testnet the explorer is explorer.testnet.arc.io.

Next

Read the security model.

Built with Arc Studio