TransferV2 (signed message)
EIP-712 type TransferV2: fields, type hash and how each field is built from the request JSON.
On this page
Agent prompt
Write a function that signs a Grvt `TransferV2` message {using} and checks it against the signing test cases.
Target environment: Testnet (chain ID 326). Recorded signing cases keep their original environment.
Validate new flows on testnet with test funds before using production.
Read this first: {origin}/bundle/reference/signing/TransferV2.md (~29 KB, plain Markdown: this page plus the AGENTS.md rules, Signing, Environments).
Fetch other pages from the index at {origin}/llms.txt only as you need them. {origin}/downloads/contract.json is a machine-readable contract for tools, not for reading.
Rules: follow AGENTS.md; do not send requests without the user asking you to; read credentials from environment variables; never retry writes automatically; show me the code and how to run it. Signed by transfer. Step-by-step walkthrough: Signing.
TransferV2(address fromAccount,uint64 fromSubAccount,address toAccount,uint64 toSubAccount,uint8 tokenCurrency,uint64 numTokens,uint32 nonce,int64 expiration,uint8 fromWalletType,uint8 toWalletType)
Type hash 0x4c1e946de7758ace7db774b2ec9d3041167bf569933969a6c2aa121c6f02f5ff. Domain {name: "GRVT Exchange", version: "0", chainId}.
Fields and where they come from
| EIP-712 field | Type | From request | Transform |
|---|---|---|---|
fromAccount | address | from_account_id | address |
fromSubAccount | uint64 | from_sub_account_id | copy; absent = 0 |
toAccount | address | to_account_id | address |
toSubAccount | uint64 | to_sub_account_id | copy; absent = 0 |
tokenCurrency | uint8 | currency | currencyId: id of the currency (get_currency) |
numTokens | uint64 | num_tokens | scaled: decimal × 10^balance_decimals of the currency |
nonce | uint32 | signature.nonce | sig.nonce |
expiration | int64 | signature. | sig.expiration |
fromWalletType | uint8 | from_wallet_type | enumCode: integer value of WalletType |
toWalletType | uint8 | to_wallet_type | enumCode: integer value of WalletType |
domain chainId | uint256 | signature.chain_id | sig.chainId |
Signing test cases
In signing.json, signed by the public test key:
transfer_wallet_types— Both wallet types set and currency id <= 255, so TransferV2. Digest0x9f0d9ae5e2b6aea384d9357b72f0acbcc96547780b73e62cffcbee6692b1a44d.