difftreelog
misk: Change bound. Update changelog
in: master
3 files changed
pallets/common/src/eth.rsdiffbeforeafterboth--- a/pallets/common/src/eth.rs
+++ b/pallets/common/src/eth.rs
@@ -53,9 +53,9 @@
}
/// Convert `CrossAccountId` to `uint256`.
-pub fn convert_cross_account_to_eth_uint256<T: Config>(from: &T::CrossAccountId) -> Result<uint256>
+pub fn convert_cross_account_to_uint256<T: Config>(from: &T::CrossAccountId) -> uint256
where
- T::AccountId: AsRef<[u8]>,
+ T::AccountId: AsRef<[u8; 32]>,
{
use pallet_evm::account::CrossAccountId;
let slice = from.as_sub().as_ref();
pallets/evm-contract-helpers/CHANGELOG.mddiffbeforeafterboth9 - Set arbitrary evm address as contract sponsor.9 - Set arbitrary evm address as contract sponsor.10 - Ability to remove current sponsor.10 - Ability to remove current sponsor.111112### Removed13 - Remove methods14 + sponsoring_enabled15 + toggle_sponsoring1612 ### Changed17 ### Changed131814 - Change `toggle_sponsoring` to `self_sponsored_enable`.19 - Change `toggle_sponsoring` to `self_sponsored_enable`.pallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth--- a/pallets/evm-contract-helpers/src/eth.rs
+++ b/pallets/evm-contract-helpers/src/eth.rs
@@ -45,7 +45,7 @@
#[solidity_interface(name = "ContractHelpers")]
impl<T: Config> ContractHelpers<T>
where
- T::AccountId: AsRef<[u8]>,
+ T::AccountId: AsRef<[u8; 32]>,
{
/// Get contract ovner
///
@@ -110,7 +110,7 @@
fn get_sponsor(&self, contract_address: address) -> Result<(address, uint256)> {
let sponsor =
Pallet::<T>::get_sponsor(contract_address).ok_or("Contract has no sponsor")?;
- let sponsor_sub = pallet_common::eth::convert_cross_account_to_eth_uint256::<T>(&sponsor)?;
+ let sponsor_sub = pallet_common::eth::convert_cross_account_to_uint256::<T>(&sponsor);
Ok((*sponsor.as_eth(), sponsor_sub))
}
@@ -206,7 +206,7 @@
pub struct HelpersOnMethodCall<T: Config>(PhantomData<*const T>);
impl<T: Config> OnMethodCall<T> for HelpersOnMethodCall<T>
where
- T::AccountId: AsRef<[u8]>,
+ T::AccountId: AsRef<[u8; 32]>,
{
fn is_reserved(contract: &sp_core::H160) -> bool {
contract == &T::ContractAddress::get()