From 62b37a53bd6dbc8424e93c407ff49acc1cec2fca Mon Sep 17 00:00:00 2001 From: Jarekkkkk <86938582+Jarekkkkk@users.noreply.github.com> Date: Fri, 3 May 2024 20:59:38 +0800 Subject: [PATCH] aded sparkling adapter (#10047) --- projects/sparkling/index.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 projects/sparkling/index.js diff --git a/projects/sparkling/index.js b/projects/sparkling/index.js new file mode 100644 index 000000000000..67bd7be456fd --- /dev/null +++ b/projects/sparkling/index.js @@ -0,0 +1,18 @@ +const ADDRESSES = require("../helper/coreAssets.json"); +const sui = require("../helper/chain/sui"); + +const SPARKLING_SBUCK_FLASK_ID = + "0xc6ecc9731e15d182bc0a46ebe1754a779a4bfb165c201102ad51a36838a1a7b8"; + +async function tvl(api) { + const object = await sui.getObject(SPARKLING_SBUCK_FLASK_ID); + const reserve = object.fields.reserves; + api.add(ADDRESSES.sui.BUCK, reserve); +} + +module.exports = { + timetravel: false, + sui: { + tvl: tvl, + }, +};