Withdraw
Withdraw ERC20 tokens from your layer2 to address in layer1
EndPoint
Header
Field | Description | Example |
---|---|---|
X-API-KEY | ApiKey | "HlkcGxbqBeaF76j4rvPaOasyfPwnkQ6B6DQ6THZWbvrAGxzEdulXQvOKLrRWZLnN" |
X-API-SIG | ECDSA Signature, pay attention the signature type, sign the ecdsa hash | "0xccf0a141fce2dc5cbbd4f802c52220e9e2ce260e86704d6258603eb346eefe2d 4a450005c362b223b28402d087f7065ea5eee0314531adf6a580fce64c25dca81c02" |
Request
Query Param | Description | Example |
---|---|---|
exchange | exchangeAddress in exchange info | |
owner | account owner address | |
accountId | account ID | 10110 |
token | tokenVolume,withdraw tokenId and volume | |
to | withdraw to address | |
maxFee | tokenVolume from offchain fee | |
storageId | offchainId of storage Id | 1 |
validUntil | Timestamp for withdraw to become invalid, seconds | normally current time + 2 months |
eddsaSignature | eddsa signature of the eddsa hash | |
minGas | withdraw gas, set to 0 now | 0 |
extraData | set to "" now | "" |
payPayeeUpdateAccount | true | |
counterFactualInfo | if it's counterFactual wallet, need pass the info |
Response
Field | Description | Example |
---|---|---|
hash | The hash identifier set by the user at the time of submission, can use this hash to get the withdrawal info | "0x1d923ca783 4dc90484fa2e b611f0f0bc7e 741bb107007e bea19ba8caea b4f9d3" |
status | Whether the order was successfully submitted or not, please note, the user may query after a while to get the real process status, as most off-chain requests are async processed Allowable : ['received', 'processing', 'processed', 'failed'] | "received" |
isIdempotent | Idempotent of submit transfer response, submit same transfer again idempotent will be true | "false" |
Model
TokenVolume
Wrapper object used to describe a token associated with a certain quantity.
Field | Description | Example |
---|---|---|
tokenId | The Loopring's token identifier. | 0 |
volume | The volume of the token | "100000000000 0" |
counterFactualInfo
counterFactual Wallet Info
Field | Description | Example |
---|---|---|
walletFactory | Counterfactual wallet factory contract address | "0xbbbbca6a90 1c926f240b89 eacb641d8aec 7aeafd" |
walletOwner | Counterfactual wallet owner address, NOT the wallet address | "0xbbbbca6a90 1c926f240b89 eacb641d8aec 7aeafd" |
walletSalt | Salt to generate address from owner & other related info | "1" |
Compute ECDSA hash
Compute EdDSA hash
Last updated