Skip to content

Commit

Permalink
fix tests (#158)
Browse files Browse the repository at this point in the history
* fix tests

* update snapshot
  • Loading branch information
ermalkaleci authored Jan 25, 2024
1 parent bf5d85a commit 397012a
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 23 deletions.
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion networks/astar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default {
},
kusama: {
name: 'shiden' as const,
endpoint: 'wss://rpc.shiden.astar.network',
endpoint: ['wss://rpc.shiden.astar.network', 'wss://shiden-rpc.dwellir.com'],
relayToken: '340282366920938463463374607431768211455',
aUSDToken: '18446744073709551616',
},
Expand Down
2 changes: 1 addition & 1 deletion networks/centrifuge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
config: ({ alice }) => ({
storages: {
System: {
Account: [[[alice.address], { data: { free: '1000000000000000000000' } }]],
Account: [[[alice.address], { providers: 1, data: { free: '1000000000000000000000' } }]],
},
OrmlTokens: {
accounts: [[[alice.address, 'AUSD'], { free: 10 * 1e12 }]],
Expand Down
2 changes: 1 addition & 1 deletion networks/crust.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
config: ({ alice }) => ({
storages: {
System: {
account: [[[alice.address], { data: { free: 1000 * 1e12 } }]],
account: [[[alice.address], { providers: 1, data: { free: 1000 * 1e12 } }]],
},
},
}),
Expand Down
2 changes: 1 addition & 1 deletion networks/hydraDX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
config: ({ alice, relayToken, dai }) => ({
storages: {
System: {
Account: [[[alice.address], { data: { free: 1000 * 1e12 } }]],
Account: [[[alice.address], { providers: 1, data: { free: 1000 * 1e12 } }]],
},
Tokens: {
Accounts: [
Expand Down
2 changes: 1 addition & 1 deletion networks/interlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default {
config: ({ alice, btc, native, LiquidToken }) => ({
storages: {
System: {
Account: [[[alice.address], { data: { free: 1000 * 1e12 } }]],
Account: [[[alice.address], { providers: 1, data: { free: 1000 * 1e12 } }]],
},
Tokens: {
Accounts: [
Expand Down
2 changes: 1 addition & 1 deletion networks/parallel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
config: ({ alice, ausd, acalaNativeToken }) => ({
storages: {
System: {
account: [[[alice.address], { data: { free: 1000 * 1e12 } }]],
account: [[[alice.address], { providers: 1, data: { free: 1000 * 1e12 } }]],
},
Assets: {
account: [
Expand Down
4 changes: 2 additions & 2 deletions networks/polkadot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { Config } from './types'
export default {
polkadot: {
name: 'polkadot' as const,
endpoint: 'wss://rpc.polkadot.io',
endpoint: ['wss://rpc.ibp.network/polkadot', 'wss://polkadot-rpc.dwellir.com', 'wss://rpc.polkadot.io'],
},
kusama: {
name: 'kusama' as const,
endpoint: 'wss://kusama-rpc.polkadot.io',
endpoint: ['wss://kusama-rpc.dwellir.com', 'wss://rpc.ibp.network/kusama', 'wss://kusama-rpc.polkadot.io'],
},
config: ({ alice }) => ({
storages: {
Expand Down
2 changes: 1 addition & 1 deletion networks/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export type NetworkKind = 'polkadot' | 'kusama'

export type NetworkConfig = {
name: string
endpoint: string
endpoint: string | string[]
}

export type Context = ReturnType<typeof testingPairs>
Expand Down
2 changes: 1 addition & 1 deletion networks/unique.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
config: ({ alice }) => ({
storages: {
System: {
account: [[[alice.address], { data: { free: 1000 * 1e12 } }]],
account: [[[alice.address], { providers: 1, data: { free: 1000 * 1e12 } }]],
},
},
}),
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"@polkadot/api": "^10.11.1"
},
"dependencies": {
"@acala-network/chopsticks": "^0.9.6-1",
"@acala-network/chopsticks-testing": "^0.9.6-1",
"@acala-network/chopsticks": "^0.9.8-1",
"@acala-network/chopsticks-testing": "^0.9.8-1",
"@acala-network/sdk": "^4.1.9-10",
"@acala-network/sdk-core": "^4.1.9-10",
"@polkadot/api": "^10.11.1",
"@polkadot/api": "^10.11.2",
"@polkawallet/bridge": "^0.1.5-19",
"dotenv": "^16.3.1",
"lodash": "^4.17.21",
Expand Down
2 changes: 1 addition & 1 deletion tests/bridge-sdk/__snapshots__/kusama.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ exports[`'kusama' to 'statemine' using bridgeSDK cross-chain 'KSM' parachain bri
}
`;

exports[`'kusama' to 'statemine' using bridgeSDK cross-chain 'KSM' parachain bridge to releaychain Cross-chain using BridgeSDK works: fee 1`] = `"(rounded 0.000004)"`;
exports[`'kusama' to 'statemine' using bridgeSDK cross-chain 'KSM' parachain bridge to releaychain Cross-chain using BridgeSDK works: fee 1`] = `"(rounded 0.0001)"`;

exports[`'basilisk' to 'karura' using bridgeSDK cross-chain 'BSX' parachain bridge to releaychain Cross-chain using BridgeSDK works: initial 1`] = `
{
Expand Down
9 changes: 5 additions & 4 deletions tests/xcm-transfer/__snapshots__/kusama-para.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ exports[`'statemine' -> 'karura' xcm transfer 'USDT' xcmPallet transfer: tx even
"data": {
"outcome": {
"Complete": {
"proofSize": "(rounded 6200)",
"refTime": "(rounded 683000000)",
"proofSize": "(rounded 8800)",
"refTime": "(rounded 841000000)",
},
},
},
Expand Down Expand Up @@ -345,8 +345,8 @@ exports[`'karura' -> 'statemine' xcm transfer 'USDT' xtokens transfer: to chain
"messageHash": "(hash)",
"messageId": "(hash)",
"weight": {
"proofSize": "(rounded 3600)",
"refTime": "(rounded 310000000)",
"proofSize": "(rounded 7200)",
"refTime": "(rounded 300000000)",
},
},
"method": "Success",
Expand Down Expand Up @@ -538,6 +538,7 @@ exports[`'karura' -> 'basilisk' xcm transfer 'DAI' xtokens transfer: to chain xc
{
"data": {
"messageHash": "(hash)",
"messageId": "(hash)",
"weight": {
"proofSize": 0,
"refTime": 400000000,
Expand Down
6 changes: 3 additions & 3 deletions tests/xcm-transfer/__snapshots__/kusama-relay.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ exports[`'karura' -> 'kusama' xcm transfer 'KSM' xtokens transfer: to chain ump
"success": true,
"weightUsed": {
"proofSize": "(rounded 7200)",
"refTime": "(rounded 310000000)",
"refTime": "(rounded 290000000)",
},
},
"method": "Processed",
Expand Down Expand Up @@ -319,7 +319,7 @@ exports[`'karura' -> 'kusama' xcm transfer 'KSM wiht limited weight' xtokens tra
"success": true,
"weightUsed": {
"proofSize": "(rounded 7200)",
"refTime": "(rounded 310000000)",
"refTime": "(rounded 290000000)",
},
},
"method": "Processed",
Expand Down Expand Up @@ -350,7 +350,7 @@ exports[`'kusama' -> 'karura' xcm transfer 'KSM' xcmPallet transfer: tx events 1
"outcome": {
"Complete": {
"proofSize": "(rounded 6200)",
"refTime": "(rounded 630000000)",
"refTime": "(rounded 628000000)",
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions tests/xcm-transfer/polkadot-para.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const tests = [
name: 'WBTC',
fromStorage: ({ alice }: Context) => ({
System: {
account: [[[acala.paraAccount], { data: { free: 10e10 } }]],
account: [[[acala.paraAccount], { providers: 1, data: { free: 10e10 } }]],
},
Assets: {
account: [[[statemint.wbtcIndex, alice.address], { balance: 1e8 }]],
Expand Down Expand Up @@ -44,7 +44,7 @@ const tests = [
}),
toStorage: ({ alice }: Context) => ({
System: {
account: [[[acala.paraAccount], { data: { free: 10e10 } }]],
account: [[[acala.paraAccount], { providers: 1, data: { free: 10e10 } }]],
},
Assets: {
account: [
Expand Down

0 comments on commit 397012a

Please sign in to comment.