-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update smoldot and fix empty next key (#438)
* update smoldot and fix empty next key * fix trie empty next key * lint * update test
- Loading branch information
1 parent
4a5e41e
commit 118aa89
Showing
8 changed files
with
108 additions
and
50 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { afterAll, beforeAll, describe, expect, it } from 'vitest' | ||
import { testingPairs } from '@acala-network/chopsticks-testing' | ||
|
||
import networks from './networks' | ||
|
||
describe('Polkadot Crowdloan Refund', async () => { | ||
const { alice } = testingPairs() | ||
const { api, dev, teardown } = await networks.polkadot({ blockNumber: 17700000, timeout: 400_000 }) | ||
|
||
beforeAll(async () => { | ||
// make sure crowdloan is ended | ||
await dev.newBlock({ unsafeBlockHeight: 17855999, count: 3 }) | ||
|
||
// give alice some DOTs for transaction fee | ||
await dev.setStorage({ | ||
System: { | ||
Account: [[[alice.address], { providers: 1, data: { free: 1000 * 1e10 } }]], | ||
}, | ||
}) | ||
}, 200_000) | ||
|
||
it( | ||
"should refund Acala's contributers", | ||
async () => { | ||
// trigger refund | ||
await expect(api.tx.crowdloan.refund(3336).signAndSend(alice)).resolves.toBeTruthy() | ||
await dev.newBlock() | ||
|
||
// some address get refund | ||
expect((await api.query.system.events()).toHuman()).toEqual( | ||
expect.arrayContaining([ | ||
expect.objectContaining({ | ||
event: expect.objectContaining({ | ||
method: 'Transfer', | ||
section: 'balances', | ||
data: expect.objectContaining({ | ||
from: '13UVJyLnbVp77Z2t6qZV4fNpRjDHppL6c87bHcZKG48tKJad', | ||
to: '111DbHPUxncZcffEfy1BrtFZNDUzK7hHchLpmJYFEFG4hy1', | ||
amount: '1,000,000,000,000', | ||
}), | ||
}), | ||
}), | ||
]), | ||
) | ||
}, | ||
{ timeout: 400_000 }, | ||
) | ||
|
||
afterAll(async () => await teardown()) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters