This repository was archived by the owner on May 16, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ Update [depositEth.ts](./depositEth.ts#L14) with your deposit amount then run
3737yarn deposit-eth
3838```
3939
40+ ## Deposit NFT
41+
42+ Update [ depositNft.ts] ( ./depositNft.ts#L14 ) with your token address and id then run
43+
44+ ``` sh
45+ yarn deposit-nft
46+ ```
47+
4048## Prepare Eth Withdrawal
4149
4250Update [ createEthWithdrawal.ts] ( ./createEthWithdrawal.ts#L12 ) with your withdrawal amount then run
Original file line number Diff line number Diff line change 1+ import { Config , ImmutableX } from '@imtbl/core-sdk' ;
2+ import { generateWalletConnection } from './libs/walletConnection' ;
3+
4+ ( async ( ) => {
5+ try {
6+ const walletConnection = await generateWalletConnection ( 'goerli' ) ;
7+
8+ // IMX class client
9+ const client = new ImmutableX ( Config . SANDBOX ) ;
10+
11+ // Deposit ERC721
12+ const depositResponse = await client . deposit ( walletConnection . ethSigner , {
13+ type : 'ERC721' ,
14+ tokenId : '' , // TOKEN_ID
15+ tokenAddress : '' // COLLECTION_CONTRACT_ADDRESS
16+ } ) ;
17+
18+ console . log ( 'depositResponse' , depositResponse ) ;
19+ } catch ( err ) {
20+ console . error ( err ) ;
21+ process . exit ( 1 ) ;
22+ }
23+ } ) ( ) ;
Original file line number Diff line number Diff line change 1010 "create-exchange-transfer" : " ts-node -r dotenv/config createExchangeTransfer.ts" ,
1111 "create-nft-primary-txn" : " ts-node -r dotenv/config createNftPrimaryTransaction.ts" ,
1212 "deposit-eth" : " ts-node -r dotenv/config depositEth.ts" ,
13+ "deposit-nft" : " ts-node -r dotenv/config depositNft.ts" ,
1314 "create-eth-withdrawal" : " ts-node -r dotenv/config createEthWithdrawal.ts" ,
1415 "complete-eth-withdrawal" : " ts-node -r dotenv/config completeEthWithdrawal.ts" ,
1516 "create-project" : " ts-node -r dotenv/config createProject.ts" ,
You can’t perform that action at this time.
0 commit comments