Skip to content
  1. Jun 13, 2024
  2. Jun 04, 2024
  3. Jun 03, 2024
  4. Jun 02, 2024
  5. May 31, 2024
  6. May 30, 2024
  7. May 29, 2024
    • Bastian Köcher's avatar
      pallet-staking: Put tests behind `cfg(debug_assertions)` (#4620) · 4ab078d6
      Bastian Köcher authored
      Otherwise these tests are failing if you don't run with
      `debug_assertions` enabled, which happens if you run tests locally in
      release mode.
      4ab078d6
    • eskimor's avatar
      Broker new price adapter (#4521) · f4dc8d22
      eskimor authored
      Fixes #4360 
      
      Also rename: AllowedRenewals -> PotentialRenewals to avoid confusion of
      future readers. (An entry in `AllowedRenewals` is not enough to allow a
      renewal, the assignment also has to be complete, which is only checked
      afterwards.)
      
      - [x] Does not work with renewals as is - fix.
      - [x] More tests
      - [x] PR docs
      
      Edit 1:
      (Relevant blog post:
      https://grillapp.net/12935/agile-coretime-pricing-explained-166522?ref=29715
      
      )
      
      ---------
      
      Co-authored-by: default avatareskimor <[email protected]>
      Co-authored-by: default avatarDónal Murray <[email protected]>
      Co-authored-by: command-bot <>
      f4dc8d22
    • Sebastian Kunert's avatar
      Adjust zombienet parameter · 5dcea6c3
      Sebastian Kunert authored
      5dcea6c3
    • Francisco Aguirre's avatar
      Change `XcmDryRunApi::dry_run_extrinsic` to take a call instead (#4621) · d5053ac4
      Francisco Aguirre authored
      Follow-up to the new `XcmDryRunApi` runtime API introduced in
      https://github.com/paritytech/polkadot-sdk/pull/3872.
      
      Taking an extrinsic means the frontend has to sign first to dry-run and
      once again to submit.
      This is bad UX which is solved by taking an `origin` and a `call`.
      This also has the benefit of being able to dry-run as any account, since
      it needs no signature.
      
      This is a breaking change since I changed `dry_run_extrinsic` to
      `dry_run_call`, however, this API is still only on testnets.
      The crates are bumped accordingly.
      
      As a part of this PR, I changed the name of the API from `XcmDryRunApi`
      to just `DryRunApi`, since it can be used for general dry-running :)
      
      Step towards https://github.com/paritytech/polkadot-sdk/issues/690
      
      .
      
      Example of calling the API with PAPI, not the best code, just testing :)
      
      ```ts
      // We just build a call, the arguments make it look very big though.
      const call = localApi.tx.XcmPallet.transfer_assets({
        dest: XcmVersionedLocation.V4({ parents: 0, interior: XcmV4Junctions.X1(XcmV4Junction.Parachain(1000)) }),
        beneficiary: XcmVersionedLocation.V4({ parents: 0, interior: XcmV4Junctions.X1(XcmV4Junction.AccountId32({ network: undefined, id: Binary.fromBytes(encodeAccount(account.address)) })) }),
        weight_limit: XcmV3WeightLimit.Unlimited(),
        assets: XcmVersionedAssets.V4([{
          id: { parents: 0, interior: XcmV4Junctions.Here() },
          fun: XcmV3MultiassetFungibility.Fungible(1_000_000_000_000n) }
        ]),
        fee_asset_item: 0,
      });
      // We call the API passing in a signed origin 
      const result = await localApi.apis.XcmDryRunApi.dry_run_call(
        WestendRuntimeOriginCaller.system(DispatchRawOrigin.Signed(account.address)),
        call.decodedCall
      );
      if (result.success && result.value.execution_result.success) {
        // We find the forwarded XCM we want. The first one going to AssetHub in this case.
        const xcmsToAssetHub = result.value.forwarded_xcms.find(([location, _]) => (
          location.type === "V4" &&
            location.value.parents === 0 &&
            location.value.interior.type === "X1"
            && location.value.interior.value.type === "Parachain"
            && location.value.interior.value.value === 1000
        ))!;
      
        // We can even find the delivery fees for that forwarded XCM.
        const deliveryFeesQuery = await localApi.apis.XcmPaymentApi.query_delivery_fees(xcmsToAssetHub[0], xcmsToAssetHub[1][0]);
      
        if (deliveryFeesQuery.success) {
          const amount = deliveryFeesQuery.value.type === "V4" && deliveryFeesQuery.value.value[0].fun.type === "Fungible" && deliveryFeesQuery.value.value[0].fun.value.valueOf() || 0n;
          // We store them in state somewhere.
          setDeliveryFees(formatAmount(BigInt(amount)));
        }
      }
      ```
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      d5053ac4
    • Sebastian Kunert's avatar
      fmt · 65cdc010
      Sebastian Kunert authored
      65cdc010
    • Sebastian Kunert's avatar
      2c8cc0d5
    • Sebastian Kunert's avatar
      Introduce experimental CLI option · 15c36a9b
      Sebastian Kunert authored
      15c36a9b
    • Sebastian Kunert's avatar
      Remove unused parameters from zombienet · 07478dc6
      Sebastian Kunert authored
      07478dc6
    • Sebastian Kunert's avatar
      Address comments · a23d5a98
      Sebastian Kunert authored
      a23d5a98
    • Sebastian Kunert's avatar
      Apply suggestions from code review · 44bc8e77
      Sebastian Kunert authored
      
      
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      Co-authored-by: default avatarAndrei Sandu <[email protected]>
      44bc8e77