-
Notifications
You must be signed in to change notification settings - Fork 775
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
[pallet-revive] Add host function to_account_id
#7091
[pallet-revive] Add host function to_account_id
#7091
Conversation
to_account_id
to_account_id
let caller = whitelisted_caller(); | ||
let origin: T::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); | ||
Contracts::<T>::map_account(origin.clone()).unwrap(); | ||
let address = T::AddressMapper::to_address(&caller); |
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.
Should also fix the type inference error (hopefully).
let caller = whitelisted_caller(); | |
let origin: T::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); | |
Contracts::<T>::map_account(origin.clone()).unwrap(); | |
let address = T::AddressMapper::to_address(&caller); | |
let address = { | |
let caller = account("seal_to_account_id", 0, 0)); | |
T::AddressMapper::map(&caller).unwrap(); | |
T::AddressMapper::to_address(&caller) | |
}; |
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.
Just applied your suggestion. I didn't get a type inference error locally though when running the benchmark, where did you see it?
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.
The CI failed with a compilation error.
/cmd fmt |
Command "fmt" has started 🚀 See logs here |
Command "fmt" has failed ❌! See logs here |
Okay you have to run |
@athei I updated the PR. |
412aca6
* master: (33 commits) Implement `pallet-asset-rewards` (#3926) [pallet-revive] Add host function `to_account_id` (#7091) [pallet-revive] Remove revive events (#7164) [pallet-revive] Remove debug buffer (#7163) litep2p: Provide partial results to speedup GetRecord queries (#7099) [pallet-revive] Bump asset-hub westend spec version (#7176) Remove 0 as a special case in gas/storage meters (#6890) [pallet-revive] Fix `caller_is_root` return value (#7086) req-resp/litep2p: Reject inbound requests from banned peers (#7158) Add "run to block" tools (#7109) Fix reversed error message in DispatchInfo (#7170) approval-voting: Make importing of duplicate assignment idempotent (#6971) Parachains: Use relay chain slot for velocity measurement (#6825) PRDOC: Document `validate: false` (#7117) xcm: convert properly assets in xcmpayment apis (#7134) CI: Only format umbrella crate during umbrella check (#7139) approval-voting: Fix sending of assignments after restart (#6973) Retry approval on availability failure if the check is still needed (#6807) [pallet-revive-eth-rpc] persist eth transaction hash (#6836) litep2p: Sufix litep2p to the identify agent version for visibility (#7133) ...
Closes #6891.
cc @athei @xermicus @pgherveou