Add Bifrost Kusama Parachain (#5297)

* Add Bifrost Kusama Parachain

* format code
This commit is contained in:
pan 2021-05-16 13:09:36 +08:00 committed by GitHub
parent 8366a0cc9d
commit 8884790e06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 71 additions and 253 deletions

View File

@ -12,277 +12,85 @@ const definitions: OverrideBundleDefinition = {
// on all versions
minmax: [0, undefined],
types: {
AccountInfo: 'AccountInfoWithRefCount',
Address: 'MultiAddress',
LookupSource: 'MultiAddress',
Token: {
symbol: 'Vec<u8>',
precision: 'u16',
total_supply: 'Balance',
token_type: 'TokenType',
pair: 'Option<AssetId>'
},
Price: 'u64',
AccountAsset: {
balance: 'Balance',
locked: 'Balance',
available: 'Balance',
cost: 'Balance',
income: 'Balance'
},
TokenSymbol: {
_enum: [
'BNC',
'aUSD',
'DOT',
'vDOT',
'KSM',
'vKSM',
'ETH',
'vETH',
'EOS',
'vEOS',
'IOST',
'vIOST'
]
},
TokenType: {
_enum: [
'Native',
'Stable',
'Token',
'VToken'
]
_enum: {
ASG: 0,
aUSD: 1,
DOT: 2,
vDOT: 3,
KSM: 4,
vKSM: 5,
ETH: 6,
vETH: 7,
EOS: 8,
vEOS: 9,
IOST: 10,
vIOST: 11
}
},
CurrencyId: {
_enum: {
Token: 'TokenSymbol'
}
},
BiddingOrderId: 'u64',
RewardRecord: {
account_id: 'AccountId',
record_amount: 'Balance'
},
EraId: 'u32',
BiddingOrderUnit: {
bidder_id: 'AccountId',
token_id: 'AssetId',
block_num: 'BlockNumber',
votes: 'Balance',
annual_roi: 'Permill',
validator: 'AccountId'
},
BiddingOrderUnitOf: 'BiddingOrderUnit',
VersionId: 'u32',
PermissionName: 'u64',
PermissionLevel: {
actor: 'AccountName',
permission: 'PermissionName'
},
Action: {
account: 'AccountName',
name: 'ActionName',
authorization: 'Vec<PermissionLevel>',
data: 'Vec<u8>'
},
AccountName: 'u64',
Checksum256: '([u8;32])',
ActionName: 'u64',
FlatMap: {
map: 'Vec<(ActionName, u64)>'
},
UnsignedInt: 'u32',
ActionReceipt: {
receiver: 'AccountName',
act_digest: 'Checksum256',
global_sequence: 'u64',
recv_sequence: 'u64',
auth_sequence: 'FlatMap<AccountName, u64>',
code_sequence: 'UnsignedInt',
abi_sequence: 'UnsignedInt'
},
BlockchainType: {
_enum: [
'BIFROST',
'EOS',
'IOST'
]
},
Precision: 'u32',
BridgeAssetSymbol: {
blockchain: 'BlockchainType',
symbol: 'Vec<u8>',
precision: 'Precision'
},
PublicKey: {
type_: 'UnsignedInt',
data: '[u8;33]'
},
ProducerKey: {
producer_name: 'AccountName',
block_signing_key: 'PublicKey'
},
ProducerSchedule: {
version: 'u32',
producers: 'Vec<ProducerKey>'
},
bridgeEosSignature: {
type_: 'UnsignedInt',
data: '[u8;65]'
},
BlockTimestamp: '(u32)',
Extension: '(u16, Vec<u8>)',
BlockHeader: {
timestamp: 'BlockTimestamp',
producer: 'AccountName',
confirmed: 'u16',
previous: 'Checksum256',
transaction_mroot: 'Checksum256',
action_mroot: 'Checksum256',
schedule_version: 'u32',
new_producers: 'Option<ProducerSchedule>',
header_extensions: 'Vec<Extension>'
},
SignedBlockHeader: {
block_header: 'BlockHeader',
producer_signature: 'bridgeEosSignature'
},
Checksum256Array: 'Vec<Checksum256>',
IncrementalMerkle: {
_node_count: 'u64',
_active_nodes: 'Checksum256Array'
},
TxSig: {
signature: 'Vec<u8>',
author: 'AccountId'
},
MultiSig: {
signatures: 'Vec<TxSig>',
threshold: 'u8'
},
MultiSigTx: {
chain_id: 'Vec<u8>',
raw_tx: 'Vec<u8>',
multi_sig: 'MultiSig',
action: 'Action',
from: 'AccountId',
asset_id: 'AssetId'
},
Sent: {
tx_id: 'Vec<u8>',
from: 'AccountId',
asset_id: 'AssetId'
},
Succeeded: {
tx_id: 'Vec<u8>'
},
Failed: {
tx_id: 'Vec<u8>',
reason: 'Vec<u8>'
},
TxOut: {
AmountOf: 'i128',
ChainId: {
_enum: {
Initialized: 'MultiSigTx',
Created: 'MultiSigTx',
SignComplete: 'MultiSigTx',
Sent: 'Sent',
Succeeded: 'Succeeded',
Failed: 'Failed'
RelayChain: 'Null',
ParaChain: 'ParaId'
}
},
TransactionStatus: {
_enum: [
'Initialized',
'Created',
'SignComplete',
'Sent',
'Succeeded',
'Failed'
]
XCurrencyId: {
chainId: 'ChainId',
currencyId: 'Vec<u8>'
},
ProducerAuthoritySchedule: {
version: 'u32',
producers: 'Vec<ProducerAuthority>'
},
ProducerAuthority: {
producer_name: 'ActionName',
authority: 'BlockSigningAuthority'
},
BlockSigningAuthority: '(UnsignedInt, BlockSigningAuthorityV0)',
BlockSigningAuthorityV0: {
threshold: 'u32',
keyWeights: 'Vec<KeyWeight>'
},
KeyWeight: {
key: 'PublicKey',
weight: 'u16'
},
IostAction: {
contract: 'Vec<u8>',
action_name: 'Vec<u8>',
data: 'Vec<u8>'
},
IostMultiSigTx: {
chain_id: 'i32',
raw_tx: 'Vec<u8>',
multi_sig: 'MultiSig',
action: 'IostAction',
from: 'AccountId',
asset_id: 'AssetId'
},
Processing: {
tx_id: 'Vec<u8>',
multi_sig_tx: 'IostMultiSigTx'
},
IostTxOut: {
CurrencyIdOf: 'CurrencyId',
IsExtended: 'bool',
StorageVersion: 'Releases',
ShareWeight: 'Balance',
PalletBalanceOf: 'Balance',
BlockNumberFor: 'BlockNumber',
NumberOrHex: {
_enum: {
Initial: 'IostMultiSigTx',
Generated: 'IostMultiSigTx',
Signed: 'IostMultiSigTx',
Processing: 'Processing',
Success: 'Vec<u8>',
Fail: 'Failed'
Number: 'u64',
Hex: 'U256'
}
},
SpecIndex: 'u32',
RequestIdentifier: 'u64',
DataVersion: 'u64',
AssetConfig: {
redeem_duration: 'BlockNumber',
min_reward_per_block: 'Balance'
TokenBalance: 'Balance',
TokenId: 'u32',
PairId: 'u32',
Pair: {
token_0: 'AssetId',
token_1: 'AssetId',
account: 'AccountId',
total_liquidity: 'TokenBalance',
lp_asset_id: 'AssetId'
},
ProxyValidatorRegister: {
last_block: 'BlockNumber',
deposit: 'Balance',
need: 'Balance',
staking: 'Balance',
reward_per_block: 'Balance',
validator_address: 'Vec<u8>'
PairInfo: {
token_0: 'AssetId',
token_1: 'AssetId',
account: 'AccountId',
total_liquidity: 'TokenBalance',
holding_liquidity: 'TokenBalance',
reserve_0: 'TokenBalance',
reserve_1: 'TokenBalance',
lp_asset_id: 'AssetId'
},
PoolId: 'u32',
SwapFee: 'u128',
PoolDetails: {
owner: 'AccountId',
swap_fee_rate: 'SwapFee',
active: 'bool'
AssetId: {
chain_id: 'u32',
module_index: 'u8',
asset_index: 'u32'
},
PoolWeight: 'Balance',
PoolToken: 'u128',
PoolCreateTokenDetails: {
token_id: 'AssetId',
token_balance: 'Balance',
token_weight: 'PoolWeight'
AssetProperty: {
_enum: {
Foreign: null,
Lp: 'LpProperty'
}
},
VtokenPool: {
token_pool: 'Balance',
vtoken_pool: 'Balance',
current_reward: 'Balance',
pending_reward: 'Balance'
},
VtokenMintPrice: 'u128',
MintPrice: 'VtokenMintPrice',
CurrencyIdOf: 'CurrencyId'
LpProperty: {
token_0: 'AssetId',
token_1: 'AssetId'
}
}
}

View File

@ -32,6 +32,14 @@ export function createKusama (t: TFunction): EndpointOption {
/// (3) parachains with id, see Rococo (info here maps to the actual "named icon")
//
// NOTE: Added alphabetical based on chain name
{
info: 'bifrost',
paraId: 2001,
text: t('rpc.kusama.bifrost', 'Bifrost', { ns: 'apps-config' }),
providers: {
Bifrost: 'wss://bifrost-rpc.liebi.com/ws'
}
},
{
info: 'crust shadow',
paraId: 2012,

View File

@ -127,6 +127,7 @@ export const chainColors: Record<string, any> = [
['Apron PC1', chainApron],
['Ares PC1', chainRoccoAres],
['Bifrost PC1', chainRoccoBifrost],
['bifrost', chainRoccoBifrost],
['Bit.Country Tewai Chain', chainBitCountry],
['Beast Developer', chainBeastEave],
['ChainX', chainChainx],

View File

@ -10,6 +10,7 @@
"rpc.header.test": "Test networks",
"rpc.header.test.relay": "Test relays & parachains",
"rpc.hosted.by": "hosted by {{host}}",
"rpc.kusama.bifrost": "Bifrost",
"rpc.kusama.khala": "Khala Network",
"rpc.kusama.kilt": "KILT Mainnet",
"rpc.kusama.parity": "Kusama",