Question: TypeScript Only Implement a script to retrieve the specified holders of $SWTH token on the Smart Chain network. BSC Block Explorer: https://bscscan.com/ $SWTH Token Contract:

TypeScript Only

Implement a script to retrieve the specified holders of $SWTH token on the Smart Chain network.

BSC Block Explorer: https://bscscan.com/

$SWTH Token Contract: 0xc0ecb8499d8da2771abcbf4091db7f65158f1468

Addresses to look up:

0xb5d4f343412dc8efb6ff599d790074d0f1e8d430 0x0020c5222a24e4a96b720c06b803fb8d34adc0af 0xd1d8b2aae2ebb2acf013b803bc3c24ca1303a392

How your script will be tested:

ts-node ./retrieve-holders.ts

Using api.bscscan.com uses a third party API service to retrieve the result, and is not considered a valid solution because it does not directly interact with the chain

Expected Output:

The output should be organized as one address amount per line.

Note, as this is live production contract, the amount you retrieve will be different from the sample below.

0xb5d4f343412dc8efb6ff599d790074d0f1e8d430 99,888,874.62734227 0x0020c5222a24e4a96b720c06b803fb8d34adc0af 7,970,573.69197209 0xd1d8b2aae2ebb2acf013b803bc3c24ca1303a392 2,894,918.96152958

You may need to use the NPM module ethers.js to complete this task.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!