-
Notifications
You must be signed in to change notification settings - Fork 8
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
enable TEER on Asset Hub and KSM on self #271
Conversation
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 can't say that I understand all details of the added code, but it seems ok to me.
regression testing with chopsticks: start chopsticks xcm
👍 |
closes #268
closes #272
this enables
strategy:
regression testing:
testing
zombienet
send ROC between Relay <> Integritee
note preimage to register ROC as an asset on Integritee, set metadata and register its multilocation
execution should result in Events:
assets.forceCreated
assets.MetadataSet
assetRegistry.ReserveAssetRegistered
if testing with polkadot >= 1.7 binaries, need to downgrade safeXcmVersion to V3 on relaychain
send TEER to Asset Hub
send 1 ROC to sovereign account 2015 on AH
note preimage to register TEER as foreign asset on Asset Hub
you should see these events on AH
foreignAssets.Created
foreignAssets.MetadataSet
teleport 1 TEER from Alice@Integritee to Alice@AH (and attach 1mROC to pay fees on AH)
this should result in events
assets.Burned
on IntegriteeforeignAssets.Issued
on Asset Hubwhat also works:
transfer 100mROC from Alice on Integritee to Alice on AH
send TEER back
send 10 TEER to AH sibling account on integritee to pay XCM fees
teleport 200mTEER from alice on AH to Charlie on Integritee
you should see
balances.Endowed
event or, if the recipient exists,balances.Deposit
(hidden in system events. check block!)fees
Fees are quite complex to understand with XCM.
use
./scripts/dump-essential-balances.sh
to compare pre/post balancesXCM 10 ROC from Alice on Rococo to Alice on Integritee
Alice ROC@Rococo: -10.000261339136 ROC
Alice ROC@Integritee + 9.999650000000 ROC
Parachain2015 ROC@Rococo + 10.0 ROC
TotalIssuanceROC@Integritee + 9.999650000000 ROC
fees: Alice pays
XCM 1 ROC from Alice on Integritee back to Alice on Rococo
TotalIssuanceTEER@Integritee: -165.755830 uTEER (burned fees 99%)
TotalIssuanceROC@Integritee: -1.000000000000 ROC
Treasury@Integritee: +1.674301 uTEER (fees 1% share)
Alice ROC@Rococo: + 0.999989698944 ROC
Alice TEER@Integritee: -167.430131 uTEER
Alice ROC@Integritee: -1.0 ROC
Parachain2015@Rococo: -1.0 ROC
fees: Alice pays:
Teleport 1 TEER from Alice on Integritee to Alice on Asset Hub
TotalIssuance@Integritee: -1.000176638369 TEER
TotalIssuanceROC@Integritee: -1.0 mROC
Treasury@Integritee: +1.784225 uTEER (which means ~1% of fee to treasury, 99% burned)
Alice TEER@Integritee: -1000178422594 TEER
Alice TEER@AssetHub: +1.0 TEER
Alice ROC@AssetHub: + 0.964070016 mROC (refunded reminders after paying fee)
Alice ROC@Integritee: -1.0 mROC
Alice ROC@Rococo: +-0.0
Parachain2015@AssetHub: -1.0mROC
fees: Alice pays 178uTEER (on Integritee) + 36uROC (on AH)
Integritee Sovereign plays the broker and must balance its SovereinAccount manually! Send 1mROC from Integritee to AssetHub.
Teleport 200 mTEER from Alice on Asset Hub to Alice on Integritee
TotalIssuance@Integritee: + 200.0 mTEER
Alice ROC@AssetHub: - 145.180672 uROC
Alice TEER@AssetHub: -200mTEER
Alice TEER@Integritee: +199.650000000mTEER
Treasury@Integritee: + 350.0uTEER (fee burning not (yet) applied for XCM. all to treasury)
fees: Alice pays: 145uROC + 350uTEER