-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
c444de7
commit 87e43f6
Showing
2 changed files
with
30 additions
and
0 deletions.
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 |
---|---|---|
|
@@ -332,6 +332,7 @@ | |
"sx", | ||
"syscoin", | ||
"taiko", | ||
"tTangle", | ||
"tara", | ||
"telos", | ||
"tenet", | ||
|
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,29 @@ | ||
|
||
const { post } = require('../helper/http') | ||
|
||
const endpoint = 'https://rpc.tangle.tools' | ||
|
||
async function fetch(method, params = []) { | ||
const response = await post(endpoint, { jsonrpc: '2.0', id: 1, method, params }) | ||
|
||
console.log(response) | ||
|
||
return response.result | ||
} | ||
|
||
async function tvl(api) { | ||
// balances: totalIssuance() | ||
const totalIssuance = await fetch('state_getStorage', ['0xc2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80']) | ||
|
||
console.debug("Bal", BigInt(totalIssuance).toString()) | ||
|
||
api.add("TNT", BigInt(totalIssuance)) | ||
} | ||
|
||
module.exports = { | ||
timetravel: false, | ||
methodology: 'counts the number of MINT tokens in the Club Bonding contract.', | ||
tTangle: { | ||
tvl | ||
} | ||
} |