5ī¸Other Ways to Interact with NAVI

We also provided samples of interacting NAVI with CLI and RPC methods.

CLI

Supply

sui client call \
--package 0xe66f07e2a8d9cf793da1e0bca98ff312b3ffba57228d97cf23a0613fddf31b65 \
--module incentive_v2 \
--function entry_deposit \
--args 0x06 \
       0xbb4e2f4b6205c2e2a2db47aeb4f830796ec7c005f88537ee775986639bc442fe \
       0x96df0fce3c471489f4debaaa762cf960b3d97820bd1f3f025ff8190730e958c5 \
       0 \
       ${YOUR_SUI_COIN_OBJECT} \
       ${DEPOSIT_AMOUNT} \
       0xaaf735bf83ff564e1b219a0d644de894ef5bdc4b2250b126b2a46dd002331821 \
       0xf87a8acb8b81d14307894d12595541a73f19933f88e1326d5be349c7a6f7559c \
--type-args "0x2::sui::SUI" \
--gas-budget 100000000

Withdraw

sui client call \
--package 0xe66f07e2a8d9cf793da1e0bca98ff312b3ffba57228d97cf23a0613fddf31b65 \
--module incentive_v2 \
--function entry_withdraw \
--args 0x06 \
       0x1568865ed9a0b5ec414220e8f79b3d04c77acc82358f6e5ae4635687392ffbef \
       0xbb4e2f4b6205c2e2a2db47aeb4f830796ec7c005f88537ee775986639bc442fe \
       0x96df0fce3c471489f4debaaa762cf960b3d97820bd1f3f025ff8190730e958c5 \
       0 \
       ${WITHDRAW_AMOUNT} \
       0xaaf735bf83ff564e1b219a0d644de894ef5bdc4b2250b126b2a46dd002331821 \
       0xf87a8acb8b81d14307894d12595541a73f19933f88e1326d5be349c7a6f7559c \
--type-args "0x2::sui::SUI" \
--gas-budget 100000000

Borrow

sui client call \
--package 0xe66f07e2a8d9cf793da1e0bca98ff312b3ffba57228d97cf23a0613fddf31b65 \
--module incentive_v2 \
--function entry_borrow \
--args 0x06 \
       0x1568865ed9a0b5ec414220e8f79b3d04c77acc82358f6e5ae4635687392ffbef \
       0xbb4e2f4b6205c2e2a2db47aeb4f830796ec7c005f88537ee775986639bc442fe \
       0x96df0fce3c471489f4debaaa762cf960b3d97820bd1f3f025ff8190730e958c5 \
       0 \
       ${BORRIW_AMOUNT} \
       0xf87a8acb8b81d14307894d12595541a73f19933f88e1326d5be349c7a6f7559c \
--type-args "0x2::sui::SUI" \
--gas-budget 100000000

Repay

sui client call \
--package 0xe66f07e2a8d9cf793da1e0bca98ff312b3ffba57228d97cf23a0613fddf31b65 \
--module incentive_v2 \
--function entry_repay \
--args 0x06 \
       0x1568865ed9a0b5ec414220e8f79b3d04c77acc82358f6e5ae4635687392ffbef \
       0xbb4e2f4b6205c2e2a2db47aeb4f830796ec7c005f88537ee775986639bc442fe \
       0x96df0fce3c471489f4debaaa762cf960b3d97820bd1f3f025ff8190730e958c5 \
       0 \
       ${YOUR_SUI_COIN_OBJECT} \
	   	 ${REPAY_AMOUNT} \
	   	 0xf87a8acb8b81d14307894d12595541a73f19933f88e1326d5be349c7a6f7559c \
--type-args "0x2::sui::SUI" \
--gas-budget 100000000

Liquidation_call

