feat: add derives mapping and spec records for testnet-interlay and testnet-kintsugi (#8000)

This commit is contained in:
Brendon Votteler 2022-08-16 21:15:15 +10:00 committed by GitHub
parent f7d0344e79
commit 8bd167f287
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 673 additions and 1 deletions

View File

@ -11,7 +11,7 @@ import subspace from './spec/subspace';
const mapping: [OverrideBundleDefinition, string[]][] = [
[equilibrium, ['Equilibrium']],
[genshiro, ['Genshiro', 'Genshiro Rococo Testnet']],
[interbtc, ['interbtc-parachain', 'interbtc-standalone', 'interlay-parachain', 'kintsugi-parachain']],
[interbtc, ['interbtc-parachain', 'interbtc-standalone', 'interlay-parachain', 'kintsugi-parachain', 'testnet-kintsugi', 'testnet-interlay']],
[subspace, ['subspace']]
];

View File

@ -264,6 +264,8 @@ const spec: Record<string, OverrideBundleDefinition> = {
swapdex,
t0rn,
ternoa,
'testnet-interlay': interbtc,
'testnet-kintsugi': interbtc,
trustbase,
turing,
uart,

View File

@ -66824,6 +66824,676 @@ export const typesBundle = {
}
]
},
"testnet-interlay": {
"types": [
{
"minmax": [
0,
null
],
"types": {
"BalanceWrapper": {
"amount": "String"
},
"CurrencyId": {
"_enum": {
"Token": "TokenSymbol",
"ForeignAsset": "ForeignAssetId"
}
},
"InterbtcPrimitivesCurrencyId": {
"_enum": {
"Token": "InterbtcPrimitivesTokenSymbol",
"ForeignAsset": "InterbtcForeignAssetId"
}
},
"InterbtcForeignAssetId": "u32",
"ForeignAssetId": "u32",
"FundAccountJsonRpcRequest": {
"account_id": "AccountId",
"currency_id": "InterbtcPrimitivesCurrencyId"
},
"H256Le": "H256",
"SignedFixedPoint": "FixedU128",
"TokenSymbol": {
"_enum": {
"DOT": 0,
"IBTC": 1,
"INTR": 2,
"KSM": 10,
"KBTC": 11,
"KINT": 12
}
},
"InterbtcPrimitivesTokenSymbol": {
"_enum": {
"DOT": 0,
"IBTC": 1,
"INTR": 2,
"KSM": 10,
"KBTC": 11,
"KINT": 12
}
},
"UnsignedFixedPoint": "FixedU128",
"VaultCurrencyPair": {
"collateral": "CurrencyId",
"wrapped": "CurrencyId"
},
"VaultId": {
"account_id": "AccountId",
"currencies": "VaultCurrencyPair"
}
}
}
],
"rpc": {
"btcRelay": {
"verifyBlockHeaderInclusion": {
"description": "Verify that the block with the given hash is included",
"params": [
{
"name": "block_hash",
"type": "H256Le"
}
],
"type": "void"
}
},
"issue": {
"getIssueRequests": {
"description": "Get all issue request IDs for a particular account",
"params": [
{
"name": "account_id",
"type": "AccountId"
}
],
"type": "Vec<H256>"
},
"getVaultIssueRequests": {
"description": "Get all issue request IDs for a particular vault",
"params": [
{
"name": "vault_id",
"type": "AccountId"
}
],
"type": "Vec<H256>"
}
},
"oracle": {
"collateralToWrapped": {
"description": "Collateral to Wrapped exchange rate",
"params": [
{
"name": "amount",
"type": "BalanceWrapper"
},
{
"name": "currency_id",
"type": "CurrencyId"
}
],
"type": "BalanceWrapper"
},
"wrappedToCollateral": {
"description": "Wrapped to Collateral exchange rate",
"params": [
{
"name": "amount",
"type": "BalanceWrapper"
},
{
"name": "currency_id",
"type": "CurrencyId"
}
],
"type": "BalanceWrapper"
}
},
"redeem": {
"getRedeemRequests": {
"description": "Get all redeem request IDs for a particular account",
"params": [
{
"name": "account_id",
"type": "AccountId"
}
],
"type": "Vec<H256>"
},
"getVaultRedeemRequests": {
"description": "Get all redeem request IDs for a particular vault",
"params": [
{
"name": "vault_id",
"type": "AccountId"
}
],
"type": "Vec<H256>"
}
},
"refund": {
"getRefundRequests": {
"description": "Get all refund request IDs for a particular account",
"params": [
{
"name": "account_id",
"type": "AccountId"
}
],
"type": "Vec<H256>"
},
"getRefundRequestsByIssueId": {
"description": "Get all refund request IDs for a particular issue ID",
"params": [
{
"name": "issue_id",
"type": "H256"
}
],
"type": "H256"
},
"getVaultRefundRequests": {
"description": "Get all refund request IDs for a particular vault",
"params": [
{
"name": "account_id",
"type": "AccountId"
}
],
"type": "Vec<H256>"
}
},
"replace": {
"getNewVaultReplaceRequests": {
"description": "Get all replace request IDs to a particular vault",
"params": [
{
"name": "account_id",
"type": "AccountId"
}
],
"type": "Vec<H256>"
},
"getOldVaultReplaceRequests": {
"description": "Get all replace request IDs from a particular vault",
"params": [
{
"name": "account_id",
"type": "AccountId"
}
],
"type": "Vec<H256>"
}
},
"vaultRegistry": {
"getCollateralizationFromVault": {
"description": "Returns the collateralization of a specific vault",
"params": [
{
"name": "vault",
"type": "VaultId"
},
{
"name": "only_issued",
"type": "bool"
}
],
"type": "UnsignedFixedPoint"
},
"getCollateralizationFromVaultAndCollateral": {
"description": "Returns the collateralization of a specific vault and collateral",
"params": [
{
"name": "vault",
"type": "VaultId"
},
{
"name": "collateral",
"type": "BalanceWrapper"
},
{
"name": "only_issued",
"type": "bool"
}
],
"type": "UnsignedFixedPoint"
},
"getIssueableTokensFromVault": {
"description": "Get the amount of tokens a vault can issue",
"params": [
{
"name": "vault",
"type": "VaultId"
}
],
"type": "BalanceWrapper"
},
"getPremiumRedeemVaults": {
"description": "Get all vaults below the premium redeem threshold.",
"params": [],
"type": "Vec<(VaultId, BalanceWrapper)>"
},
"getRequiredCollateralForVault": {
"description": "Get the amount of collateral required for the given vault to be at the current SecureCollateralThreshold with the current exchange rate",
"params": [
{
"name": "vault_id",
"type": "VaultId"
}
],
"type": "BalanceWrapper"
},
"getRequiredCollateralForWrapped": {
"description": "Get the amount of collateral required to issue an amount of InterBTC",
"params": [
{
"name": "amount_btc",
"type": "BalanceWrapper"
},
{
"name": "currency_id",
"type": "CurrencyId"
}
],
"type": "BalanceWrapper"
},
"getVaultCollateral": {
"description": "Get the vault's collateral (excluding nomination)",
"params": [
{
"name": "vault_id",
"type": "VaultId"
}
],
"type": "BalanceWrapper"
},
"getVaultTotalCollateral": {
"description": "Get the vault's collateral (including nomination)",
"params": [
{
"name": "vault_id",
"type": "VaultId"
}
],
"type": "BalanceWrapper"
},
"getVaultsByAccountId": {
"description": "Get all vaults that are registered using the given account _id",
"params": [
{
"name": "account_id",
"type": "AccountId"
}
],
"type": "Vec<VaultId>"
},
"getVaultsWithIssuableTokens": {
"description": "Get all vaults with non-zero issuable tokens, ordered in descending order of this amount",
"params": [],
"type": "Vec<(VaultId, BalanceWrapper)>"
},
"getVaultsWithRedeemableTokens": {
"description": "Get all vaults with non-zero redeemable tokens, ordered in descending order of this amount",
"params": [],
"type": "Vec<(VaultId, BalanceWrapper)>"
}
}
},
"alias": {
"tokens": {
"AccountData": "OrmlAccountData",
"BalanceLock": "OrmlBalanceLock"
}
},
"instances": {
"balances": [
"ksm",
"kbtc",
"kint",
"dot",
"ibtc",
"intr"
]
}
},
"testnet-kintsugi": {
"types": [
{
"minmax": [
0,
null
],
"types": {
"BalanceWrapper": {
"amount": "String"
},
"CurrencyId": {
"_enum": {
"Token": "TokenSymbol",
"ForeignAsset": "ForeignAssetId"
}
},
"InterbtcPrimitivesCurrencyId": {
"_enum": {
"Token": "InterbtcPrimitivesTokenSymbol",
"ForeignAsset": "InterbtcForeignAssetId"
}
},
"InterbtcForeignAssetId": "u32",
"ForeignAssetId": "u32",
"FundAccountJsonRpcRequest": {
"account_id": "AccountId",
"currency_id": "InterbtcPrimitivesCurrencyId"
},
"H256Le": "H256",
"SignedFixedPoint": "FixedU128",
"TokenSymbol": {
"_enum": {
"DOT": 0,
"IBTC": 1,
"INTR": 2,
"KSM": 10,
"KBTC": 11,
"KINT": 12
}
},
"InterbtcPrimitivesTokenSymbol": {
"_enum": {
"DOT": 0,
"IBTC": 1,
"INTR": 2,
"KSM": 10,
"KBTC": 11,
"KINT": 12
}
},
"UnsignedFixedPoint": "FixedU128",
"VaultCurrencyPair": {
"collateral": "CurrencyId",
"wrapped": "CurrencyId"
},
"VaultId": {
"account_id": "AccountId",
"currencies": "VaultCurrencyPair"
}
}
}
],
"rpc": {
"btcRelay": {
"verifyBlockHeaderInclusion": {
"description": "Verify that the block with the given hash is included",
"params": [
{
"name": "block_hash",
"type": "H256Le"
}
],
"type": "void"
}
},
"issue": {
"getIssueRequests": {
"description": "Get all issue request IDs for a particular account",
"params": [
{
"name": "account_id",
"type": "AccountId"
}
],
"type": "Vec<H256>"
},
"getVaultIssueRequests": {
"description": "Get all issue request IDs for a particular vault",
"params": [
{
"name": "vault_id",
"type": "AccountId"
}
],
"type": "Vec<H256>"
}
},
"oracle": {
"collateralToWrapped": {
"description": "Collateral to Wrapped exchange rate",
"params": [
{
"name": "amount",
"type": "BalanceWrapper"
},
{
"name": "currency_id",
"type": "CurrencyId"
}
],
"type": "BalanceWrapper"
},
"wrappedToCollateral": {
"description": "Wrapped to Collateral exchange rate",
"params": [
{
"name": "amount",
"type": "BalanceWrapper"
},
{
"name": "currency_id",
"type": "CurrencyId"
}
],
"type": "BalanceWrapper"
}
},
"redeem": {
"getRedeemRequests": {
"description": "Get all redeem request IDs for a particular account",
"params": [
{
"name": "account_id",
"type": "AccountId"
}
],
"type": "Vec<H256>"
},
"getVaultRedeemRequests": {
"description": "Get all redeem request IDs for a particular vault",
"params": [
{
"name": "vault_id",
"type": "AccountId"
}
],
"type": "Vec<H256>"
}
},
"refund": {
"getRefundRequests": {
"description": "Get all refund request IDs for a particular account",
"params": [
{
"name": "account_id",
"type": "AccountId"
}
],
"type": "Vec<H256>"
},
"getRefundRequestsByIssueId": {
"description": "Get all refund request IDs for a particular issue ID",
"params": [
{
"name": "issue_id",
"type": "H256"
}
],
"type": "H256"
},
"getVaultRefundRequests": {
"description": "Get all refund request IDs for a particular vault",
"params": [
{
"name": "account_id",
"type": "AccountId"
}
],
"type": "Vec<H256>"
}
},
"replace": {
"getNewVaultReplaceRequests": {
"description": "Get all replace request IDs to a particular vault",
"params": [
{
"name": "account_id",
"type": "AccountId"
}
],
"type": "Vec<H256>"
},
"getOldVaultReplaceRequests": {
"description": "Get all replace request IDs from a particular vault",
"params": [
{
"name": "account_id",
"type": "AccountId"
}
],
"type": "Vec<H256>"
}
},
"vaultRegistry": {
"getCollateralizationFromVault": {
"description": "Returns the collateralization of a specific vault",
"params": [
{
"name": "vault",
"type": "VaultId"
},
{
"name": "only_issued",
"type": "bool"
}
],
"type": "UnsignedFixedPoint"
},
"getCollateralizationFromVaultAndCollateral": {
"description": "Returns the collateralization of a specific vault and collateral",
"params": [
{
"name": "vault",
"type": "VaultId"
},
{
"name": "collateral",
"type": "BalanceWrapper"
},
{
"name": "only_issued",
"type": "bool"
}
],
"type": "UnsignedFixedPoint"
},
"getIssueableTokensFromVault": {
"description": "Get the amount of tokens a vault can issue",
"params": [
{
"name": "vault",
"type": "VaultId"
}
],
"type": "BalanceWrapper"
},
"getPremiumRedeemVaults": {
"description": "Get all vaults below the premium redeem threshold.",
"params": [],
"type": "Vec<(VaultId, BalanceWrapper)>"
},
"getRequiredCollateralForVault": {
"description": "Get the amount of collateral required for the given vault to be at the current SecureCollateralThreshold with the current exchange rate",
"params": [
{
"name": "vault_id",
"type": "VaultId"
}
],
"type": "BalanceWrapper"
},
"getRequiredCollateralForWrapped": {
"description": "Get the amount of collateral required to issue an amount of InterBTC",
"params": [
{
"name": "amount_btc",
"type": "BalanceWrapper"
},
{
"name": "currency_id",
"type": "CurrencyId"
}
],
"type": "BalanceWrapper"
},
"getVaultCollateral": {
"description": "Get the vault's collateral (excluding nomination)",
"params": [
{
"name": "vault_id",
"type": "VaultId"
}
],
"type": "BalanceWrapper"
},
"getVaultTotalCollateral": {
"description": "Get the vault's collateral (including nomination)",
"params": [
{
"name": "vault_id",
"type": "VaultId"
}
],
"type": "BalanceWrapper"
},
"getVaultsByAccountId": {
"description": "Get all vaults that are registered using the given account _id",
"params": [
{
"name": "account_id",
"type": "AccountId"
}
],
"type": "Vec<VaultId>"
},
"getVaultsWithIssuableTokens": {
"description": "Get all vaults with non-zero issuable tokens, ordered in descending order of this amount",
"params": [],
"type": "Vec<(VaultId, BalanceWrapper)>"
},
"getVaultsWithRedeemableTokens": {
"description": "Get all vaults with non-zero redeemable tokens, ordered in descending order of this amount",
"params": [],
"type": "Vec<(VaultId, BalanceWrapper)>"
}
}
},
"alias": {
"tokens": {
"AccountData": "OrmlAccountData",
"BalanceLock": "OrmlBalanceLock"
}
},
"instances": {
"balances": [
"ksm",
"kbtc",
"kint",
"dot",
"ibtc",
"intr"
]
}
},
"trustbase": {
"types": [
{