-
Notifications
You must be signed in to change notification settings - Fork 799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Draft] Chopsticks tests with papi and local nodes #6572
base: master
Are you sure you want to change the base?
Conversation
const weight = await AHApi.apis.XcmPaymentApi.query_xcm_weight(msg); | ||
|
||
const ahToWnd = AHApi.tx.PolkadotXcm.execute({ | ||
message: msg, | ||
max_weight: { ref_time: weight.value.ref_time, proof_size: weight.value.proof_size }, | ||
}, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome use of the runtime API, I didn't think of it but it's much easier now for clients to call "execute". Did you need to add some extra weight as margin or did this work out of the box?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This worked out of the box. I thought that was the intention 😸
cumulus/parachains/integration-tests/chopsticks/configs/westend-asset-hub-override.yaml
Outdated
Show resolved
Hide resolved
cumulus/parachains/integration-tests/chopsticks/configs/westend-bridge-hub-override.yaml
Outdated
Show resolved
Hide resolved
|
||
const WESTEND_NETWORK = Uint8Array.from([225, 67, 242, 56, 3, 172, 80, 232, 246, 248, 230, 38, 149, 209, 206, 158, 78, 29, 104, 170, 54, 193, 205, 44, 253, 21, 52, 2, 19, 243, 66, 62]); | ||
// TODO: find a way to extract keys below from yaml config. | ||
const BOB_KEY = "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that from aliceSigner/bobSigner
you can only get a Uint8Array
public key; is it possible to use it in place of these addresses?
E.g. getFreeBalance(AHApi, BOB_KEY);
becomes await getFreeBalance(AHApi, bobSigned.publicKey);
I've written a straightforward guide on how to set-up and run these scripts. Check it out - https://hackmd.io/uVBNwrS6Q1mLtXdcsDI-aQ?view |
All GitHub workflows were cancelled due to failure one of the required jobs. |
Fixed Bridge Hub Westend endpoint
Asset issuance config for test-tether. On Westend total issuance of this token is equal to 0 (when in doubt check https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fasset-hub-westend-rpc.dwellir.com#/assets for Asset Hub). Even if you set yourself balance of 1 billion test-tether tokens, the execution will fail during withdrawal thus issuance config is needed.
Added test scenario for local reserve asset transfer. Documented my work here - https://hackmd.io/@RFUCsRRCSzKkumaXVxcCdg/B1pIuCGrJx
Added initiate reserve withdraw test scenario. Added penpal client to test set-up and updated Readme. In order to verify USDT transfer from Asset Hub to Penpal (ReserveAssetTransfer): - go to Penpal's chain state (https://polkadot.js.org/apps/?rpc=ws%3A%2F%2Flocalhost%3A8001#/chainstate) - select foreignAssets pallet and then select asset map - within asset map specify relative path to USDT on Asset Hub (i.e. parents: 1, Parachain(1000), PalletInstance(50), GeneralIndex(1984) and hit "+" button - within the response make sure that there is one account (`accounts: 1`) holding this foreign asset In order to verify USDT transfer from Penpal to AssetHub (InitiateReserveWithdraw): - go to Asset Hub's chain state (https://polkadot.js.org/apps/?rpc=ws%3A%2F%2Flocalhost%3A8000#/chainstate) - select asset pallet and account map - below select Bob's account from the list (we use Bob for this test scenario but you can also check if Alice's balance was decreased) - and set id (u32) to 1984 (or USDT) - then hit "+" button and make sure that Bob's balance is correct
@x3c41a this still has "Draft" in its name, but it's status is open (not draft), is it ready for review or not? |
It's not ready for review just yet. |
1. Discovered broken Set Asset Claimer. Replaced with nested SetHints + AssetClaimer 2. Unified XCM v4 and v5 message creation, improved message weights, small code refactors. 3. Removed `query_weight_to_asset_fee` call. It does not work as intended; will be restored in the future iterations.
…ck balance after XCM execution
If it comes to post execution checks the plan is to add new block creation at destination chain and account balance validation after the execution. PET checks are more extensive but there is no need to replicate its logic here. |
This PR contains XCM programs which we are going to translate into ecosystem-tests and add those programs to v5 docs.
Installation instructions are here