-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f1952c
commit f18c7a0
Showing
3 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { | ||
HttpClient, | ||
ThorestClient | ||
} from '@vechainfoundation/vechain-sdk-network'; | ||
|
||
// Url of the testnet network | ||
const _testnetUrl = 'https://testnet.vechain.org/'; | ||
|
||
// Testnet network instance | ||
const testNetwork = new HttpClient(_testnetUrl); | ||
|
||
// Thorest client testnet instance | ||
const thorestTestnetClient = new ThorestClient(testNetwork); | ||
|
||
// Get account details | ||
const accountDetails = await thorestTestnetClient.accounts.getAccount( | ||
'0x5034aa590125b64023a0262112b98d72e3c8e40e' | ||
); | ||
console.log(accountDetails); | ||
|
||
// Get account code | ||
const accountCode = await thorestTestnetClient.accounts.getBytecode( | ||
'0x5034aa590125b64023a0262112b98d72e3c8e40e' | ||
); | ||
console.log(accountCode); | ||
|
||
// Get account storage | ||
const accountStorage = await thorestTestnetClient.accounts.getStorageAt( | ||
'0x5034aa590125b64023a0262112b98d72e3c8e40e', | ||
'0x0000000000000000000000000000000000000000000000000000000000000001' | ||
); | ||
console.log(accountStorage); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters