This file contains hidden or 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
| import { XcmV5Junction, XcmV5Junctions } from "@polkadot-api/descriptors"; | |
| // ===== Dev accounts ===== | |
| export const ALICE = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"; | |
| // ===== Parachain IDs ===== | |
| export const PEOPLE_PARA_ID = 1004; | |
| export const HYDRATION_PARA_ID = 2034; | |
| export const ASSET_HUB_PARA_ID = 1000; | |
| export const PEOPLE_PALLET_INSTANCE = 53; |
This file contains hidden or 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
| import { | |
| passetHub, | |
| XcmV3MultiassetFungibility, | |
| XcmV3WeightLimit, | |
| XcmV5AssetFilter, | |
| XcmV5Instruction, | |
| XcmV5Junction, | |
| XcmV5Junctions, | |
| XcmV5WildAsset, | |
| XcmVersionedXcm, |
This file contains hidden or 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
| // `ahp` is the name we gave to `bun papi add`. | |
| import { | |
| ahp, | |
| DispatchRawOrigin, | |
| people, | |
| XcmV3Junction, | |
| XcmV3Junctions, | |
| XcmV3MultiassetFungibility, | |
| XcmV3WeightLimit, | |
| XcmV4AssetAssetFilter, |
This file contains hidden or 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
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.20; | |
| interface IXcm { | |
| struct Weight { | |
| uint64 refTime; | |
| uint64 proofSize; | |
| } | |
| function xcmExecute(bytes calldata message, Weight calldata weight) external; | |
| function xcmSend(bytes calldata destination, bytes calldata message) external; |
This file contains hidden or 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
| #[test] | |
| fn whats_the_derived_account_id() { | |
| use sp_runtime::AccountId32; | |
| let account_id = AccountId32::from_ss58check("13YMK2ehDHE4hoxL9L2jq4h8zwMFpo4cZnrR7YwzgxxSH8LR").unwrap(); | |
| let result = pallet_utility::Pallet::<Runtime>::derivative_account_id(account_id, 0); | |
| let derived_account_id = result.to_ss58check_with_version(42_u16.into()); | |
| dbg!(&derived_account_id); | |
| } |
This file contains hidden or 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
| import { describe, test, expect } from 'vitest'; | |
| import { createClient } from 'polkadot-api'; | |
| import { getWsProvider } from 'polkadot-api/ws-provider/web'; | |
| describe('some context', () => { | |
| const client = createClient(getWsProvider("wss://westend-penpal-rpc.polkadot.io")); | |
| test('some test', () => { | |
| expect(1).toBeGreaterThan(0); | |
| }); |
This file contains hidden or 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
| %stack_size = 4096 | |
| // Can't test the "designate" host function because | |
| // we'd need 336 * 1023 zeroes here for correct decoding. | |
| %rw_data_size = 12 | |
| %rw_data = 00 00 00 00 00 00 00 00 00 00 00 00 | |
| // ===== JAM entrypoints ===== | |
| jump @is_authorized | |
| fallthrough | |
| fallthrough |
This file contains hidden or 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
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
This file contains hidden or 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
| const encoderStates = { | |
| initial: 'streaming', | |
| states: { | |
| streaming: { | |
| on: { | |
| ENCODER_STOPPED: 'paused', | |
| }, | |
| }, | |
| paused: { | |
| on: { |
This file contains hidden or 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
| " Plugins | |
| call plug#begin('~/.vim/plugged') | |
| Plug 'dense-analysis/ale' | |
| Plug 'tpope/vim-fugitive' | |
| Plug 'scrooloose/nerdtree' | |
| Plug 'tomtom/tcomment_vim' | |
| Plug 'kien/ctrlp.vim' | |
| Plug 'vim-airline/vim-airline' | |
| Plug 'airblade/vim-gitgutter' |
NewerOlder