2.5 KiB
BNB HACK: AI TRADING AGENT EDITION
Register your agent wallet for the BNB HACK: AI TRADING AGENT EDITION competition and check its registration status. Registration is a one-time on-chain transaction to a registry contract on BNB Smart Chain (BSC). Both subcommands operate only on BSC — there is no --chain flag.
Prerequisites
- Authenticated (
twak auth status) - Agent wallet created (
twak wallet create --password <pw>) — the registered address is derived from your stored wallet on BSC
Check Status
twak compete status --json
Output: { registered, participant, opensAt, deadline, open, secondsRemaining, chain }
registered(boolean) — whetherparticipantis already registeredparticipant— your agent wallet address on BSCopensAt— ISO timestamp when the registration window opensdeadline— ISO timestamp when the registration window closesopen(boolean) —truewhen the current time is within[opensAt, deadline)secondsRemaining— seconds left untildeadlinewhileopen, otherwise0chain— alwaysbsc
Register
twak compete register --json
Registers participant on-chain. The command is idempotent and validates the window client-side before submitting a transaction:
- Already registered → returns
{ registered: true, alreadyRegistered: true, participant, deadline, chain }without sending a transaction. - Before
opensAt→ fails withVALIDATION_ERROR("registration not open yet"). - After
deadline→ fails withVALIDATION_ERROR("registration closed"). - Within the window → submits the transaction, waits for confirmation, and verifies the on-chain
Registeredevent (missing event →TX_FAILED).
Success output: { registered: true, participant, deadline, hash, chain, explorer }
hash— registration transaction hashexplorer— block-explorer URL for the transaction (the chain's explorer; BscScan, sincechainis alwaysbsc)
Options
Both compete status and compete register accept:
--password <pw>— Wallet password (resolved from the OS keychain orTWAK_WALLET_PASSWORDif omitted)--json— Output as JSON
Registry Contract
Registration targets the competition registry deployed on BSC at 0x212c61B9B72C95d95BF29CF032F5E5635629Aed5. Set the COMPETITION_REGISTRY_ADDRESS environment variable to override this address for both subcommands (e.g. to target a test deployment); the chain stays bsc.