File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ const sui = require ( "../helper/chain/sui" )
2+
3+ // Configuration: ActiveVault object instance address
4+ // Type: 0x882cd9388d35a141614a7beb28ec14f7aaf54f8372ccc1dd64046efd82866043::active_vault::ActiveVault<0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC>
5+ const ACTIVE_VAULT_ID = "0xa33c96502b89cdfd177333c35d70b95451547d223a0d0abc5faeee82793500ab"
6+
7+ async function tvl ( api ) {
8+ const vault = await sui . getObject ( ACTIVE_VAULT_ID ) ;
9+ const typeString = vault . type . replace ( ">" , "" ) . split ( "<" ) [ 1 ] ;
10+ const tokenType = typeString ;
11+ const balance = vault . fields . balance ;
12+ api . add ( tokenType , balance ) ;
13+ }
14+
15+ module . exports = {
16+ timetravel : false ,
17+ sui : {
18+ tvl,
19+ } ,
20+ }
You can’t perform that action at this time.
0 commit comments