Skip to content
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

Remove Units Per Second #1074

Merged
merged 12 commits into from
Jan 22, 2025
Prev Previous commit
Next Next commit
Update builders/interoperability/xcm/remote-execution/substrate-calls…
…/xcm-transactor-pallet.md

Co-authored-by: Erin Shaben <eshaben@icloud.com>
  • Loading branch information
themacexpert and eshaben authored Jan 17, 2025
commit ac7f1810e3a222109b90b4c91ead5ba4353134bb
Original file line number Diff line number Diff line change
@@ -410,6 +410,7 @@ To estimate the amount of tokens Alice's Computed Origin account will need to ex
```

The response shows that the `transactExtraWeightSigned` is `{{ networks.moonbase_beta.xcm_message.transact.weight.display }}`. This weight is needed to execute the four XCM instructions for this remote call in that specific destination chain. Next, you need to find out how much the destination chain charges per weight of XCM execution in reference to the asset's price. Previously, this was done by sourcing a units per second value. However, this method has been replaced by calculating a relative price. Relative price refers to how many units of the foreign asset correspond to one unit of the native token (GLMR or MOVR) from a value (i.e., price) perspective. For example, if the foreign asset is worth $5 and GLMR is worth $0.25, the relative price would be 0.05. However, we must scale the result to 18 decimals to correspond to the Wei units used. In this case, the relative price would be `50000000000000000`.

You can calculate the relative price with a script in the [XCM Tools repo](https://github.com/Moonsong-Labs/xcm-tools?tab=readme-ov-file#calculate-relative-price){target=\_blank}. The script is also reproduced below:

??? code "Calculate Relative Price"