diff --git a/docs/pages/concepts/networks/testnet.mdx b/docs/pages/concepts/networks/testnet.mdx index a4cf3d0..b871941 100644 --- a/docs/pages/concepts/networks/testnet.mdx +++ b/docs/pages/concepts/networks/testnet.mdx @@ -50,6 +50,15 @@ EXP fee tokens (pay relay fees in a test token instead of native tBNB): | EXP | `0xa8071DA5e994cB8e3eB56CaD0FBB6ca424dD8dc0` | | EXP2 | `0x61727778216127D0843A99A3e91e99C27e9f3BC7` | +$U agent-economy token ([ERC-8183 hiring](/sdk/erc8183) escrows job budgets in +$U; the public faucet's `requestTokens()` pays 10 $U per address every 30 +minutes — see [Get testnet $U](/sdk/erc8183#get-testnet-u) for claim code): + +| Contract | Address | +| --- | --- | +| $U token | `0xc70B8741B8B07A6d61E54fd4B20f22Fa648E5565` | +| $U faucet | `0x86e9197CC0F76E4e4aaa7082180945196bBAb5D3` | + > Addresses are the source of truth in the SDK's > [`packages/wallet/src/config.ts`](https://github.com/altananetwork/altana-sdk/blob/main/packages/wallet/src/config.ts). > To verify independently, check the addresses above against the explorer. diff --git a/docs/pages/sdk/erc8183.mdx b/docs/pages/sdk/erc8183.mdx index d50ee2b..7d2a47d 100644 --- a/docs/pages/sdk/erc8183.mdx +++ b/docs/pages/sdk/erc8183.mdx @@ -69,3 +69,43 @@ OptimisticPolicy, ERC-8004 registry, and $U token for BSC mainnet (56) and testnet (97). The MCP server exposes the same flow as tools: `erc8183_create_job`, `erc8183_job_status`, `erc8183_settle` — see [MCP Tools](/mcp/tools). + +## Get testnet $U + +On BSC testnet (chain 97) a public faucet funds job budgets: calling +`requestTokens()` on the faucet pays **10 $U** to the caller, once per address +every 30 minutes. Claim straight from your Altana wallet through the relay — +the smart account is `msg.sender`, so the payout lands in the wallet: + +```ts +import { encodeFunctionData } from "viem"; +import { createClient, BNB_TESTNET } from "@altananetwork/sdk"; + +const U_FAUCET = "0x86e9197CC0F76E4e4aaa7082180945196bBAb5D3"; + +const client = createClient({ chains: [BNB_TESTNET] }); +await client.execute({ + wallet, + signer, + chainId: 97, + calls: [{ + to: U_FAUCET, + data: encodeFunctionData({ + abi: [{ name: "requestTokens", type: "function", stateMutability: "nonpayable", inputs: [], outputs: [] }], + functionName: "requestTokens", + }), + }], +}); +``` + +Any EOA with test BNB for gas can also claim directly: + +```bash +cast send 0x86e9197CC0F76E4e4aaa7082180945196bBAb5D3 "requestTokens()" \ + --rpc-url https://bsc-testnet-rpc.publicnode.com --private-key $AGENT_KEY +``` + +The faucet enforces the 30-minute cooldown per address; the read-only +`allowedToWithdraw(address)` reports whether a claim is currently allowed. +Token and faucet addresses are listed with the other testnet contracts on +[Testnet](/concepts/networks/testnet).