Developers

TransferV2 (signed message)

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

On this page

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 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
fromWalletTypeuint8from_wallet_typeenumCode: integer value of WalletType
toWalletTypeuint8to_wallet_typeenumCode: integer value of WalletType
domain chainIduint256signature.chain_idsig.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. Digest 0x9f0d9ae5e2b6aea384d9357b72f0acbcc96547780b73e62cffcbee6692b1a44d.
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