|
1 | 1 | # Contract API |
| 2 | +deposit step: |
| 3 | +- check approveMax |
| 4 | +- (options) approveNFT |
| 5 | +- deposit |
| 6 | + |
| 7 | +NFT View step: |
| 8 | +- getContractNFTMeta; |
| 9 | +- getIPFS JSON information; |
| 10 | + |
2 | 11 |
|
3 | 12 | ## getNonce |
4 | 13 | ```typescript |
5 | | -const nonce = await contract.getNonce(web3, acc.address); |
| 14 | + const nonce = await contract.getNonce(web3, acc.address); |
| 15 | +``` |
| 16 | +## approveMax_LRC |
| 17 | +```typescript |
| 18 | + const nonce = await contract.getNonce(web3, acc.address); |
| 19 | + const response = await contract.approveMax(web3, acc.address, lrc.address, |
| 20 | + acc.depositAddr, gasPrice, gasLimit, ChainId.GOERLI, nonce, true) |
6 | 21 | ``` |
| 22 | +## deposit_LRC2 |
| 23 | +```typescript |
| 24 | + const nonce = await contract.getNonce(web3, acc.address) |
| 25 | + const response = await contract.deposit(web3, acc.address, acc.exchangeAddr, |
| 26 | + lrc, 11, 0, gasPrice, gasLimit, ChainId.GOERLI, nonce, true) |
| 27 | +``` |
| 28 | +##approveZero_LRC |
| 29 | +```typescript |
| 30 | + const nonce = await contract.getNonce(web3, acc.address) |
| 31 | + const response = await contract.approveZero(web3, acc.address, lrc.address, |
| 32 | + acc.depositAddr, gasPrice, gasLimit, ChainId.GOERLI, nonce, true) |
| 33 | +``` |
| 34 | +##forceWithdrawal |
| 35 | +```typescript |
| 36 | + const nonce = await contract.getNonce(web3, acc.address) |
| 37 | + const response = await contract.forceWithdrawal(web3, acc.address, acc.accountId, acc.exchangeAddr, |
| 38 | + eth, 0, gasPrice, gasLimit, ChainId.GOERLI, nonce, true) |
| 39 | + |
| 40 | +``` |
| 41 | + |
| 42 | + |
0 commit comments