sui client call \
--package 0xe66f07e2a8d9cf793da1e0bca98ff312b3ffba57228d97cf23a0613fddf31b65 \
--module incentive_v2 \
--function entry_liquidation \
--args 0x06 \
       0x1568865ed9a0b5ec414220e8f79b3d04c77acc82358f6e5ae4635687392ffbef \
       0xbb4e2f4b6205c2e2a2db47aeb4f830796ec7c005f88537ee775986639bc442fe \
       0 \
       0x96df0fce3c471489f4debaaa762cf960b3d97820bd1f3f025ff8190730e958c5 \
       ${YOUR_SUI_COIN_OBJECT} \
       1 \
       0xa02a98f9c88db51c6f5efaaf2261c81f34dd56d86073387e0ef1805ca22e39c8 \
       ${LIQUIDATE_USER_ADDRESS} \
       ${LIQUIDATE_AMOUNT} \
       0xaaf735bf83ff564e1b219a0d644de894ef5bdc4b2250b126b2a46dd002331821 \
       0xf87a8acb8b81d14307894d12595541a73f19933f88e1326d5be349c7a6f7559c \
--type-args "0x2::sui::SUI" "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN" \
--gas-budget 100000000

RPC

To read data from a specific object, it's recommended to use either an RPC call or a block explorer.

Example:

If you want to read a ReserveData object:

  1. First, locate the object ID from the contract address section above.

  2. Alternatively, you can retrieve the data using an RPC call.

sendīŧš
{
	"jsonrpc": "2.0",
	"id": 1,
	"method": "sui_getObject",
	"params": [
		"0xab644b5fd11aa11e930d1c7bc903ef609a9feaf9ffe1b23532ad8441854fbfaf",
		{
			"showType": true,
			"showOwner": true,
			"showPreviousTransaction": true,
			"showDisplay": false,
			"showContent": true,
			"showBcs": false,
			"showStorageRebate": true
		}
	]
}
returnīŧš
{
  "type": "0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::storage::ReserveData",
  "fields": {
    "borrow_balance": {
      "type": "0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::storage::TokenBalance",
      "fields": {
        "total_supply": "3094503595272548",
        "user_state": {
          "type": "0x2::table::Table<address, u256>",
          "fields": {
            "id": {
              "id": "0xe7ff0daa9d090727210abe6a8b6c0c5cd483f3692a10610386e4dc9c57871ba7"
            },
            "size": "27611"
          }
        }
      }
    },
    "borrow_cap_ceiling": "900000000000000000000000000",
    "borrow_rate_factors": {
      "type": "0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::storage::BorrowRateFactors",
      "fields": {
        "base_rate": "0",
        "jump_rate_multiplier": "3000000000000000000000000000",
        "multiplier": "80000000000000000000000000",
        "optimal_utilization": "800000000000000000000000000",
        "reserve_factor": "100000000000000000000000000"
      }
    },
    "coin_type": "0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",
    "current_borrow_index": "1001871331192120137533827403",
    "current_borrow_rate": "29077024305850157392905536",
    "current_supply_index": "1000597811335627575419632960",
    "current_supply_rate": "9511575102933759308012649",
    "id": 0,
    "is_isolated": false,
    "last_update_timestamp": "1693302442763",
    "liquidation_factors": {
      "type": "0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::storage::LiquidationFactors",
      "fields": {
        "bonus": "100000000000000000000000000",
        "ratio": "350000000000000000000000000",
        "threshold": "700000000000000000000000000"
      }
    },
    "ltv": "650000000000000000000000000",
    "oracle_id": 0,
    "reserve_field_a": "0",
    "reserve_field_b": "0",
    "reserve_field_c": "0",
    "supply_balance": {
      "type": "0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::storage::TokenBalance",
      "fields": {
        "total_supply": "8524784709581295",
        "user_state": {
          "type": "0x2::table::Table<address, u256>",
          "fields": {
            "id": {
              "id": "0x589c83af4b035a3bc64c40d9011397b539b97ea47edf7be8f33d643606bf96f8"
            },
            "size": "641554"
          }
        }
      }
    },
    "supply_cap_ceiling": "12000000000000000000000000000000000000000000",
    "treasury_balance": "270738370380",
    "treasury_factor": "100000000000000000000000000"
  }
}

SuiVision-Integration

https://aeolian-feta-345.notion.site/Navi-SuiVision-Integration-cebd26f271514f4c92136c8753f68ee1?pvs=4

Last updated