{ "source": { "hash": "0xa135116bbbf8fc61ee0777817b706c4960f444c9df80724643bc7d335f60434c", "language": "ink! 5.1.1", "compiler": "rustc 1.91.0", "build_info": { "build_mode": "Release", "cargo_contract_version": "5.0.3", "rust_toolchain": "stable-aarch64-apple-darwin", "wasm_opt_settings": { "keep_debug_symbols": false, "optimization_passes": "Z" } } }, "contract": { "name": "tusdt-vault", "version": "0.1.0", "authors": [ "tensorusd admin@tensorusd.com" ] }, "image": null, "spec": { "constructors": [ { "args": [ { "label": "treasury", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "label": "token_code_hash", "type": { "displayName": [ "Hash" ], "type": 40 } }, { "label": "auction_code_hash", "type": { "displayName": [ "Hash" ], "type": 40 } }, { "label": "oracle_code_hash", "type": { "displayName": [ "Hash" ], "type": 40 } }, { "label": "netuid", "type": { "displayName": [ "u16" ], "type": 41 } } ], "default": false, "docs": [ "Initializes the vault by wiring up the treasury fee recipient and instantiating the", "token, auction, and oracle child contracts.", "", "`treasury` must be a deployed treasury contract address; governance can", "later reassign it via `update_treasury`." ], "label": "new", "payable": false, "returnType": { "displayName": [ "ink_primitives", "ConstructorResult" ], "type": 42 }, "selector": "0x9bae9d5e" } ], "docs": [], "environment": { "accountId": { "displayName": [ "AccountId" ], "type": 0 }, "balance": { "displayName": [ "Balance" ], "type": 4 }, "blockNumber": { "displayName": [ "BlockNumber" ], "type": 6 }, "chainExtension": { "displayName": [ "ChainExtension" ], "type": 72 }, "hash": { "displayName": [ "Hash" ], "type": 40 }, "maxEventTopics": 4, "staticBufferSize": 16384, "timestamp": { "displayName": [ "Timestamp" ], "type": 4 } }, "events": [ { "args": [ { "docs": [], "indexed": true, "label": "auction_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": true, "label": "recipient", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": false, "label": "amount", "type": { "displayName": [ "Balance" ], "type": 4 } } ], "docs": [ "Emitted when the winning bid tokens are transferred out by the controller." ], "label": "WinningBidTransferred", "module_path": "tusdt_auction::auction", "signature_topic": "0x2453946cbe1f6032b08342168446e55733a50984aaed83e6915336a88b93032e" }, { "args": [ { "docs": [], "indexed": true, "label": "previous_governance", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": true, "label": "new_governance", "type": { "displayName": [ "AccountId" ], "type": 0 } } ], "docs": [ "Emitted when auction governance is transferred to a new account." ], "label": "AuctionGovernanceUpdated", "module_path": "tusdt_auction::auction", "signature_topic": "0x650e7dc10cf216636c442ddc7c09760c72b7152d8c3e9e56f48fd38c4ed0e637" }, { "args": [ { "docs": [], "indexed": true, "label": "auction_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": true, "label": "bid_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": true, "label": "bidder", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": false, "label": "amount", "type": { "displayName": [ "Balance" ], "type": 4 } } ], "docs": [ "Emitted when a bid is placed or raised on an auction." ], "label": "BidPlaced", "module_path": "tusdt_auction::auction", "signature_topic": "0x53773ad8dd764d7c2e273caf090006fa7ba6b468938259aa3d27ecd3b9b95f1b" }, { "args": [ { "docs": [], "indexed": true, "label": "admin", "type": { "displayName": [ "Option" ], "type": 66 } } ], "docs": [ "Emitted when the admin account (allowed to bid on expired no-bid auctions) is updated." ], "label": "AdminUpdated", "module_path": "tusdt_auction::auction", "signature_topic": "0xd04478a9ddad3ba01e57d8112d890c26a28aca5c43c35dfb522ed2f0107cf985" }, { "args": [ { "docs": [], "indexed": true, "label": "auction_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": true, "label": "vault_owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": true, "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": false, "label": "starts_at", "type": { "displayName": [ "u64" ], "type": 4 } }, { "docs": [], "indexed": false, "label": "ends_at", "type": { "displayName": [ "u64" ], "type": 4 } } ], "docs": [ "Emitted when a new liquidation auction is created." ], "label": "AuctionCreated", "module_path": "tusdt_auction::auction", "signature_topic": "0x2d6206165e4527a66ee2e32d8b2fe44913914651cdd0fa449efd415b3b697558" }, { "args": [ { "docs": [], "indexed": true, "label": "bidder", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": false, "label": "amount", "type": { "displayName": [ "Balance" ], "type": 4 } } ], "docs": [ "Emitted when a losing bidder withdraws their refund." ], "label": "RefundWithdrawn", "module_path": "tusdt_auction::auction", "signature_topic": "0x6040b9f8282871cf9199cf80cc6df679351435d48bc8743ad81a192b1f665d23" }, { "args": [ { "docs": [], "indexed": true, "label": "auction_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": true, "label": "winner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": false, "label": "highest_bid", "type": { "displayName": [ "Balance" ], "type": 4 } }, { "docs": [], "indexed": false, "label": "debt_balance", "type": { "displayName": [ "Balance" ], "type": 4 } }, { "docs": [], "indexed": false, "label": "highest_bid_metadata", "type": { "displayName": [ "Option" ], "type": 67 } } ], "docs": [ "Emitted when an auction is finalized, identifying the winning bidder." ], "label": "AuctionFinalized", "module_path": "tusdt_auction::auction", "signature_topic": "0x2bb1b99d11a544c4702e6bb53e1eaea4a6f257ac8d2e41b9c747027662fadd53" }, { "args": [ { "docs": [], "indexed": true, "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": true, "label": "spender", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": false, "label": "value", "type": { "displayName": [ "Balance" ], "type": 4 } } ], "docs": [ "Emitted whenever an owner sets or updates a spender's allowance." ], "label": "Approval", "module_path": "tusdt_erc20::tusdt", "signature_topic": "0x1a35e726f5feffda199144f6097b2ba23713e549bfcbe090c0981e3bcdfbcc1d" }, { "args": [ { "docs": [], "indexed": true, "label": "from", "type": { "displayName": [ "Option" ], "type": 66 } }, { "docs": [], "indexed": true, "label": "to", "type": { "displayName": [ "Option" ], "type": 66 } }, { "docs": [], "indexed": false, "label": "value", "type": { "displayName": [ "Balance" ], "type": 4 } } ], "docs": [ "Emitted on token movement; `from = None` denotes a mint, `to = None` denotes a burn." ], "label": "Transfer", "module_path": "tusdt_erc20::tusdt", "signature_topic": "0xb5b61a3e6a21a16be4f044b517c28ac692492f73c5bfd3f60178ad98c767f4cb" }, { "args": [ { "docs": [], "indexed": true, "label": "previous_governance", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": true, "label": "new_governance", "type": { "displayName": [ "AccountId" ], "type": 0 } } ], "docs": [ "Emitted when oracle governance is transferred to a new account." ], "label": "OracleGovernanceUpdated", "module_path": "tusdt_oracle::oracle", "signature_topic": "0x8076edb2c7ad187c70699e83a771437602b58b5145ad1c777bb879abe3f990c8" }, { "args": [ { "docs": [], "indexed": false, "label": "max_price_deviation", "type": { "displayName": [ "Ratio" ], "type": 36 } } ], "docs": [ "Emitted when the maximum allowed price deviation is changed." ], "label": "MaxPriceDeviationUpdated", "module_path": "tusdt_oracle::oracle", "signature_topic": "0xdf92cfe8304a7dfe48998ca021158b2d606b3dd9d86bab86d14c4c2b0d2a2259" }, { "args": [ { "docs": [], "indexed": false, "label": "min_submitter_stake", "type": { "displayName": [ "u128" ], "type": 5 } } ], "docs": [ "Emitted when the minimum required submitter stake is changed." ], "label": "MinSubmitterStakeUpdated", "module_path": "tusdt_oracle::oracle", "signature_topic": "0x862f9b8f733953c288061b3a21bb6955a625374e5f24afe32da33fd31a38aa7f" }, { "args": [ { "docs": [], "indexed": false, "label": "netuid", "type": { "displayName": [ "u16" ], "type": 41 } } ], "docs": [ "Emitted when the governing subnet netuid is updated." ], "label": "NetuidUpdated", "module_path": "tusdt_oracle::oracle", "signature_topic": "0xb62491ff2dec7341b9b30f90adc6a7fcd382e6284c444b7f9622622efbd4aad7" }, { "args": [ { "docs": [], "indexed": true, "label": "round_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": true, "label": "reporter", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": false, "label": "price", "type": { "displayName": [ "Ratio" ], "type": 36 } }, { "docs": [], "indexed": false, "label": "metadata", "type": { "displayName": [ "PriceSubmissionMetadata" ], "type": 69 } }, { "docs": [], "indexed": false, "label": "replaced_existing", "type": { "displayName": [ "bool" ], "type": 3 } } ], "docs": [ "Emitted when a reporter submits (or replaces) a price for the current round." ], "label": "PriceSubmitted", "module_path": "tusdt_oracle::oracle", "signature_topic": "0x497680a9a4c789ade85efa9afe6ea64b9412ae83fe310b3bba847320c2263059" }, { "args": [ { "docs": [], "indexed": true, "label": "round_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": false, "label": "committed_price", "type": { "displayName": [ "Ratio" ], "type": 36 } }, { "docs": [], "indexed": false, "label": "median_price", "type": { "displayName": [ "Ratio" ], "type": 36 } }, { "docs": [], "indexed": false, "label": "reporter_count", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": false, "label": "was_overridden", "type": { "displayName": [ "bool" ], "type": 3 } } ], "docs": [ "Emitted when a round is committed and a new latest price is recorded." ], "label": "RoundCommitted", "module_path": "tusdt_oracle::oracle", "signature_topic": "0xe1b90df25e0fce7ca266a459bd155d63871c00c2f7e4247c092a175ab900c081" }, { "args": [ { "docs": [], "indexed": true, "label": "validator", "type": { "displayName": [ "Option" ], "type": 66 } } ], "docs": [ "Emitted when the validator account is set or cleared." ], "label": "ValidatorUpdated", "module_path": "tusdt_oracle::oracle", "signature_topic": "0x9b9e984a30cbf16f16b8bb47b35802825876301f2562ae285a379d3e2b0cef05" }, { "args": [ { "docs": [], "indexed": true, "label": "previous_governance", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": true, "label": "new_governance", "type": { "displayName": [ "AccountId" ], "type": 0 } } ], "docs": [ "Emitted when governance control is transferred (and propagated to child contracts)." ], "label": "VaultGovernanceUpdated", "module_path": "tusdt_vault::vault", "signature_topic": "0xc2d11add2377baa743dfed4bf31f9ae30757d7ff99e10ac37f07e8c6b0d63c22" }, { "args": [ { "docs": [], "indexed": true, "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": true, "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": true, "label": "auction_id", "type": { "displayName": [ "u32" ], "type": 6 } } ], "docs": [ "Emitted when a liquidation auction is created for an unsafe vault." ], "label": "LiquidationAuctionCreated", "module_path": "tusdt_vault::vault", "signature_topic": "0xd53246a10f6e9922a439d9e370fa637a14f48553f3c65c5e4fdb5f821511aeb3" }, { "args": [ { "docs": [], "indexed": false, "label": "params", "type": { "displayName": [ "VaultContractParamsConfig" ], "type": 39 } } ], "docs": [ "Emitted when a pending parameter update is cancelled by governance." ], "label": "ContractParamsUpdateCancelled", "module_path": "tusdt_vault::vault", "signature_topic": "0xff81451134857c985287b517981bcb3a24bcc4a522c3477732ed64e0824087b2" }, { "args": [ { "docs": [], "indexed": false, "label": "params", "type": { "displayName": [ "VaultContractParamsConfig" ], "type": 39 } }, { "docs": [], "indexed": false, "label": "execute_after", "type": { "displayName": [ "u64" ], "type": 4 } } ], "docs": [ "Emitted when a parameter update is queued behind the timelock." ], "label": "ContractParamsUpdateScheduled", "module_path": "tusdt_vault::vault", "signature_topic": "0x1ca0bcc027e10356f024ee99a38703be52b339d03b38a2597a93665992cc7507" }, { "args": [], "docs": [ "Emitted when the contract is paused." ], "label": "Paused", "module_path": "tusdt_vault::vault", "signature_topic": "0x0bc7e2d93f816c37cebc39f8cd9f6461f8bd945f23b847e07a39e77b4b0c8820" }, { "args": [], "docs": [ "Emitted when the contract is unpaused." ], "label": "Unpaused", "module_path": "tusdt_vault::vault", "signature_topic": "0x653e02ba17d9461415af0142fe0b7aafa9aac6f207b5f1479c13eb1883fc92b0" }, { "args": [ { "docs": [], "indexed": true, "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": true, "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": false, "label": "amount", "type": { "displayName": [ "Balance" ], "type": 4 } }, { "docs": [], "indexed": false, "label": "transaction_fee", "type": { "displayName": [ "Balance" ], "type": 4 } } ], "docs": [ "Emitted when borrowed tUSDT is repaid; fee is paid in addition to the principal repayment." ], "label": "TokensRepaid", "module_path": "tusdt_vault::vault", "signature_topic": "0xe11c88de1af2c4787d5ce47b80816c6ec7b7780637ea93c5d178e116d4a8192f" }, { "args": [ { "docs": [], "indexed": true, "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": true, "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": false, "label": "amount", "type": { "displayName": [ "Balance" ], "type": 4 } } ], "docs": [ "Emitted when a new vault is opened with initial collateral." ], "label": "VaultCreated", "module_path": "tusdt_vault::vault", "signature_topic": "0x13794296202f378ae6aa03f74fb62ebc0d311a18024138e7803c2454c874e0b5" }, { "args": [ { "docs": [], "indexed": true, "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": true, "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": false, "label": "amount", "type": { "displayName": [ "Balance" ], "type": 4 } }, { "docs": [], "indexed": false, "label": "transaction_fee", "type": { "displayName": [ "Balance" ], "type": 4 } } ], "docs": [ "Emitted when tUSDT is borrowed against a vault; `amount` is gross, fee is the treasury cut." ], "label": "TokensBorrowed", "module_path": "tusdt_vault::vault", "signature_topic": "0xd775a1237b32075dc9df9854ae98ebab6cdcd965c2f0ce6ec26b0050345c2956" }, { "args": [ { "docs": [], "indexed": true, "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": true, "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": false, "label": "amount", "type": { "displayName": [ "Balance" ], "type": 4 } } ], "docs": [ "Emitted when collateral is added to an existing vault." ], "label": "CollateralAdded", "module_path": "tusdt_vault::vault", "signature_topic": "0xd2baf654d21478b4b14e965ed7450712fe5e68eca1c409f7d3e5855720c235aa" }, { "args": [ { "docs": [], "indexed": true, "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": true, "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": false, "label": "previous_debt_balance", "type": { "displayName": [ "Balance" ], "type": 4 } }, { "docs": [], "indexed": false, "label": "debt_balance", "type": { "displayName": [ "Balance" ], "type": 4 } }, { "docs": [], "indexed": false, "label": "accrued_at", "type": { "displayName": [ "u64" ], "type": 4 } } ], "docs": [ "Emitted when interest is accrued onto a vault's debt balance." ], "label": "InterestAccrued", "module_path": "tusdt_vault::vault", "signature_topic": "0x9817c420516028890e5664c711e23e8ffd15d13460b1ba1e7b93512b6684dbb1" }, { "args": [ { "docs": [], "indexed": true, "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": true, "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": true, "label": "auction_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": false, "label": "winner", "type": { "displayName": [ "Option" ], "type": 66 } }, { "docs": [], "indexed": false, "label": "winning_bid", "type": { "displayName": [ "Balance" ], "type": 4 } }, { "docs": [], "indexed": false, "label": "collateral_sold", "type": { "displayName": [ "Balance" ], "type": 4 } }, { "docs": [], "indexed": false, "label": "transaction_fee", "type": { "displayName": [ "Balance" ], "type": 4 } }, { "docs": [], "indexed": false, "label": "debt_cleared", "type": { "displayName": [ "Balance" ], "type": 4 } } ], "docs": [ "Emitted when a liquidation auction is settled: collateral leaves the vault and debt is cleared." ], "label": "VaultLiquidated", "module_path": "tusdt_vault::vault", "signature_topic": "0x0f04fc35605f02b23135e50b8a19aa13f9ce70003ec278b3986a4972bdc4b37e" }, { "args": [ { "docs": [], "indexed": true, "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": true, "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "docs": [], "indexed": false, "label": "amount", "type": { "displayName": [ "Balance" ], "type": 4 } } ], "docs": [ "Emitted when collateral is withdrawn from a vault." ], "label": "CollateralReleased", "module_path": "tusdt_vault::vault", "signature_topic": "0x124f623214cb876f7536a45c6f5558a4b3d8dbf610014d1b6b1204f5ccbf4d13" }, { "args": [ { "docs": [], "indexed": true, "label": "recipient", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": false, "label": "amount", "type": { "displayName": [ "Balance" ], "type": 4 } } ], "docs": [ "Emitted when surplus tUSDT held by the vault is claimed to governance." ], "label": "SurplusTusdtClaimed", "module_path": "tusdt_vault::vault", "signature_topic": "0xd968cc90a991bfdee52bb15a281eca58a07b94210cdc1679eb32dd6e2cae9f05" }, { "args": [ { "docs": [], "indexed": true, "label": "previous_platform", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": true, "label": "new_platform", "type": { "displayName": [ "AccountId" ], "type": 0 } } ], "docs": [ "Emitted when the platform account is updated." ], "label": "VaultPlatformUpdated", "module_path": "tusdt_vault::vault", "signature_topic": "0x968c8e8d6f99c403be206758aadc258fd0abf2dc43f439545cb6ab8508461735" }, { "args": [ { "docs": [], "indexed": true, "label": "previous_treasury", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "docs": [], "indexed": true, "label": "new_treasury", "type": { "displayName": [ "AccountId" ], "type": 0 } } ], "docs": [ "Emitted when the treasury (fee recipient) account is updated." ], "label": "VaultTreasuryUpdated", "module_path": "tusdt_vault::vault", "signature_topic": "0xd34584c457f532628ef734e5b447fbc50c4136ba85427857901443728394600f" }, { "args": [ { "docs": [], "indexed": false, "label": "params", "type": { "displayName": [ "VaultContractParamsConfig" ], "type": 39 } } ], "docs": [ "Emitted after a scheduled parameter update is executed and becomes active." ], "label": "ContractParamsUpdated", "module_path": "tusdt_vault::vault", "signature_topic": "0xa79b5918fe7b0b92aec902b9fad42e88974ba00b3bf2b0f09f9282d68e3e2aab" } ], "lang_error": { "displayName": [ "ink", "LangError" ], "type": 43 }, "messages": [ { "args": [ { "label": "params", "type": { "displayName": [ "VaultContractParamsConfig" ], "type": 39 } } ], "default": false, "docs": [ " Schedules a contract parameter update with a fixed timelock; only callable by governance." ], "label": "set_contract_params", "mutates": true, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 44 }, "selector": "0x283617a8" }, { "args": [], "default": false, "docs": [ " Executes the currently scheduled contract parameter update once its timelock has elapsed." ], "label": "execute_contract_params_update", "mutates": true, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 44 }, "selector": "0xec8897e2" }, { "args": [], "default": false, "docs": [ " Cancels the currently scheduled contract parameter update; only callable by governance." ], "label": "cancel_contract_params_update", "mutates": true, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 44 }, "selector": "0xcb1c0e93" }, { "args": [ { "label": "new_governance", "type": { "displayName": [ "AccountId" ], "type": 0 } } ], "default": false, "docs": [ " Transfers vault governance to a new account, propagating the change to the child auction and oracle contracts." ], "label": "update_governance", "mutates": true, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 44 }, "selector": "0xc33c8b6a" }, { "args": [ { "label": "new_treasury", "type": { "displayName": [ "AccountId" ], "type": 0 } } ], "default": false, "docs": [ " Updates the treasury (fee recipient) account; governance-only." ], "label": "update_treasury", "mutates": true, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 44 }, "selector": "0xef6ee141" }, { "args": [ { "label": "new_platform", "type": { "displayName": [ "AccountId" ], "type": 0 } } ], "default": false, "docs": [ " Updates the platform (pause-capable operator) account; callable by governance account" ], "label": "update_platform", "mutates": true, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 44 }, "selector": "0xa59697ab" }, { "args": [], "default": false, "docs": [ " Pauses the contract, blocking user-facing mutations; callable by governance or platform." ], "label": "pause", "mutates": true, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 44 }, "selector": "0x81e0c604" }, { "args": [], "default": false, "docs": [ " Unpauses the contract; governance-only (platform cannot unpause)." ], "label": "unpause", "mutates": true, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 44 }, "selector": "0x67616649" }, { "args": [ { "label": "amount", "type": { "displayName": [ "Balance" ], "type": 4 } } ], "default": false, "docs": [ " Transfers surplus TUSDT held by the vault contract to the treasury.", "", " Permissionless — anyone may sweep accumulated surplus into the treasury, where it will", " be booked across the funds on the next `distribute()` call." ], "label": "claim_surplus_tusdt", "mutates": true, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 44 }, "selector": "0x3b645db8" }, { "args": [], "default": false, "docs": [ " Creates a new vault for the caller with the transferred collateral and returns the vault ID." ], "label": "create_vault", "mutates": true, "payable": true, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 47 }, "selector": "0x17ff6720" }, { "args": [ { "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } } ], "default": false, "docs": [ " Adds the transferred collateral amount to an existing vault." ], "label": "add_collateral", "mutates": true, "payable": true, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 44 }, "selector": "0xe3d1fc1b" }, { "args": [ { "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "label": "amount", "type": { "displayName": [ "Balance" ], "type": 4 } } ], "default": false, "docs": [ " Borrows tokens against the vault's collateral, validating collateral ratio,", " accruing interest, minting the fee portion to the treasury, and sending", " the net borrowed tokens to the caller." ], "label": "borrow_token", "mutates": true, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 44 }, "selector": "0x0976540b" }, { "args": [ { "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "label": "amount", "type": { "displayName": [ "Balance" ], "type": 4 } } ], "default": false, "docs": [ " Repays borrowed tokens from a vault, charging the transaction fee in TUSDT,", " routing accrued interest and the fee to the treasury, and burning only principal net supply." ], "label": "repay_token", "mutates": true, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 44 }, "selector": "0xddbf65cb" }, { "args": [ { "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } } ], "default": false, "docs": [ " Accrues any elapsed interest for a vault and returns the updated debt balance." ], "label": "accrue_interest", "mutates": true, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 49 }, "selector": "0xde62814a" }, { "args": [ { "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } }, { "label": "amount", "type": { "displayName": [ "Balance" ], "type": 4 } } ], "default": false, "docs": [ " Releases collateral from a vault while ensuring the remaining collateral maintains the minimum collateral ratio." ], "label": "release_collateral", "mutates": true, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 44 }, "selector": "0x9ca723e0" }, { "args": [ { "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } } ], "default": false, "docs": [ " Initiates a liquidation auction for an unsafe vault, returning the auction ID if successful." ], "label": "trigger_liquidation_auction", "mutates": true, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 47 }, "selector": "0xec6bd9f2" }, { "args": [ { "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } } ], "default": false, "docs": [ " Settles a finalized liquidation auction, transferring collateral to the winner,", " routing accrued interest to the treasury, and burning only principal.", "", " This remains callable while paused so governance can freeze new mutations without", " trapping already-finalized auction proceeds in the auction contract." ], "label": "settle_liquidation_auction", "mutates": true, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 44 }, "selector": "0x18f62fe6" }, { "args": [ { "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } } ], "default": false, "docs": [ " Retrieves the vault details for a given owner and vault ID." ], "label": "get_vault", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 51 }, "selector": "0x4f96cf6c" }, { "args": [], "default": false, "docs": [ " Returns the account ID of the deployed ERC-20 token contract." ], "label": "get_token_address", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 53 }, "selector": "0xc004fc23" }, { "args": [], "default": false, "docs": [ " Returns the account ID of the deployed auction contract." ], "label": "get_auction_address", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 53 }, "selector": "0x3518b48d" }, { "args": [], "default": false, "docs": [ " Returns the account ID of the oracle contract." ], "label": "get_oracle_address", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 53 }, "selector": "0xdc4c0ffe" }, { "args": [], "default": false, "docs": [ " Returns the current governance account." ], "label": "governance", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 53 }, "selector": "0x9f90cf17" }, { "args": [], "default": false, "docs": [ " Returns the current treasury (fee recipient) account." ], "label": "treasury", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 53 }, "selector": "0xa9b78461" }, { "args": [], "default": false, "docs": [ " Returns the current platform (pause-capable operator) account." ], "label": "platform", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 53 }, "selector": "0x2b86e96a" }, { "args": [], "default": false, "docs": [ " Returns whether the contract is paused by governance." ], "label": "paused", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 54 }, "selector": "0xd8fea916" }, { "args": [], "default": false, "docs": [ " Returns the current contract parameters (collateral ratio, liquidation ratio, interest rate, etc.) in the external config format." ], "label": "get_contract_params", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 55 }, "selector": "0xb89cc086" }, { "args": [], "default": false, "docs": [ " Returns the currently scheduled parameter update, if any." ], "label": "get_pending_contract_params_update", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 56 }, "selector": "0xacf1f313" }, { "args": [ { "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } } ], "default": false, "docs": [ " Returns the collateral balance for a vault, or None if the vault does not exist." ], "label": "get_vault_collateral_balance", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 57 }, "selector": "0x69aef621" }, { "args": [], "default": false, "docs": [ " Returns the total collateral balance across all vaults." ], "label": "get_total_collateral_balance", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 59 }, "selector": "0x3452f0c5" }, { "args": [ { "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } } ], "default": false, "docs": [ " Returns the total borrowed debt across all vaults owned by an account." ], "label": "get_total_debt", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 59 }, "selector": "0x5a81c550" }, { "args": [ { "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } } ], "default": false, "docs": [ " Calculates the token value of a vault's collateral based on the current price ratio." ], "label": "get_vault_collateral_value", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 49 }, "selector": "0x26fc3175" }, { "args": [ { "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } } ], "default": false, "docs": [ " Returns the maximum token amount that can be borrowed against a vault's collateral." ], "label": "get_max_borrow", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 49 }, "selector": "0x378eeec9" }, { "args": [ { "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "label": "vault_id", "type": { "displayName": [ "u32" ], "type": 6 } } ], "default": false, "docs": [ " Returns the auction ID for an active liquidation of a vault, or None if there is no active liquidation." ], "label": "get_liquidation_auction_id", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 60 }, "selector": "0x6109b5e5" }, { "args": [], "default": false, "docs": [ " Returns the total number of vaults created across all owners." ], "label": "get_total_vaults_count", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 62 }, "selector": "0xf5da31f6" }, { "args": [ { "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } } ], "default": false, "docs": [ " Returns the number of vaults owned by a specific account." ], "label": "get_vaults_count", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 62 }, "selector": "0x825fc5ea" }, { "args": [ { "label": "owner", "type": { "displayName": [ "AccountId" ], "type": 0 } }, { "label": "page", "type": { "displayName": [ "u32" ], "type": 6 } } ], "default": false, "docs": [ " Returns a paginated list of vaults owned by a specific account." ], "label": "get_vaults", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 63 }, "selector": "0xfe77349c" }, { "args": [ { "label": "page", "type": { "displayName": [ "u32" ], "type": 6 } } ], "default": false, "docs": [ " Returns a paginated list of all vaults across all owners." ], "label": "get_all_vaults", "mutates": false, "payable": false, "returnType": { "displayName": [ "ink", "MessageResult" ], "type": 63 }, "selector": "0x64ed974f" } ] }, "storage": { "root": { "layout": { "struct": { "fields": [ { "layout": { "leaf": { "key": "0x00000000", "ty": 0 } }, "name": "governance" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 0 } }, "name": "treasury" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 0 } }, "name": "platform" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 3 } }, "name": "paused" }, { "layout": { "struct": { "fields": [ { "layout": { "struct": { "fields": [ { "layout": { "leaf": { "key": "0x00000000", "ty": 0 } }, "name": "account_id" } ], "name": "CallBuilder" } }, "name": "inner" } ], "name": "TusdtErc20Ref" } }, "name": "token" }, { "layout": { "struct": { "fields": [ { "layout": { "struct": { "fields": [ { "layout": { "leaf": { "key": "0x00000000", "ty": 0 } }, "name": "account_id" } ], "name": "CallBuilder" } }, "name": "inner" } ], "name": "TusdtAuctionRef" } }, "name": "auction" }, { "layout": { "struct": { "fields": [ { "layout": { "struct": { "fields": [ { "layout": { "leaf": { "key": "0x00000000", "ty": 0 } }, "name": "account_id" } ], "name": "CallBuilder" } }, "name": "inner" } ], "name": "TusdtOracleRef" } }, "name": "oracle" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 4 } }, "name": "total_collateral_balance" }, { "layout": { "struct": { "fields": [ { "layout": { "struct": { "fields": [ { "layout": { "leaf": { "key": "0x00000000", "ty": 5 } }, "name": "0" } ], "name": "Ratio" } }, "name": "collateral_ratio" }, { "layout": { "struct": { "fields": [ { "layout": { "leaf": { "key": "0x00000000", "ty": 5 } }, "name": "0" } ], "name": "Ratio" } }, "name": "liquidation_ratio" }, { "layout": { "struct": { "fields": [ { "layout": { "leaf": { "key": "0x00000000", "ty": 5 } }, "name": "0" } ], "name": "Ratio" } }, "name": "interest_rate" }, { "layout": { "struct": { "fields": [ { "layout": { "leaf": { "key": "0x00000000", "ty": 5 } }, "name": "0" } ], "name": "Ratio" } }, "name": "liquidation_fee" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 4 } }, "name": "borrow_cap" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 4 } }, "name": "min_vault_collateral" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 4 } }, "name": "max_vault_collateral" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 4 } }, "name": "max_total_collateral" }, { "layout": { "struct": { "fields": [ { "layout": { "leaf": { "key": "0x00000000", "ty": 5 } }, "name": "0" } ], "name": "Ratio" } }, "name": "transaction_fee" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 4 } }, "name": "auction_duration_ms" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 4 } }, "name": "max_oracle_age_ms" } ], "name": "VaultContractParams" } }, "name": "params" }, { "layout": { "enum": { "dispatchKey": "0x00000000", "name": "Option", "variants": { "0": { "fields": [], "name": "None" }, "1": { "fields": [ { "layout": { "struct": { "fields": [ { "layout": { "struct": { "fields": [ { "layout": { "leaf": { "key": "0x00000000", "ty": 6 } }, "name": "collateral_ratio" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 6 } }, "name": "liquidation_ratio" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 6 } }, "name": "interest_rate" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 6 } }, "name": "liquidation_fee" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 4 } }, "name": "borrow_cap" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 4 } }, "name": "min_vault_collateral" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 4 } }, "name": "max_vault_collateral" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 4 } }, "name": "max_total_collateral" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 6 } }, "name": "transaction_fee" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 4 } }, "name": "auction_duration_ms" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 4 } }, "name": "max_oracle_age_ms" } ], "name": "VaultContractParamsConfig" } }, "name": "params" }, { "layout": { "leaf": { "key": "0x00000000", "ty": 4 } }, "name": "execute_after" } ], "name": "PendingContractParamsUpdate" } }, "name": "0" } ], "name": "Some" } } } }, "name": "pending_contract_params_update" }, { "layout": { "root": { "layout": { "struct": { "fields": [ { "layout": { "leaf": { "key": "0x8d337809", "ty": 6 } }, "name": "id" }, { "layout": { "leaf": { "key": "0x8d337809", "ty": 0 } }, "name": "owner" }, { "layout": { "leaf": { "key": "0x8d337809", "ty": 4 } }, "name": "collateral_balance" }, { "layout": { "leaf": { "key": "0x8d337809", "ty": 4 } }, "name": "borrowed_token_balance" }, { "layout": { "leaf": { "key": "0x8d337809", "ty": 4 } }, "name": "debt_balance" }, { "layout": { "leaf": { "key": "0x8d337809", "ty": 4 } }, "name": "total_interest_accrued" }, { "layout": { "leaf": { "key": "0x8d337809", "ty": 4 } }, "name": "created_at" }, { "layout": { "leaf": { "key": "0x8d337809", "ty": 4 } }, "name": "last_interest_accrued_at" } ], "name": "Vault" } }, "root_key": "0x8d337809", "ty": 7 } }, "name": "vaults" }, { "layout": { "root": { "layout": { "leaf": { "key": "0x549024c7", "ty": 4 } }, "root_key": "0x549024c7", "ty": 14 } }, "name": "owner_total_debt" }, { "layout": { "root": { "layout": { "leaf": { "key": "0x18064f72", "ty": 6 } }, "root_key": "0x18064f72", "ty": 17 } }, "name": "vault_count" }, { "layout": { "root": { "layout": { "struct": { "fields": [ { "layout": { "leaf": { "key": "0xf9cff1e3", "ty": 0 } }, "name": "0" }, { "layout": { "leaf": { "key": "0xf9cff1e3", "ty": 6 } }, "name": "1" } ], "name": "(A, B)" } }, "root_key": "0xf9cff1e3", "ty": 20 } }, "name": "vault_keys" }, { "layout": { "root": { "layout": { "leaf": { "key": "0xeece564d", "ty": 6 } }, "root_key": "0xeece564d", "ty": 25 } }, "name": "liquidation_auctions" } ], "name": "TusdtVault" } }, "root_key": "0x00000000", "ty": 28 } }, "types": [ { "id": 0, "type": { "def": { "composite": { "fields": [ { "type": 1, "typeName": "[u8; 32]" } ] } }, "path": [ "ink_primitives", "types", "AccountId" ] } }, { "id": 1, "type": { "def": { "array": { "len": 32, "type": 2 } } } }, { "id": 2, "type": { "def": { "primitive": "u8" } } }, { "id": 3, "type": { "def": { "primitive": "bool" } } }, { "id": 4, "type": { "def": { "primitive": "u64" } } }, { "id": 5, "type": { "def": { "primitive": "u128" } } }, { "id": 6, "type": { "def": { "primitive": "u32" } } }, { "id": 7, "type": { "def": { "composite": {} }, "params": [ { "name": "K", "type": 8 }, { "name": "V", "type": 9 }, { "name": "KeyType", "type": 10 } ], "path": [ "ink_storage", "lazy", "mapping", "Mapping" ] } }, { "id": 8, "type": { "def": { "tuple": [ 0, 6 ] } } }, { "id": 9, "type": { "def": { "composite": { "fields": [ { "name": "id", "type": 6, "typeName": "u32" }, { "name": "owner", "type": 0, "typeName": "AccountId" }, { "name": "collateral_balance", "type": 4, "typeName": "Balance" }, { "name": "borrowed_token_balance", "type": 4, "typeName": "Balance" }, { "name": "debt_balance", "type": 4, "typeName": "Balance" }, { "name": "total_interest_accrued", "type": 4, "typeName": "Balance" }, { "name": "created_at", "type": 4, "typeName": "u64" }, { "name": "last_interest_accrued_at", "type": 4, "typeName": "u64" } ] } }, "path": [ "tusdt_vault", "vault", "Vault" ] } }, { "id": 10, "type": { "def": { "composite": {} }, "params": [ { "name": "L", "type": 11 }, { "name": "R", "type": 12 } ], "path": [ "ink_storage_traits", "impls", "ResolverKey" ] } }, { "id": 11, "type": { "def": { "composite": {} }, "path": [ "ink_storage_traits", "impls", "AutoKey" ] } }, { "id": 12, "type": { "def": { "composite": {} }, "params": [ { "name": "ParentKey", "type": 13 } ], "path": [ "ink_storage_traits", "impls", "ManualKey" ] } }, { "id": 13, "type": { "def": { "tuple": [] } } }, { "id": 14, "type": { "def": { "composite": {} }, "params": [ { "name": "K", "type": 0 }, { "name": "V", "type": 4 }, { "name": "KeyType", "type": 15 } ], "path": [ "ink_storage", "lazy", "mapping", "Mapping" ] } }, { "id": 15, "type": { "def": { "composite": {} }, "params": [ { "name": "L", "type": 11 }, { "name": "R", "type": 16 } ], "path": [ "ink_storage_traits", "impls", "ResolverKey" ] } }, { "id": 16, "type": { "def": { "composite": {} }, "params": [ { "name": "ParentKey", "type": 13 } ], "path": [ "ink_storage_traits", "impls", "ManualKey" ] } }, { "id": 17, "type": { "def": { "composite": {} }, "params": [ { "name": "K", "type": 0 }, { "name": "V", "type": 6 }, { "name": "KeyType", "type": 18 } ], "path": [ "ink_storage", "lazy", "mapping", "Mapping" ] } }, { "id": 18, "type": { "def": { "composite": {} }, "params": [ { "name": "L", "type": 11 }, { "name": "R", "type": 19 } ], "path": [ "ink_storage_traits", "impls", "ResolverKey" ] } }, { "id": 19, "type": { "def": { "composite": {} }, "params": [ { "name": "ParentKey", "type": 13 } ], "path": [ "ink_storage_traits", "impls", "ManualKey" ] } }, { "id": 20, "type": { "def": { "composite": { "fields": [ { "name": "len", "type": 23, "typeName": "Lazy" }, { "name": "elements", "type": 24, "typeName": "Mapping" } ] } }, "params": [ { "name": "V", "type": 8 }, { "name": "KeyType", "type": 21 } ], "path": [ "ink_storage", "lazy", "vec", "StorageVec" ] } }, { "id": 21, "type": { "def": { "composite": {} }, "params": [ { "name": "L", "type": 11 }, { "name": "R", "type": 22 } ], "path": [ "ink_storage_traits", "impls", "ResolverKey" ] } }, { "id": 22, "type": { "def": { "composite": {} }, "params": [ { "name": "ParentKey", "type": 13 } ], "path": [ "ink_storage_traits", "impls", "ManualKey" ] } }, { "id": 23, "type": { "def": { "composite": {} }, "params": [ { "name": "V", "type": 6 }, { "name": "KeyType", "type": 21 } ], "path": [ "ink_storage", "lazy", "Lazy" ] } }, { "id": 24, "type": { "def": { "composite": {} }, "params": [ { "name": "K", "type": 6 }, { "name": "V", "type": 8 }, { "name": "KeyType", "type": 21 } ], "path": [ "ink_storage", "lazy", "mapping", "Mapping" ] } }, { "id": 25, "type": { "def": { "composite": {} }, "params": [ { "name": "K", "type": 8 }, { "name": "V", "type": 6 }, { "name": "KeyType", "type": 26 } ], "path": [ "ink_storage", "lazy", "mapping", "Mapping" ] } }, { "id": 26, "type": { "def": { "composite": {} }, "params": [ { "name": "L", "type": 11 }, { "name": "R", "type": 27 } ], "path": [ "ink_storage_traits", "impls", "ResolverKey" ] } }, { "id": 27, "type": { "def": { "composite": {} }, "params": [ { "name": "ParentKey", "type": 13 } ], "path": [ "ink_storage_traits", "impls", "ManualKey" ] } }, { "id": 28, "type": { "def": { "composite": { "fields": [ { "name": "governance", "type": 0, "typeName": ",>>::Type" }, { "name": "treasury", "type": 0, "typeName": ",>>::Type" }, { "name": "platform", "type": 0, "typeName": ",>>::Type" }, { "name": "paused", "type": 3, "typeName": ",>>::Type" }, { "name": "token", "type": 29, "typeName": ",>>::Type" }, { "name": "auction", "type": 31, "typeName": ",>>::Type" }, { "name": "oracle", "type": 33, "typeName": ",>>::Type" }, { "name": "total_collateral_balance", "type": 4, "typeName": ",>>::Type" }, { "name": "params", "type": 35, "typeName": ",>>::Type" }, { "name": "pending_contract_params_update", "type": 37, "typeName": " as::ink::storage::traits::\nAutoStorableHint<::ink::storage::traits::ManualKey<1461587648u32,\n()>,>>::Type" }, { "name": "vaults", "type": 7, "typeName": " as::ink::storage::traits::\nAutoStorableHint<::ink::storage::traits::ManualKey<158872461u32, ()\n>,>>::Type" }, { "name": "owner_total_debt", "type": 14, "typeName": " as::ink::storage::traits::\nAutoStorableHint<::ink::storage::traits::ManualKey<3341062228u32,\n()>,>>::Type" }, { "name": "vault_count", "type": 17, "typeName": " as::ink::storage::traits::\nAutoStorableHint<::ink::storage::traits::ManualKey<1917781528u32,\n()>,>>::Type" }, { "name": "vault_keys", "type": 20, "typeName": " as::ink::storage::traits::\nAutoStorableHint<::ink::storage::traits::ManualKey<3824275449u32,\n()>,>>::Type" }, { "name": "liquidation_auctions", "type": 25, "typeName": " as::ink::storage::traits::\nAutoStorableHint<::ink::storage::traits::ManualKey<1297534702u32,\n()>,>>::Type" } ] } }, "path": [ "tusdt_vault", "vault", "TusdtVault" ] } }, { "id": 29, "type": { "def": { "composite": { "fields": [ { "name": "inner", "type": 30, "typeName": "::Type" } ] } }, "path": [ "tusdt_erc20", "tusdt", "TusdtErc20Ref" ] } }, { "id": 30, "type": { "def": { "composite": { "fields": [ { "name": "account_id", "type": 0, "typeName": "AccountId" } ] } }, "path": [ "tusdt_erc20", "tusdt", "CallBuilder" ] } }, { "id": 31, "type": { "def": { "composite": { "fields": [ { "name": "inner", "type": 32, "typeName": "::Type" } ] } }, "path": [ "tusdt_auction", "auction", "TusdtAuctionRef" ] } }, { "id": 32, "type": { "def": { "composite": { "fields": [ { "name": "account_id", "type": 0, "typeName": "AccountId" } ] } }, "path": [ "tusdt_auction", "auction", "CallBuilder" ] } }, { "id": 33, "type": { "def": { "composite": { "fields": [ { "name": "inner", "type": 34, "typeName": "::Type" } ] } }, "path": [ "tusdt_oracle", "oracle", "TusdtOracleRef" ] } }, { "id": 34, "type": { "def": { "composite": { "fields": [ { "name": "account_id", "type": 0, "typeName": "AccountId" } ] } }, "path": [ "tusdt_oracle", "oracle", "CallBuilder" ] } }, { "id": 35, "type": { "def": { "composite": { "fields": [ { "name": "collateral_ratio", "type": 36, "typeName": "Ratio" }, { "name": "liquidation_ratio", "type": 36, "typeName": "Ratio" }, { "name": "interest_rate", "type": 36, "typeName": "Ratio" }, { "name": "liquidation_fee", "type": 36, "typeName": "Ratio" }, { "name": "borrow_cap", "type": 4, "typeName": "Balance" }, { "name": "min_vault_collateral", "type": 4, "typeName": "Balance" }, { "name": "max_vault_collateral", "type": 4, "typeName": "Balance" }, { "name": "max_total_collateral", "type": 4, "typeName": "Balance" }, { "name": "transaction_fee", "type": 36, "typeName": "Ratio" }, { "name": "auction_duration_ms", "type": 4, "typeName": "u64" }, { "name": "max_oracle_age_ms", "type": 4, "typeName": "u64" } ] } }, "path": [ "tusdt_vault", "vault", "VaultContractParams" ] } }, { "id": 36, "type": { "def": { "composite": { "fields": [ { "type": 5, "typeName": "u128" } ] } }, "path": [ "tusdt_primitives", "Ratio" ] } }, { "id": 37, "type": { "def": { "variant": { "variants": [ { "index": 0, "name": "None" }, { "fields": [ { "type": 38 } ], "index": 1, "name": "Some" } ] } }, "params": [ { "name": "T", "type": 38 } ], "path": [ "Option" ] } }, { "id": 38, "type": { "def": { "composite": { "fields": [ { "name": "params", "type": 39, "typeName": "VaultContractParamsConfig" }, { "name": "execute_after", "type": 4, "typeName": "u64" } ] } }, "path": [ "tusdt_vault", "vault", "PendingContractParamsUpdate" ] } }, { "id": 39, "type": { "def": { "composite": { "fields": [ { "name": "collateral_ratio", "type": 6, "typeName": "u32" }, { "name": "liquidation_ratio", "type": 6, "typeName": "u32" }, { "name": "interest_rate", "type": 6, "typeName": "u32" }, { "name": "liquidation_fee", "type": 6, "typeName": "u32" }, { "name": "borrow_cap", "type": 4, "typeName": "Balance" }, { "name": "min_vault_collateral", "type": 4, "typeName": "Balance" }, { "name": "max_vault_collateral", "type": 4, "typeName": "Balance" }, { "name": "max_total_collateral", "type": 4, "typeName": "Balance" }, { "name": "transaction_fee", "type": 6, "typeName": "u32" }, { "name": "auction_duration_ms", "type": 4, "typeName": "u64" }, { "name": "max_oracle_age_ms", "type": 4, "typeName": "u64" } ] } }, "path": [ "tusdt_vault", "vault", "VaultContractParamsConfig" ] } }, { "id": 40, "type": { "def": { "composite": { "fields": [ { "type": 1, "typeName": "[u8; 32]" } ] } }, "path": [ "ink_primitives", "types", "Hash" ] } }, { "id": 41, "type": { "def": { "primitive": "u16" } } }, { "id": 42, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 13 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 43 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 13 }, { "name": "E", "type": 43 } ], "path": [ "Result" ] } }, { "id": 43, "type": { "def": { "variant": { "variants": [ { "index": 1, "name": "CouldNotReadInput" } ] } }, "path": [ "ink_primitives", "LangError" ] } }, { "id": 44, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 45 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 43 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 45 }, { "name": "E", "type": 43 } ], "path": [ "Result" ] } }, { "id": 45, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 13 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 46 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 13 }, { "name": "E", "type": 46 } ], "path": [ "Result" ] } }, { "id": 46, "type": { "def": { "variant": { "variants": [ { "index": 0, "name": "VaultNotFound" }, { "index": 1, "name": "InsufficientCollateral" }, { "index": 2, "name": "CollateralCapExceeded" }, { "index": 3, "name": "NotVaultOwner" }, { "index": 4, "name": "TransferFailed" }, { "index": 5, "name": "InsufficientTokenBalance" }, { "index": 6, "name": "InvalidTransactionFee" }, { "index": 7, "name": "TokenBorrowedNotZero" }, { "index": 8, "name": "InvalidRatio" }, { "index": 9, "name": "InvalidAuctionDuration" }, { "index": 10, "name": "CollateralRatioExceeded" }, { "index": 11, "name": "LiquidationRatioExceeded" }, { "index": 12, "name": "BorrowCapExceeded" }, { "index": 13, "name": "RepayAmountTooHigh" }, { "index": 14, "name": "VaultInLiquidation" }, { "index": 15, "name": "NotLiquidatable" }, { "index": 16, "name": "LiquidationAuctionExists" }, { "index": 17, "name": "AuctionContractCallFailed" }, { "index": 18, "name": "AuctionNotFound" }, { "index": 19, "name": "AuctionNotFinalized" }, { "index": 20, "name": "ArithmeticError" }, { "index": 21, "name": "NotGovernance" }, { "index": 22, "name": "NotGovernanceOrPlatform" }, { "index": 23, "name": "ContractPaused" }, { "index": 24, "name": "OracleCallFailed" }, { "index": 25, "name": "OraclePriceUnavailable" }, { "index": 26, "name": "OraclePriceStale" }, { "index": 27, "name": "InvalidOracleMaxAge" }, { "index": 28, "name": "NoPendingContractParamsUpdate" }, { "index": 29, "name": "ContractParamsUpdateTimelockActive" } ] } }, "path": [ "tusdt_vault", "vault", "Error" ] } }, { "id": 47, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 48 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 43 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 48 }, { "name": "E", "type": 43 } ], "path": [ "Result" ] } }, { "id": 48, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 6 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 46 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 6 }, { "name": "E", "type": 46 } ], "path": [ "Result" ] } }, { "id": 49, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 50 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 43 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 50 }, { "name": "E", "type": 43 } ], "path": [ "Result" ] } }, { "id": 50, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 4 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 46 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 4 }, { "name": "E", "type": 46 } ], "path": [ "Result" ] } }, { "id": 51, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 52 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 43 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 52 }, { "name": "E", "type": 43 } ], "path": [ "Result" ] } }, { "id": 52, "type": { "def": { "variant": { "variants": [ { "index": 0, "name": "None" }, { "fields": [ { "type": 9 } ], "index": 1, "name": "Some" } ] } }, "params": [ { "name": "T", "type": 9 } ], "path": [ "Option" ] } }, { "id": 53, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 0 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 43 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 0 }, { "name": "E", "type": 43 } ], "path": [ "Result" ] } }, { "id": 54, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 3 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 43 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 3 }, { "name": "E", "type": 43 } ], "path": [ "Result" ] } }, { "id": 55, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 39 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 43 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 39 }, { "name": "E", "type": 43 } ], "path": [ "Result" ] } }, { "id": 56, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 37 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 43 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 37 }, { "name": "E", "type": 43 } ], "path": [ "Result" ] } }, { "id": 57, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 58 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 43 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 58 }, { "name": "E", "type": 43 } ], "path": [ "Result" ] } }, { "id": 58, "type": { "def": { "variant": { "variants": [ { "index": 0, "name": "None" }, { "fields": [ { "type": 4 } ], "index": 1, "name": "Some" } ] } }, "params": [ { "name": "T", "type": 4 } ], "path": [ "Option" ] } }, { "id": 59, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 4 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 43 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 4 }, { "name": "E", "type": 43 } ], "path": [ "Result" ] } }, { "id": 60, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 61 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 43 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 61 }, { "name": "E", "type": 43 } ], "path": [ "Result" ] } }, { "id": 61, "type": { "def": { "variant": { "variants": [ { "index": 0, "name": "None" }, { "fields": [ { "type": 6 } ], "index": 1, "name": "Some" } ] } }, "params": [ { "name": "T", "type": 6 } ], "path": [ "Option" ] } }, { "id": 62, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 6 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 43 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 6 }, { "name": "E", "type": 43 } ], "path": [ "Result" ] } }, { "id": 63, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 64 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 43 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 64 }, { "name": "E", "type": 43 } ], "path": [ "Result" ] } }, { "id": 64, "type": { "def": { "variant": { "variants": [ { "fields": [ { "type": 65 } ], "index": 0, "name": "Ok" }, { "fields": [ { "type": 46 } ], "index": 1, "name": "Err" } ] } }, "params": [ { "name": "T", "type": 65 }, { "name": "E", "type": 46 } ], "path": [ "Result" ] } }, { "id": 65, "type": { "def": { "sequence": { "type": 9 } } } }, { "id": 66, "type": { "def": { "variant": { "variants": [ { "index": 0, "name": "None" }, { "fields": [ { "type": 0 } ], "index": 1, "name": "Some" } ] } }, "params": [ { "name": "T", "type": 0 } ], "path": [ "Option" ] } }, { "id": 67, "type": { "def": { "variant": { "variants": [ { "index": 0, "name": "None" }, { "fields": [ { "type": 68 } ], "index": 1, "name": "Some" } ] } }, "params": [ { "name": "T", "type": 68 } ], "path": [ "Option" ] } }, { "id": 68, "type": { "def": { "composite": { "fields": [ { "name": "hot_key", "type": 0, "typeName": "AccountId" } ] } }, "path": [ "tusdt_auction", "auction", "BidMetadata" ] } }, { "id": 69, "type": { "def": { "composite": { "fields": [ { "name": "hot_key", "type": 0, "typeName": "AccountId" }, { "name": "provider", "type": 70, "typeName": "Option>" } ] } }, "path": [ "tusdt_oracle", "oracle", "PriceSubmissionMetadata" ] } }, { "id": 70, "type": { "def": { "variant": { "variants": [ { "index": 0, "name": "None" }, { "fields": [ { "type": 71 } ], "index": 1, "name": "Some" } ] } }, "params": [ { "name": "T", "type": 71 } ], "path": [ "Option" ] } }, { "id": 71, "type": { "def": { "sequence": { "type": 2 } } } }, { "id": 72, "type": { "def": { "variant": {} }, "path": [ "tusdt_env", "RuntimeReadWrite" ] } } ], "version": 5 }