diff --git a/precompiles/assets-erc20/src/lib.rs b/precompiles/assets-erc20/src/lib.rs
index 4b4cd88f..6e1917aa 100644
--- a/precompiles/assets-erc20/src/lib.rs
+++ b/precompiles/assets-erc20/src/lib.rs
@@ -447,7 +447,7 @@ where
handle.record_log_costs_manual(3, 32)?;
let addr: H160 = beneficiary.into();
- let amount = Self::u256_to_amount(amount).in_field("value")?;
+ let amount = Self::u256_to_amount(amount).in_field("amount")?;
let origin = Runtime::AddressMapping::into_account_id(handle.context().caller);
let beneficiary = Runtime::AddressMapping::into_account_id(addr);
@@ -481,7 +481,7 @@ where
handle.record_log_costs_manual(3, 32)?;
let addr: H160 = who.into();
- let amount = Self::u256_to_amount(amount).in_field("value")?;
+ let amount = Self::u256_to_amount(amount).in_field("amount")?;
let origin = Runtime::AddressMapping::into_account_id(handle.context().caller);
let who = Runtime::AddressMapping::into_account_id(addr);
diff --git a/precompiles/assets-factory/src/lib.rs b/precompiles/assets-factory/src/lib.rs
index b12f6565..d695b3ff 100644
--- a/precompiles/assets-factory/src/lib.rs
+++ b/precompiles/assets-factory/src/lib.rs
@@ -77,11 +77,11 @@ where
) -> EvmResult
{
let asset_id = id
.try_into()
- .map_err(|_| RevertReason::value_is_too_large("asset id").in_field("id"))?;
+ .map_err(|_| RevertReason::value_is_too_large("asset id type").in_field("id"))?;
match Runtime::asset_id_to_address(asset_id) {
Some(address) => Ok(address.into()),
- None => Err(RevertReason::Custom("Invalid asset id".into()).into()),
+ None => Err(RevertReason::Custom("Invalid id".into()).into()),
}
}
@@ -97,13 +97,13 @@ where
let admin: H160 = admin.into();
let asset_id: AssetIdParameterOf = id
.try_into()
- .map_err(|_| RevertReason::value_is_too_large("asset id").in_field("id"))?;
+ .map_err(|_| RevertReason::value_is_too_large("asset id type").in_field("id"))?;
// Convert to asset id
let check_asset_id: PeaqAssetId = asset_id
.clone()
.try_into()
- .map_err(|_| RevertReason::value_is_too_large("asset id").in_field("id"))?;
+ .map_err(|_| RevertReason::value_is_too_large("asset id type").in_field("id"))?;
if !check_asset_id.is_allow_to_create() {
return Err(RevertReason::Custom("Invalid asset id".into()).into());
}
@@ -145,7 +145,7 @@ where
let asset_id = id
.try_into()
- .map_err(|_| RevertReason::value_is_too_large("asset id").in_field("id"))?;
+ .map_err(|_| RevertReason::value_is_too_large("asset id type").in_field("id"))?;
let name: Vec<_> = name.into();
let symbol: Vec<_> = symbol.into();
@@ -181,7 +181,7 @@ where
let asset_id = id
.try_into()
- .map_err(|_| RevertReason::value_is_too_large("asset id").in_field("id"))?;
+ .map_err(|_| RevertReason::value_is_too_large("asset id type").in_field("id"))?;
let min_balance: BalanceOf =
min_balance.try_into().unwrap_or_else(|_| Bounded::max_value());
@@ -218,7 +218,7 @@ where
let asset_id = id
.try_into()
- .map_err(|_| RevertReason::value_is_too_large("asset id").in_field("id"))?;
+ .map_err(|_| RevertReason::value_is_too_large("asset id type").in_field("id"))?;
let issuer: H160 = issuer.into();
let admin: H160 = admin.into();
let freezer: H160 = freezer.into();
@@ -258,7 +258,7 @@ where
let asset_id = id
.try_into()
- .map_err(|_| RevertReason::value_is_too_large("asset id").in_field("id"))?;
+ .map_err(|_| RevertReason::value_is_too_large("asset id type").in_field("id"))?;
let owner: H160 = owner.into();
// Build call with origin.
@@ -288,7 +288,7 @@ where
let asset_id = id
.try_into()
- .map_err(|_| RevertReason::value_is_too_large("asset id").in_field("id"))?;
+ .map_err(|_| RevertReason::value_is_too_large("asset id type").in_field("id"))?;
// Build call with origin.
{
@@ -313,7 +313,7 @@ where
let asset_id = id
.try_into()
- .map_err(|_| RevertReason::value_is_too_large("asset id").in_field("id"))?;
+ .map_err(|_| RevertReason::value_is_too_large("asset id type").in_field("id"))?;
// Build call with origin.
{
@@ -338,7 +338,7 @@ where
let asset_id = id
.try_into()
- .map_err(|_| RevertReason::value_is_too_large("asset id").in_field("id"))?;
+ .map_err(|_| RevertReason::value_is_too_large("asset id type").in_field("id"))?;
// Build call with origin.
{
@@ -362,7 +362,7 @@ where
let asset_id = id
.try_into()
- .map_err(|_| RevertReason::value_is_too_large("asset id").in_field("id"))?;
+ .map_err(|_| RevertReason::value_is_too_large("asset id type").in_field("id"))?;
// Build call with origin.
{
diff --git a/precompiles/peaq-did/did.sol b/precompiles/peaq-did/did.sol
index c5e418e6..044971c5 100644
--- a/precompiles/peaq-did/did.sol
+++ b/precompiles/peaq-did/did.sol
@@ -53,7 +53,7 @@ interface DID {
bytes value,
uint32 validity
);
- event RemoveAttribte(
+ event RemoveAttribute(
address did_account,
bytes name
);
diff --git a/precompiles/peaq-did/src/lib.rs b/precompiles/peaq-did/src/lib.rs
index 24c2ba29..9a8d625a 100644
--- a/precompiles/peaq-did/src/lib.rs
+++ b/precompiles/peaq-did/src/lib.rs
@@ -43,7 +43,7 @@ pub(crate) const SELECTOR_LOG_UPDATE_ATTRIBUTE: [u8; 32] =
keccak256!("UpdateAttribute(address,address,bytes,bytes,uint32)");
pub(crate) const SELECTOR_LOG_REMOVE_ATTRIBUTE: [u8; 32] =
- keccak256!("RemoveAttribte(address,bytes)");
+ keccak256!("RemoveAttribute(address,bytes)");
pub struct PeaqDIDPrecompile(PhantomData);
diff --git a/precompiles/vesting/src/lib.rs b/precompiles/vesting/src/lib.rs
index 252bbf80..93f145b8 100644
--- a/precompiles/vesting/src/lib.rs
+++ b/precompiles/vesting/src/lib.rs
@@ -113,8 +113,8 @@ where
) -> EvmResult {
let origin = Runtime::AddressMapping::into_account_id(handle.context().caller);
let target_account = Runtime::AddressMapping::into_account_id(target.into());
- let locked_amount = Self::u256_to_amount(locked).in_field("amount")?;
- let per_block_amount = Self::u256_to_amount(per_block).in_field("amount")?;
+ let locked_amount = Self::u256_to_amount(locked).in_field("locked")?;
+ let per_block_amount = Self::u256_to_amount(per_block).in_field("per_block")?;
let starting_block_converted: BlockNumberFor = starting_block.into();
let schedule = VestingInfo::new(locked_amount, per_block_amount, starting_block_converted);