Developers

Transfer (signed message)

EIP-712 type Transfer: fields, type hash and how each field is built from the request JSON.

On this page

Signed by transfer. Step-by-step walkthrough: Signing.

Transfer(address fromAccount,uint64 fromSubAccount,address toAccount,uint64 toSubAccount,uint8 tokenCurrency,uint64 numTokens,uint32 nonce,int64 expiration)

Type hash 0xc68fcd68f79304f334c57a50cc1680546fa88e6147d97b3a1b18ac97a0c6b9f7. Domain {name: "GRVT Exchange", version: "0", chainId}.

Fields and where they come from

EIP-712 fieldTypeFrom requestTransform
fromAccountaddressfrom_account_idaddress
fromSubAccountuint64from_sub_account_idcopy; absent = 0
toAccountaddressto_account_idaddress
toSubAccountuint64to_sub_account_idcopy; absent = 0
tokenCurrencyuint8currencycurrencyId: id of the currency (get_currency)
numTokensuint64num_tokensscaled: decimal × 10^balance_decimals of the currency
nonceuint32signature.noncesig.nonce
expirationint64signature.expirationsig.expiration
domain chainIduint256signature.chain_idsig.chainId

Signing test cases

In signing.json, signed by the public test key:

  • transfer — Main account to sub account, no wallet types, so the Transfer type. Digest 0xf17ba792652522b4285c6c96b89d4aeb3eeffc817f7037cb89fa4f2a655a7781.
Sign the example in your browser
esc

↑ ↓ move↵ open⇧↵ open .mdTry an error code like 2002

Keyboard shortcuts

⌘ K
Search the docs
/
Search
l
Next code language (Python → TypeScript → Go → Rust → curl → WebSocket)
j / k
Next / previous page
t
Light / dark theme
?
This help
Esc
Close dialogs and drawers