difftreelog
rename: CrossAccount -> CrossAddress
in: master
30 files changed
pallets/common/src/erc.rsdiffbeforeafterboth--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -244,7 +244,7 @@
fn set_collection_sponsor_cross(
&mut self,
caller: caller,
- sponsor: eth::CrossAccount,
+ sponsor: eth::CrossAddress,
) -> Result<void> {
self.consume_store_reads_and_writes(1, 1)?;
@@ -284,13 +284,13 @@
/// Get current sponsor.
///
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
- fn collection_sponsor(&self) -> Result<eth::CrossAccount> {
+ fn collection_sponsor(&self) -> Result<eth::CrossAddress> {
let sponsor = match self.collection.sponsorship.sponsor() {
Some(sponsor) => sponsor,
None => return Ok(Default::default()),
};
- Ok(eth::CrossAccount::from_sub::<T>(&sponsor))
+ Ok(eth::CrossAddress::from_sub::<T>(&sponsor))
}
/// Get current collection limits.
@@ -376,7 +376,7 @@
fn add_collection_admin_cross(
&mut self,
caller: caller,
- new_admin: eth::CrossAccount,
+ new_admin: eth::CrossAddress,
) -> Result<void> {
self.consume_store_reads_and_writes(2, 2)?;
@@ -391,7 +391,7 @@
fn remove_collection_admin_cross(
&mut self,
caller: caller,
- admin: eth::CrossAccount,
+ admin: eth::CrossAddress,
) -> Result<void> {
self.consume_store_reads_and_writes(2, 2)?;
@@ -539,7 +539,7 @@
/// Checks that user allowed to operate with collection.
///
/// @param user User address to check.
- fn allowlisted_cross(&self, user: eth::CrossAccount) -> Result<bool> {
+ fn allowlisted_cross(&self, user: eth::CrossAddress) -> Result<bool> {
let user = user.into_sub_cross_account::<T>()?;
Ok(Pallet::<T>::allowed(self.id, user))
}
@@ -563,7 +563,7 @@
fn add_to_collection_allow_list_cross(
&mut self,
caller: caller,
- user: eth::CrossAccount,
+ user: eth::CrossAddress,
) -> Result<void> {
self.consume_store_writes(1)?;
@@ -592,7 +592,7 @@
fn remove_from_collection_allow_list_cross(
&mut self,
caller: caller,
- user: eth::CrossAccount,
+ user: eth::CrossAddress,
) -> Result<void> {
self.consume_store_writes(1)?;
@@ -630,7 +630,7 @@
///
/// @param user User cross account to verify
/// @return "true" if account is the owner or admin
- fn is_owner_or_admin_cross(&self, user: eth::CrossAccount) -> Result<bool> {
+ fn is_owner_or_admin_cross(&self, user: eth::CrossAddress) -> Result<bool> {
let user = user.into_sub_cross_account::<T>()?;
Ok(self.is_owner_or_admin(&user))
}
@@ -651,8 +651,8 @@
///
/// @return Tuble with sponsor address and his substrate mirror.
/// If address is canonical then substrate mirror is zero and vice versa.
- fn collection_owner(&self) -> Result<eth::CrossAccount> {
- Ok(eth::CrossAccount::from_sub_cross_account::<T>(
+ fn collection_owner(&self) -> Result<eth::CrossAddress> {
+ Ok(eth::CrossAddress::from_sub_cross_account::<T>(
&T::CrossAccountId::from_sub(self.owner.clone()),
))
}
@@ -675,9 +675,9 @@
///
/// @return Vector of tuples with admins address and his substrate mirror.
/// If address is canonical then substrate mirror is zero and vice versa.
- fn collection_admins(&self) -> Result<Vec<eth::CrossAccount>> {
+ fn collection_admins(&self) -> Result<Vec<eth::CrossAddress>> {
let result = crate::IsAdmin::<T>::iter_prefix((self.id,))
- .map(|(admin, _)| eth::CrossAccount::from_sub_cross_account::<T>(&admin))
+ .map(|(admin, _)| eth::CrossAddress::from_sub_cross_account::<T>(&admin))
.collect();
Ok(result)
}
@@ -689,7 +689,7 @@
fn change_collection_owner_cross(
&mut self,
caller: caller,
- new_owner: eth::CrossAccount,
+ new_owner: eth::CrossAddress,
) -> Result<void> {
self.consume_store_writes(1)?;
pallets/common/src/eth.rsdiffbeforeafterboth--- a/pallets/common/src/eth.rs
+++ b/pallets/common/src/eth.rs
@@ -118,13 +118,13 @@
/// Cross account struct
#[derive(Debug, Default, AbiCoder)]
-pub struct CrossAccount {
+pub struct CrossAddress {
pub(crate) eth: address,
pub(crate) sub: uint256,
}
-impl CrossAccount {
- /// Converts `CrossAccountId` to [`CrossAccount`]
+impl CrossAddress {
+ /// Converts `CrossAccountId` to [`CrossAddress`]
pub fn from_sub_cross_account<T>(cross_account_id: &T::CrossAccountId) -> Self
where
T: pallet_evm::Config,
@@ -139,7 +139,7 @@
}
}
}
- /// Creates [`CrossAccount`] from substrate account
+ /// Creates [`CrossAddress`] from substrate account
pub fn from_sub<T>(account_id: &T::AccountId) -> Self
where
T: pallet_evm::Config,
@@ -150,7 +150,7 @@
sub: uint256::from_big_endian(account_id.as_ref()),
}
}
- /// Converts [`CrossAccount`] to `CrossAccountId`
+ /// Converts [`CrossAddress`] to `CrossAccountId`
pub fn into_sub_cross_account<T>(&self) -> evm_coder::execution::Result<T::CrossAccountId>
where
T: pallet_evm::Config,
pallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617//! Implementation of magic contract1819extern crate alloc;20use core::marker::PhantomData;21use evm_coder::{22 abi::{AbiWriter, AbiType},23 execution::Result,24 generate_stubgen, solidity_interface,25 types::*,26 ToLog,27};28use pallet_evm::{29 ExitRevert, OnCreate, OnMethodCall, PrecompileResult, PrecompileFailure, PrecompileHandle,30 account::CrossAccountId,31};32use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder, dispatch_to_evm};33use pallet_evm_transaction_payment::CallContext;34use sp_core::{H160, U256};35use up_data_structs::SponsorshipState;36use crate::{37 AllowlistEnabled, Config, Owner, Pallet, SponsorBasket, SponsoringFeeLimit,38 SponsoringRateLimit, SponsoringModeT, Sponsoring,39};40use frame_support::traits::Get;41use up_sponsorship::SponsorshipHandler;42use sp_std::vec::Vec;4344/// Pallet events.45#[derive(ToLog)]46pub enum ContractHelpersEvents {47 /// Contract sponsor was set.48 ContractSponsorSet {49 /// Contract address of the affected collection.50 #[indexed]51 contract_address: address,52 /// New sponsor address.53 sponsor: address,54 },5556 /// New sponsor was confirm.57 ContractSponsorshipConfirmed {58 /// Contract address of the affected collection.59 #[indexed]60 contract_address: address,61 /// New sponsor address.62 sponsor: address,63 },6465 /// Collection sponsor was removed.66 ContractSponsorRemoved {67 /// Contract address of the affected collection.68 #[indexed]69 contract_address: address,70 },71}7273/// See [`ContractHelpersCall`]74pub struct ContractHelpers<T: Config>(SubstrateRecorder<T>);75impl<T: Config> WithRecorder<T> for ContractHelpers<T> {76 fn recorder(&self) -> &SubstrateRecorder<T> {77 &self.078 }7980 fn into_recorder(self) -> SubstrateRecorder<T> {81 self.082 }83}8485/// @title Magic contract, which allows users to reconfigure other contracts86#[solidity_interface(name = ContractHelpers, events(ContractHelpersEvents))]87impl<T: Config> ContractHelpers<T>88where89 T::AccountId: AsRef<[u8; 32]>,90{91 /// Get user, which deployed specified contract92 /// @dev May return zero address in case if contract is deployed93 /// using uniquenetwork evm-migration pallet, or using other terms not94 /// intended by pallet-evm95 /// @dev Returns zero address if contract does not exists96 /// @param contractAddress Contract to get owner of97 /// @return address Owner of contract98 fn contract_owner(&self, contract_address: address) -> Result<address> {99 Ok(<Owner<T>>::get(contract_address))100 }101102 /// Set sponsor.103 /// @param contractAddress Contract for which a sponsor is being established.104 /// @param sponsor User address who set as pending sponsor.105 fn set_sponsor(106 &mut self,107 caller: caller,108 contract_address: address,109 sponsor: address,110 ) -> Result<void> {111 self.recorder().consume_sload()?;112 self.recorder().consume_sstore()?;113114 Pallet::<T>::set_sponsor(115 &T::CrossAccountId::from_eth(caller),116 contract_address,117 &T::CrossAccountId::from_eth(sponsor),118 )119 .map_err(dispatch_to_evm::<T>)?;120121 Ok(())122 }123124 /// Set contract as self sponsored.125 ///126 /// @param contractAddress Contract for which a self sponsoring is being enabled.127 fn self_sponsored_enable(&mut self, caller: caller, contract_address: address) -> Result<void> {128 self.recorder().consume_sload()?;129 self.recorder().consume_sstore()?;130131 let caller = T::CrossAccountId::from_eth(caller);132133 Pallet::<T>::ensure_owner(contract_address, *caller.as_eth())134 .map_err(dispatch_to_evm::<T>)?;135136 Pallet::<T>::force_set_sponsor(137 contract_address,138 &T::CrossAccountId::from_eth(contract_address),139 )140 .map_err(dispatch_to_evm::<T>)?;141142 Ok(())143 }144145 /// Remove sponsor.146 ///147 /// @param contractAddress Contract for which a sponsorship is being removed.148 fn remove_sponsor(&mut self, caller: caller, contract_address: address) -> Result<void> {149 self.recorder().consume_sload()?;150 self.recorder().consume_sstore()?;151152 Pallet::<T>::remove_sponsor(&T::CrossAccountId::from_eth(caller), contract_address)153 .map_err(dispatch_to_evm::<T>)?;154155 Ok(())156 }157158 /// Confirm sponsorship.159 ///160 /// @dev Caller must be same that set via [`setSponsor`].161 ///162 /// @param contractAddress Сontract for which need to confirm sponsorship.163 fn confirm_sponsorship(&mut self, caller: caller, contract_address: address) -> Result<void> {164 self.recorder().consume_sload()?;165 self.recorder().consume_sstore()?;166167 Pallet::<T>::confirm_sponsorship(&T::CrossAccountId::from_eth(caller), contract_address)168 .map_err(dispatch_to_evm::<T>)?;169170 Ok(())171 }172173 /// Get current sponsor.174 ///175 /// @param contractAddress The contract for which a sponsor is requested.176 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.177 fn sponsor(&self, contract_address: address) -> Result<pallet_common::eth::CrossAccount> {178 Ok(179 pallet_common::eth::CrossAccount::from_sub_cross_account::<T>(180 &Pallet::<T>::get_sponsor(contract_address).ok_or("Contract has no sponsor")?,181 ),182 )183 }184185 /// Check tat contract has confirmed sponsor.186 ///187 /// @param contractAddress The contract for which the presence of a confirmed sponsor is checked.188 /// @return **true** if contract has confirmed sponsor.189 fn has_sponsor(&self, contract_address: address) -> Result<bool> {190 Ok(Pallet::<T>::get_sponsor(contract_address).is_some())191 }192193 /// Check tat contract has pending sponsor.194 ///195 /// @param contractAddress The contract for which the presence of a pending sponsor is checked.196 /// @return **true** if contract has pending sponsor.197 fn has_pending_sponsor(&self, contract_address: address) -> Result<bool> {198 Ok(match Sponsoring::<T>::get(contract_address) {199 SponsorshipState::Disabled | SponsorshipState::Confirmed(_) => false,200 SponsorshipState::Unconfirmed(_) => true,201 })202 }203204 fn sponsoring_enabled(&self, contract_address: address) -> Result<bool> {205 Ok(<Pallet<T>>::sponsoring_mode(contract_address) != SponsoringModeT::Disabled)206 }207208 fn set_sponsoring_mode(209 &mut self,210 caller: caller,211 contract_address: address,212 // TODO: implement support for enums in evm-coder213 mode: uint8,214 ) -> Result<void> {215 self.recorder().consume_sload()?;216 self.recorder().consume_sstore()?;217218 <Pallet<T>>::ensure_owner(contract_address, caller).map_err(dispatch_to_evm::<T>)?;219 let mode = SponsoringModeT::from_eth(mode).ok_or("unknown mode")?;220 <Pallet<T>>::set_sponsoring_mode(contract_address, mode);221222 Ok(())223 }224225 /// Get current contract sponsoring rate limit226 /// @param contractAddress Contract to get sponsoring rate limit of227 /// @return uint32 Amount of blocks between two sponsored transactions228 fn sponsoring_rate_limit(&self, contract_address: address) -> Result<uint32> {229 self.recorder().consume_sload()?;230231 Ok(<SponsoringRateLimit<T>>::get(contract_address)232 .try_into()233 .map_err(|_| "rate limit > u32::MAX")?)234 }235236 /// Set contract sponsoring rate limit237 /// @dev Sponsoring rate limit - is a minimum amount of blocks that should238 /// pass between two sponsored transactions239 /// @param contractAddress Contract to change sponsoring rate limit of240 /// @param rateLimit Target rate limit241 /// @dev Only contract owner can change this setting242 fn set_sponsoring_rate_limit(243 &mut self,244 caller: caller,245 contract_address: address,246 rate_limit: uint32,247 ) -> Result<void> {248 self.recorder().consume_sload()?;249 self.recorder().consume_sstore()?;250251 <Pallet<T>>::ensure_owner(contract_address, caller).map_err(dispatch_to_evm::<T>)?;252 <Pallet<T>>::set_sponsoring_rate_limit(contract_address, rate_limit.into());253 Ok(())254 }255256 /// Set contract sponsoring fee limit257 /// @dev Sponsoring fee limit - is maximum fee that could be spent by258 /// single transaction259 /// @param contractAddress Contract to change sponsoring fee limit of260 /// @param feeLimit Fee limit261 /// @dev Only contract owner can change this setting262 fn set_sponsoring_fee_limit(263 &mut self,264 caller: caller,265 contract_address: address,266 fee_limit: uint256,267 ) -> Result<void> {268 self.recorder().consume_sload()?;269 self.recorder().consume_sstore()?;270271 <Pallet<T>>::ensure_owner(contract_address, caller).map_err(dispatch_to_evm::<T>)?;272 <Pallet<T>>::set_sponsoring_fee_limit(contract_address, fee_limit.into())273 .map_err(dispatch_to_evm::<T>)?;274 Ok(())275 }276277 /// Get current contract sponsoring fee limit278 /// @param contractAddress Contract to get sponsoring fee limit of279 /// @return uint256 Maximum amount of fee that could be spent by single280 /// transaction281 fn sponsoring_fee_limit(&self, contract_address: address) -> Result<uint256> {282 self.recorder().consume_sload()?;283284 Ok(get_sponsoring_fee_limit::<T>(contract_address))285 }286287 /// Is specified user present in contract allow list288 /// @dev Contract owner always implicitly included289 /// @param contractAddress Contract to check allowlist of290 /// @param user User to check291 /// @return bool Is specified users exists in contract allowlist292 fn allowed(&self, contract_address: address, user: address) -> Result<bool> {293 self.0.consume_sload()?;294 Ok(<Pallet<T>>::allowed(contract_address, user))295 }296297 /// Toggle user presence in contract allowlist298 /// @param contractAddress Contract to change allowlist of299 /// @param user Which user presence should be toggled300 /// @param isAllowed `true` if user should be allowed to be sponsored301 /// or call this contract, `false` otherwise302 /// @dev Only contract owner can change this setting303 fn toggle_allowed(304 &mut self,305 caller: caller,306 contract_address: address,307 user: address,308 is_allowed: bool,309 ) -> Result<void> {310 self.recorder().consume_sload()?;311 self.recorder().consume_sstore()?;312313 <Pallet<T>>::ensure_owner(contract_address, caller).map_err(dispatch_to_evm::<T>)?;314 <Pallet<T>>::toggle_allowed(contract_address, user, is_allowed);315316 Ok(())317 }318319 /// Is this contract has allowlist access enabled320 /// @dev Allowlist always can have users, and it is used for two purposes:321 /// in case of allowlist sponsoring mode, users will be sponsored if they exist in allowlist322 /// in case of allowlist access enabled, only users from allowlist may call this contract323 /// @param contractAddress Contract to get allowlist access of324 /// @return bool Is specified contract has allowlist access enabled325 fn allowlist_enabled(&self, contract_address: address) -> Result<bool> {326 Ok(<AllowlistEnabled<T>>::get(contract_address))327 }328329 /// Toggle contract allowlist access330 /// @param contractAddress Contract to change allowlist access of331 /// @param enabled Should allowlist access to be enabled?332 fn toggle_allowlist(333 &mut self,334 caller: caller,335 contract_address: address,336 enabled: bool,337 ) -> Result<void> {338 self.recorder().consume_sload()?;339 self.recorder().consume_sstore()?;340341 <Pallet<T>>::ensure_owner(contract_address, caller).map_err(dispatch_to_evm::<T>)?;342 <Pallet<T>>::toggle_allowlist(contract_address, enabled);343 Ok(())344 }345}346347/// Implements [`OnMethodCall`], which delegates call to [`ContractHelpers`]348pub struct HelpersOnMethodCall<T: Config>(PhantomData<*const T>);349impl<T: Config> OnMethodCall<T> for HelpersOnMethodCall<T>350where351 T::AccountId: AsRef<[u8; 32]>,352{353 fn is_reserved(contract: &sp_core::H160) -> bool {354 contract == &T::ContractAddress::get()355 }356357 fn is_used(contract: &sp_core::H160) -> bool {358 contract == &T::ContractAddress::get()359 }360361 fn call(handle: &mut impl PrecompileHandle) -> Option<PrecompileResult> {362 // TODO: Extract to another OnMethodCall handler363 if <AllowlistEnabled<T>>::get(handle.code_address())364 && !<Pallet<T>>::allowed(handle.code_address(), handle.context().caller)365 {366 return Some(Err(PrecompileFailure::Revert {367 exit_status: ExitRevert::Reverted,368 output: {369 let mut writer = AbiWriter::new_call(evm_coder::fn_selector!(Error(string)));370 writer.string("Target contract is allowlisted");371 writer.finish()372 },373 }));374 }375376 if handle.code_address() != T::ContractAddress::get() {377 return None;378 }379380 let helpers = ContractHelpers::<T>(SubstrateRecorder::<T>::new(handle.remaining_gas()));381 pallet_evm_coder_substrate::call(handle, helpers)382 }383384 fn get_code(contract: &sp_core::H160) -> Option<Vec<u8>> {385 (contract == &T::ContractAddress::get())386 .then(|| include_bytes!("./stubs/ContractHelpers.raw").to_vec())387 }388}389390/// Hooks into contract creation, storing owner of newly deployed contract391pub struct HelpersOnCreate<T: Config>(PhantomData<*const T>);392impl<T: Config> OnCreate<T> for HelpersOnCreate<T> {393 fn on_create(owner: H160, contract: H160) {394 <Owner<T>>::insert(contract, owner);395 }396}397398/// Bridge to pallet-sponsoring399pub struct HelpersContractSponsoring<T: Config>(PhantomData<*const T>);400impl<T: Config> SponsorshipHandler<T::CrossAccountId, CallContext>401 for HelpersContractSponsoring<T>402{403 fn get_sponsor(404 who: &T::CrossAccountId,405 call_context: &CallContext,406 ) -> Option<T::CrossAccountId> {407 let contract_address = call_context.contract_address;408 let mode = <Pallet<T>>::sponsoring_mode(contract_address);409 if mode == SponsoringModeT::Disabled {410 return None;411 }412413 let sponsor = match <Pallet<T>>::get_sponsor(contract_address) {414 Some(sponsor) => sponsor,415 None => return None,416 };417418 if mode == SponsoringModeT::Allowlisted419 && !<Pallet<T>>::allowed(contract_address, *who.as_eth())420 {421 return None;422 }423 let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;424425 if let Some(last_tx_block) = <SponsorBasket<T>>::get(contract_address, who.as_eth()) {426 let limit = <SponsoringRateLimit<T>>::get(contract_address);427428 let timeout = last_tx_block + limit;429 if block_number < timeout {430 return None;431 }432 }433434 let sponsored_fee_limit = get_sponsoring_fee_limit::<T>(contract_address);435436 if call_context.max_fee > sponsored_fee_limit {437 return None;438 }439440 <SponsorBasket<T>>::insert(contract_address, who.as_eth(), block_number);441442 Some(sponsor)443 }444}445446fn get_sponsoring_fee_limit<T: Config>(contract_address: address) -> uint256 {447 <SponsoringFeeLimit<T>>::get(contract_address)448 .get(&0xffffffff)449 .cloned()450 .unwrap_or(U256::MAX)451}452453generate_stubgen!(contract_helpers_impl, ContractHelpersCall<()>, true);454generate_stubgen!(contract_helpers_iface, ContractHelpersCall<()>, false);pallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterbothbinary blob — no preview
pallets/evm-contract-helpers/src/stubs/ContractHelpers.soldiffbeforeafterboth--- a/pallets/evm-contract-helpers/src/stubs/ContractHelpers.sol
+++ b/pallets/evm-contract-helpers/src/stubs/ContractHelpers.sol
@@ -96,11 +96,11 @@
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
/// @dev EVM selector for this function is: 0x766c4f37,
/// or in textual repr: sponsor(address)
- function sponsor(address contractAddress) public view returns (CrossAccount memory) {
+ function sponsor(address contractAddress) public view returns (CrossAddress memory) {
require(false, stub_error);
contractAddress;
dummy;
- return CrossAccount(0x0000000000000000000000000000000000000000, 0);
+ return CrossAddress(0x0000000000000000000000000000000000000000, 0);
}
/// Check tat contract has confirmed sponsor.
@@ -266,7 +266,7 @@
}
/// @dev Cross account struct
-struct CrossAccount {
+struct CrossAddress {
address eth;
uint256 sub;
}
pallets/fungible/src/erc.rsdiffbeforeafterboth--- a/pallets/fungible/src/erc.rs
+++ b/pallets/fungible/src/erc.rs
@@ -177,7 +177,7 @@
fn mint_cross(
&mut self,
caller: caller,
- to: pallet_common::eth::CrossAccount,
+ to: pallet_common::eth::CrossAddress,
amount: uint256,
) -> Result<bool> {
let caller = T::CrossAccountId::from_eth(caller);
@@ -195,7 +195,7 @@
fn approve_cross(
&mut self,
caller: caller,
- spender: pallet_common::eth::CrossAccount,
+ spender: pallet_common::eth::CrossAddress,
amount: uint256,
) -> Result<bool> {
let caller = T::CrossAccountId::from_eth(caller);
@@ -236,7 +236,7 @@
fn burn_from_cross(
&mut self,
caller: caller,
- from: pallet_common::eth::CrossAccount,
+ from: pallet_common::eth::CrossAddress,
amount: uint256,
) -> Result<bool> {
let caller = T::CrossAccountId::from_eth(caller);
@@ -278,7 +278,7 @@
fn transfer_cross(
&mut self,
caller: caller,
- to: pallet_common::eth::CrossAccount,
+ to: pallet_common::eth::CrossAddress,
amount: uint256,
) -> Result<bool> {
let caller = T::CrossAccountId::from_eth(caller);
@@ -296,8 +296,8 @@
fn transfer_from_cross(
&mut self,
caller: caller,
- from: pallet_common::eth::CrossAccount,
- to: pallet_common::eth::CrossAccount,
+ from: pallet_common::eth::CrossAddress,
+ to: pallet_common::eth::CrossAddress,
amount: uint256,
) -> Result<bool> {
let caller = T::CrossAccountId::from_eth(caller);
pallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth--- a/pallets/fungible/src/stubs/UniqueFungible.sol
+++ b/pallets/fungible/src/stubs/UniqueFungible.sol
@@ -114,7 +114,7 @@
/// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.
/// @dev EVM selector for this function is: 0x84a1d5a8,
/// or in textual repr: setCollectionSponsorCross((address,uint256))
- function setCollectionSponsorCross(CrossAccount memory sponsor) public {
+ function setCollectionSponsorCross(CrossAddress memory sponsor) public {
require(false, stub_error);
sponsor;
dummy = 0;
@@ -152,10 +152,10 @@
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
/// @dev EVM selector for this function is: 0x6ec0a9f1,
/// or in textual repr: collectionSponsor()
- function collectionSponsor() public view returns (CrossAccount memory) {
+ function collectionSponsor() public view returns (CrossAddress memory) {
require(false, stub_error);
dummy;
- return CrossAccount(0x0000000000000000000000000000000000000000, 0);
+ return CrossAddress(0x0000000000000000000000000000000000000000, 0);
}
/// Get current collection limits.
@@ -193,7 +193,7 @@
/// @param newAdmin Cross account administrator address.
/// @dev EVM selector for this function is: 0x859aa7d6,
/// or in textual repr: addCollectionAdminCross((address,uint256))
- function addCollectionAdminCross(CrossAccount memory newAdmin) public {
+ function addCollectionAdminCross(CrossAddress memory newAdmin) public {
require(false, stub_error);
newAdmin;
dummy = 0;
@@ -203,7 +203,7 @@
/// @param admin Cross account administrator address.
/// @dev EVM selector for this function is: 0x6c0cd173,
/// or in textual repr: removeCollectionAdminCross((address,uint256))
- function removeCollectionAdminCross(CrossAccount memory admin) public {
+ function removeCollectionAdminCross(CrossAddress memory admin) public {
require(false, stub_error);
admin;
dummy = 0;
@@ -289,7 +289,7 @@
/// @param user User address to check.
/// @dev EVM selector for this function is: 0x91b6df49,
/// or in textual repr: allowlistedCross((address,uint256))
- function allowlistedCross(CrossAccount memory user) public view returns (bool) {
+ function allowlistedCross(CrossAddress memory user) public view returns (bool) {
require(false, stub_error);
user;
dummy;
@@ -312,7 +312,7 @@
/// @param user User cross account address.
/// @dev EVM selector for this function is: 0xa0184a3a,
/// or in textual repr: addToCollectionAllowListCross((address,uint256))
- function addToCollectionAllowListCross(CrossAccount memory user) public {
+ function addToCollectionAllowListCross(CrossAddress memory user) public {
require(false, stub_error);
user;
dummy = 0;
@@ -334,7 +334,7 @@
/// @param user User cross account address.
/// @dev EVM selector for this function is: 0x09ba452a,
/// or in textual repr: removeFromCollectionAllowListCross((address,uint256))
- function removeFromCollectionAllowListCross(CrossAccount memory user) public {
+ function removeFromCollectionAllowListCross(CrossAddress memory user) public {
require(false, stub_error);
user;
dummy = 0;
@@ -370,7 +370,7 @@
/// @return "true" if account is the owner or admin
/// @dev EVM selector for this function is: 0x3e75a905,
/// or in textual repr: isOwnerOrAdminCross((address,uint256))
- function isOwnerOrAdminCross(CrossAccount memory user) public view returns (bool) {
+ function isOwnerOrAdminCross(CrossAddress memory user) public view returns (bool) {
require(false, stub_error);
user;
dummy;
@@ -394,10 +394,10 @@
/// If address is canonical then substrate mirror is zero and vice versa.
/// @dev EVM selector for this function is: 0xdf727d3b,
/// or in textual repr: collectionOwner()
- function collectionOwner() public view returns (CrossAccount memory) {
+ function collectionOwner() public view returns (CrossAddress memory) {
require(false, stub_error);
dummy;
- return CrossAccount(0x0000000000000000000000000000000000000000, 0);
+ return CrossAddress(0x0000000000000000000000000000000000000000, 0);
}
// /// Changes collection owner to another account
@@ -418,10 +418,10 @@
/// If address is canonical then substrate mirror is zero and vice versa.
/// @dev EVM selector for this function is: 0x5813216b,
/// or in textual repr: collectionAdmins()
- function collectionAdmins() public view returns (CrossAccount[] memory) {
+ function collectionAdmins() public view returns (CrossAddress[] memory) {
require(false, stub_error);
dummy;
- return new CrossAccount[](0);
+ return new CrossAddress[](0);
}
/// Changes collection owner to another account
@@ -430,7 +430,7 @@
/// @param newOwner new owner cross account
/// @dev EVM selector for this function is: 0x6496c497,
/// or in textual repr: changeCollectionOwnerCross((address,uint256))
- function changeCollectionOwnerCross(CrossAccount memory newOwner) public {
+ function changeCollectionOwnerCross(CrossAddress memory newOwner) public {
require(false, stub_error);
newOwner;
dummy = 0;
@@ -438,7 +438,7 @@
}
/// @dev Cross account struct
-struct CrossAccount {
+struct CrossAddress {
address eth;
uint256 sub;
}
@@ -516,7 +516,7 @@
/// @dev EVM selector for this function is: 0x269e6158,
/// or in textual repr: mintCross((address,uint256),uint256)
- function mintCross(CrossAccount memory to, uint256 amount) public returns (bool) {
+ function mintCross(CrossAddress memory to, uint256 amount) public returns (bool) {
require(false, stub_error);
to;
amount;
@@ -526,7 +526,7 @@
/// @dev EVM selector for this function is: 0x0ecd0ab0,
/// or in textual repr: approveCross((address,uint256),uint256)
- function approveCross(CrossAccount memory spender, uint256 amount) public returns (bool) {
+ function approveCross(CrossAddress memory spender, uint256 amount) public returns (bool) {
require(false, stub_error);
spender;
amount;
@@ -556,7 +556,7 @@
/// @param amount The amount that will be burnt.
/// @dev EVM selector for this function is: 0xbb2f5a58,
/// or in textual repr: burnFromCross((address,uint256),uint256)
- function burnFromCross(CrossAccount memory from, uint256 amount) public returns (bool) {
+ function burnFromCross(CrossAddress memory from, uint256 amount) public returns (bool) {
require(false, stub_error);
from;
amount;
@@ -577,7 +577,7 @@
/// @dev EVM selector for this function is: 0x2ada85ff,
/// or in textual repr: transferCross((address,uint256),uint256)
- function transferCross(CrossAccount memory to, uint256 amount) public returns (bool) {
+ function transferCross(CrossAddress memory to, uint256 amount) public returns (bool) {
require(false, stub_error);
to;
amount;
@@ -588,8 +588,8 @@
/// @dev EVM selector for this function is: 0xd5cf430b,
/// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)
function transferFromCross(
- CrossAccount memory from,
- CrossAccount memory to,
+ CrossAddress memory from,
+ CrossAddress memory to,
uint256 amount
) public returns (bool) {
require(false, stub_error);
pallets/nonfungible/src/erc.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -762,9 +762,9 @@
/// Returns the owner (in cross format) of the token.
///
/// @param tokenId Id for the token.
- fn cross_owner_of(&self, token_id: uint256) -> Result<pallet_common::eth::CrossAccount> {
+ fn cross_owner_of(&self, token_id: uint256) -> Result<pallet_common::eth::CrossAddress> {
Self::token_owner(&self, token_id.try_into()?)
- .map(|o| pallet_common::eth::CrossAccount::from_sub_cross_account::<T>(&o))
+ .map(|o| pallet_common::eth::CrossAddress::from_sub_cross_account::<T>(&o))
.ok_or(Error::Revert("key too large".into()))
}
@@ -812,7 +812,7 @@
fn approve_cross(
&mut self,
caller: caller,
- approved: pallet_common::eth::CrossAccount,
+ approved: pallet_common::eth::CrossAddress,
token_id: uint256,
) -> Result<void> {
let caller = T::CrossAccountId::from_eth(caller);
@@ -851,7 +851,7 @@
fn transfer_cross(
&mut self,
caller: caller,
- to: pallet_common::eth::CrossAccount,
+ to: pallet_common::eth::CrossAddress,
token_id: uint256,
) -> Result<void> {
let caller = T::CrossAccountId::from_eth(caller);
@@ -875,8 +875,8 @@
fn transfer_from_cross(
&mut self,
caller: caller,
- from: pallet_common::eth::CrossAccount,
- to: pallet_common::eth::CrossAccount,
+ from: pallet_common::eth::CrossAddress,
+ to: pallet_common::eth::CrossAddress,
token_id: uint256,
) -> Result<void> {
let caller = T::CrossAccountId::from_eth(caller);
@@ -922,7 +922,7 @@
fn burn_from_cross(
&mut self,
caller: caller,
- from: pallet_common::eth::CrossAccount,
+ from: pallet_common::eth::CrossAddress,
token_id: uint256,
) -> Result<void> {
let caller = T::CrossAccountId::from_eth(caller);
@@ -1044,7 +1044,7 @@
fn mint_cross(
&mut self,
caller: caller,
- to: pallet_common::eth::CrossAccount,
+ to: pallet_common::eth::CrossAddress,
properties: Vec<pallet_common::eth::Property>,
) -> Result<uint256> {
let token_id = <TokensMinted<T>>::get(self.id)
pallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterbothbinary blob — no preview
pallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth--- a/pallets/nonfungible/src/stubs/UniqueNFT.sol
+++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol
@@ -256,7 +256,7 @@
/// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.
/// @dev EVM selector for this function is: 0x84a1d5a8,
/// or in textual repr: setCollectionSponsorCross((address,uint256))
- function setCollectionSponsorCross(CrossAccount memory sponsor) public {
+ function setCollectionSponsorCross(CrossAddress memory sponsor) public {
require(false, stub_error);
sponsor;
dummy = 0;
@@ -294,10 +294,10 @@
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
/// @dev EVM selector for this function is: 0x6ec0a9f1,
/// or in textual repr: collectionSponsor()
- function collectionSponsor() public view returns (CrossAccount memory) {
+ function collectionSponsor() public view returns (CrossAddress memory) {
require(false, stub_error);
dummy;
- return CrossAccount(0x0000000000000000000000000000000000000000, 0);
+ return CrossAddress(0x0000000000000000000000000000000000000000, 0);
}
/// Get current collection limits.
@@ -335,7 +335,7 @@
/// @param newAdmin Cross account administrator address.
/// @dev EVM selector for this function is: 0x859aa7d6,
/// or in textual repr: addCollectionAdminCross((address,uint256))
- function addCollectionAdminCross(CrossAccount memory newAdmin) public {
+ function addCollectionAdminCross(CrossAddress memory newAdmin) public {
require(false, stub_error);
newAdmin;
dummy = 0;
@@ -345,7 +345,7 @@
/// @param admin Cross account administrator address.
/// @dev EVM selector for this function is: 0x6c0cd173,
/// or in textual repr: removeCollectionAdminCross((address,uint256))
- function removeCollectionAdminCross(CrossAccount memory admin) public {
+ function removeCollectionAdminCross(CrossAddress memory admin) public {
require(false, stub_error);
admin;
dummy = 0;
@@ -431,7 +431,7 @@
/// @param user User address to check.
/// @dev EVM selector for this function is: 0x91b6df49,
/// or in textual repr: allowlistedCross((address,uint256))
- function allowlistedCross(CrossAccount memory user) public view returns (bool) {
+ function allowlistedCross(CrossAddress memory user) public view returns (bool) {
require(false, stub_error);
user;
dummy;
@@ -454,7 +454,7 @@
/// @param user User cross account address.
/// @dev EVM selector for this function is: 0xa0184a3a,
/// or in textual repr: addToCollectionAllowListCross((address,uint256))
- function addToCollectionAllowListCross(CrossAccount memory user) public {
+ function addToCollectionAllowListCross(CrossAddress memory user) public {
require(false, stub_error);
user;
dummy = 0;
@@ -476,7 +476,7 @@
/// @param user User cross account address.
/// @dev EVM selector for this function is: 0x09ba452a,
/// or in textual repr: removeFromCollectionAllowListCross((address,uint256))
- function removeFromCollectionAllowListCross(CrossAccount memory user) public {
+ function removeFromCollectionAllowListCross(CrossAddress memory user) public {
require(false, stub_error);
user;
dummy = 0;
@@ -512,7 +512,7 @@
/// @return "true" if account is the owner or admin
/// @dev EVM selector for this function is: 0x3e75a905,
/// or in textual repr: isOwnerOrAdminCross((address,uint256))
- function isOwnerOrAdminCross(CrossAccount memory user) public view returns (bool) {
+ function isOwnerOrAdminCross(CrossAddress memory user) public view returns (bool) {
require(false, stub_error);
user;
dummy;
@@ -536,10 +536,10 @@
/// If address is canonical then substrate mirror is zero and vice versa.
/// @dev EVM selector for this function is: 0xdf727d3b,
/// or in textual repr: collectionOwner()
- function collectionOwner() public view returns (CrossAccount memory) {
+ function collectionOwner() public view returns (CrossAddress memory) {
require(false, stub_error);
dummy;
- return CrossAccount(0x0000000000000000000000000000000000000000, 0);
+ return CrossAddress(0x0000000000000000000000000000000000000000, 0);
}
// /// Changes collection owner to another account
@@ -560,10 +560,10 @@
/// If address is canonical then substrate mirror is zero and vice versa.
/// @dev EVM selector for this function is: 0x5813216b,
/// or in textual repr: collectionAdmins()
- function collectionAdmins() public view returns (CrossAccount[] memory) {
+ function collectionAdmins() public view returns (CrossAddress[] memory) {
require(false, stub_error);
dummy;
- return new CrossAccount[](0);
+ return new CrossAddress[](0);
}
/// Changes collection owner to another account
@@ -572,7 +572,7 @@
/// @param newOwner new owner cross account
/// @dev EVM selector for this function is: 0x6496c497,
/// or in textual repr: changeCollectionOwnerCross((address,uint256))
- function changeCollectionOwnerCross(CrossAccount memory newOwner) public {
+ function changeCollectionOwnerCross(CrossAddress memory newOwner) public {
require(false, stub_error);
newOwner;
dummy = 0;
@@ -580,7 +580,7 @@
}
/// @dev Cross account struct
-struct CrossAccount {
+struct CrossAddress {
address eth;
uint256 sub;
}
@@ -817,11 +817,11 @@
/// @param tokenId Id for the token.
/// @dev EVM selector for this function is: 0x2b29dace,
/// or in textual repr: crossOwnerOf(uint256)
- function crossOwnerOf(uint256 tokenId) public view returns (CrossAccount memory) {
+ function crossOwnerOf(uint256 tokenId) public view returns (CrossAddress memory) {
require(false, stub_error);
tokenId;
dummy;
- return CrossAccount(0x0000000000000000000000000000000000000000, 0);
+ return CrossAddress(0x0000000000000000000000000000000000000000, 0);
}
/// Returns the token properties.
@@ -847,7 +847,7 @@
/// @param tokenId The NFT to approve
/// @dev EVM selector for this function is: 0x0ecd0ab0,
/// or in textual repr: approveCross((address,uint256),uint256)
- function approveCross(CrossAccount memory approved, uint256 tokenId) public {
+ function approveCross(CrossAddress memory approved, uint256 tokenId) public {
require(false, stub_error);
approved;
tokenId;
@@ -875,7 +875,7 @@
/// @param tokenId The NFT to transfer
/// @dev EVM selector for this function is: 0x2ada85ff,
/// or in textual repr: transferCross((address,uint256),uint256)
- function transferCross(CrossAccount memory to, uint256 tokenId) public {
+ function transferCross(CrossAddress memory to, uint256 tokenId) public {
require(false, stub_error);
to;
tokenId;
@@ -891,8 +891,8 @@
/// @dev EVM selector for this function is: 0xd5cf430b,
/// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)
function transferFromCross(
- CrossAccount memory from,
- CrossAccount memory to,
+ CrossAddress memory from,
+ CrossAddress memory to,
uint256 tokenId
) public {
require(false, stub_error);
@@ -925,7 +925,7 @@
/// @param tokenId The NFT to transfer
/// @dev EVM selector for this function is: 0xbb2f5a58,
/// or in textual repr: burnFromCross((address,uint256),uint256)
- function burnFromCross(CrossAccount memory from, uint256 tokenId) public {
+ function burnFromCross(CrossAddress memory from, uint256 tokenId) public {
require(false, stub_error);
from;
tokenId;
@@ -977,7 +977,7 @@
/// @return uint256 The id of the newly minted token
/// @dev EVM selector for this function is: 0xb904db03,
/// or in textual repr: mintCross((address,uint256),(string,bytes)[])
- function mintCross(CrossAccount memory to, Property[] memory properties) public returns (uint256) {
+ function mintCross(CrossAddress memory to, Property[] memory properties) public returns (uint256) {
require(false, stub_error);
to;
properties;
pallets/refungible/src/erc.rsdiffbeforeafterboth--- a/pallets/refungible/src/erc.rs
+++ b/pallets/refungible/src/erc.rs
@@ -797,9 +797,9 @@
/// Returns the owner (in cross format) of the token.
///
/// @param tokenId Id for the token.
- fn cross_owner_of(&self, token_id: uint256) -> Result<pallet_common::eth::CrossAccount> {
+ fn cross_owner_of(&self, token_id: uint256) -> Result<pallet_common::eth::CrossAddress> {
Self::token_owner(&self, token_id.try_into()?)
- .map(|o| pallet_common::eth::CrossAccount::from_sub_cross_account::<T>(&o))
+ .map(|o| pallet_common::eth::CrossAddress::from_sub_cross_account::<T>(&o))
.ok_or(Error::Revert("key too large".into()))
}
@@ -869,7 +869,7 @@
fn transfer_cross(
&mut self,
caller: caller,
- to: pallet_common::eth::CrossAccount,
+ to: pallet_common::eth::CrossAddress,
token_id: uint256,
) -> Result<void> {
let caller = T::CrossAccountId::from_eth(caller);
@@ -897,8 +897,8 @@
fn transfer_from_cross(
&mut self,
caller: caller,
- from: pallet_common::eth::CrossAccount,
- to: pallet_common::eth::CrossAccount,
+ from: pallet_common::eth::CrossAddress,
+ to: pallet_common::eth::CrossAddress,
token_id: uint256,
) -> Result<void> {
let caller = T::CrossAccountId::from_eth(caller);
@@ -953,7 +953,7 @@
fn burn_from_cross(
&mut self,
caller: caller,
- from: pallet_common::eth::CrossAccount,
+ from: pallet_common::eth::CrossAddress,
token_id: uint256,
) -> Result<void> {
let caller = T::CrossAccountId::from_eth(caller);
@@ -1090,7 +1090,7 @@
fn mint_cross(
&mut self,
caller: caller,
- to: pallet_common::eth::CrossAccount,
+ to: pallet_common::eth::CrossAddress,
properties: Vec<pallet_common::eth::Property>,
) -> Result<uint256> {
let token_id = <TokensMinted<T>>::get(self.id)
pallets/refungible/src/erc_token.rsdiffbeforeafterboth--- a/pallets/refungible/src/erc_token.rs
+++ b/pallets/refungible/src/erc_token.rs
@@ -224,7 +224,7 @@
fn burn_from_cross(
&mut self,
caller: caller,
- from: pallet_common::eth::CrossAccount,
+ from: pallet_common::eth::CrossAddress,
amount: uint256,
) -> Result<bool> {
let caller = T::CrossAccountId::from_eth(caller);
@@ -250,7 +250,7 @@
fn approve_cross(
&mut self,
caller: caller,
- spender: pallet_common::eth::CrossAccount,
+ spender: pallet_common::eth::CrossAddress,
amount: uint256,
) -> Result<bool> {
let caller = T::CrossAccountId::from_eth(caller);
@@ -280,7 +280,7 @@
fn transfer_cross(
&mut self,
caller: caller,
- to: pallet_common::eth::CrossAccount,
+ to: pallet_common::eth::CrossAddress,
amount: uint256,
) -> Result<bool> {
let caller = T::CrossAccountId::from_eth(caller);
@@ -303,8 +303,8 @@
fn transfer_from_cross(
&mut self,
caller: caller,
- from: pallet_common::eth::CrossAccount,
- to: pallet_common::eth::CrossAccount,
+ from: pallet_common::eth::CrossAddress,
+ to: pallet_common::eth::CrossAddress,
amount: uint256,
) -> Result<bool> {
let caller = T::CrossAccountId::from_eth(caller);
pallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth--- a/pallets/refungible/src/stubs/UniqueRefungible.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungible.sol
@@ -256,7 +256,7 @@
/// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.
/// @dev EVM selector for this function is: 0x84a1d5a8,
/// or in textual repr: setCollectionSponsorCross((address,uint256))
- function setCollectionSponsorCross(CrossAccount memory sponsor) public {
+ function setCollectionSponsorCross(CrossAddress memory sponsor) public {
require(false, stub_error);
sponsor;
dummy = 0;
@@ -294,10 +294,10 @@
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
/// @dev EVM selector for this function is: 0x6ec0a9f1,
/// or in textual repr: collectionSponsor()
- function collectionSponsor() public view returns (CrossAccount memory) {
+ function collectionSponsor() public view returns (CrossAddress memory) {
require(false, stub_error);
dummy;
- return CrossAccount(0x0000000000000000000000000000000000000000, 0);
+ return CrossAddress(0x0000000000000000000000000000000000000000, 0);
}
/// Get current collection limits.
@@ -335,7 +335,7 @@
/// @param newAdmin Cross account administrator address.
/// @dev EVM selector for this function is: 0x859aa7d6,
/// or in textual repr: addCollectionAdminCross((address,uint256))
- function addCollectionAdminCross(CrossAccount memory newAdmin) public {
+ function addCollectionAdminCross(CrossAddress memory newAdmin) public {
require(false, stub_error);
newAdmin;
dummy = 0;
@@ -345,7 +345,7 @@
/// @param admin Cross account administrator address.
/// @dev EVM selector for this function is: 0x6c0cd173,
/// or in textual repr: removeCollectionAdminCross((address,uint256))
- function removeCollectionAdminCross(CrossAccount memory admin) public {
+ function removeCollectionAdminCross(CrossAddress memory admin) public {
require(false, stub_error);
admin;
dummy = 0;
@@ -431,7 +431,7 @@
/// @param user User address to check.
/// @dev EVM selector for this function is: 0x91b6df49,
/// or in textual repr: allowlistedCross((address,uint256))
- function allowlistedCross(CrossAccount memory user) public view returns (bool) {
+ function allowlistedCross(CrossAddress memory user) public view returns (bool) {
require(false, stub_error);
user;
dummy;
@@ -454,7 +454,7 @@
/// @param user User cross account address.
/// @dev EVM selector for this function is: 0xa0184a3a,
/// or in textual repr: addToCollectionAllowListCross((address,uint256))
- function addToCollectionAllowListCross(CrossAccount memory user) public {
+ function addToCollectionAllowListCross(CrossAddress memory user) public {
require(false, stub_error);
user;
dummy = 0;
@@ -476,7 +476,7 @@
/// @param user User cross account address.
/// @dev EVM selector for this function is: 0x09ba452a,
/// or in textual repr: removeFromCollectionAllowListCross((address,uint256))
- function removeFromCollectionAllowListCross(CrossAccount memory user) public {
+ function removeFromCollectionAllowListCross(CrossAddress memory user) public {
require(false, stub_error);
user;
dummy = 0;
@@ -512,7 +512,7 @@
/// @return "true" if account is the owner or admin
/// @dev EVM selector for this function is: 0x3e75a905,
/// or in textual repr: isOwnerOrAdminCross((address,uint256))
- function isOwnerOrAdminCross(CrossAccount memory user) public view returns (bool) {
+ function isOwnerOrAdminCross(CrossAddress memory user) public view returns (bool) {
require(false, stub_error);
user;
dummy;
@@ -536,10 +536,10 @@
/// If address is canonical then substrate mirror is zero and vice versa.
/// @dev EVM selector for this function is: 0xdf727d3b,
/// or in textual repr: collectionOwner()
- function collectionOwner() public view returns (CrossAccount memory) {
+ function collectionOwner() public view returns (CrossAddress memory) {
require(false, stub_error);
dummy;
- return CrossAccount(0x0000000000000000000000000000000000000000, 0);
+ return CrossAddress(0x0000000000000000000000000000000000000000, 0);
}
// /// Changes collection owner to another account
@@ -560,10 +560,10 @@
/// If address is canonical then substrate mirror is zero and vice versa.
/// @dev EVM selector for this function is: 0x5813216b,
/// or in textual repr: collectionAdmins()
- function collectionAdmins() public view returns (CrossAccount[] memory) {
+ function collectionAdmins() public view returns (CrossAddress[] memory) {
require(false, stub_error);
dummy;
- return new CrossAccount[](0);
+ return new CrossAddress[](0);
}
/// Changes collection owner to another account
@@ -572,7 +572,7 @@
/// @param newOwner new owner cross account
/// @dev EVM selector for this function is: 0x6496c497,
/// or in textual repr: changeCollectionOwnerCross((address,uint256))
- function changeCollectionOwnerCross(CrossAccount memory newOwner) public {
+ function changeCollectionOwnerCross(CrossAddress memory newOwner) public {
require(false, stub_error);
newOwner;
dummy = 0;
@@ -580,7 +580,7 @@
}
/// @dev Cross account struct
-struct CrossAccount {
+struct CrossAddress {
address eth;
uint256 sub;
}
@@ -815,11 +815,11 @@
/// @param tokenId Id for the token.
/// @dev EVM selector for this function is: 0x2b29dace,
/// or in textual repr: crossOwnerOf(uint256)
- function crossOwnerOf(uint256 tokenId) public view returns (CrossAccount memory) {
+ function crossOwnerOf(uint256 tokenId) public view returns (CrossAddress memory) {
require(false, stub_error);
tokenId;
dummy;
- return CrossAccount(0x0000000000000000000000000000000000000000, 0);
+ return CrossAddress(0x0000000000000000000000000000000000000000, 0);
}
/// Returns the token properties.
@@ -860,7 +860,7 @@
/// @param tokenId The RFT to transfer
/// @dev EVM selector for this function is: 0x2ada85ff,
/// or in textual repr: transferCross((address,uint256),uint256)
- function transferCross(CrossAccount memory to, uint256 tokenId) public {
+ function transferCross(CrossAddress memory to, uint256 tokenId) public {
require(false, stub_error);
to;
tokenId;
@@ -876,8 +876,8 @@
/// @dev EVM selector for this function is: 0xd5cf430b,
/// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)
function transferFromCross(
- CrossAccount memory from,
- CrossAccount memory to,
+ CrossAddress memory from,
+ CrossAddress memory to,
uint256 tokenId
) public {
require(false, stub_error);
@@ -912,7 +912,7 @@
/// @param tokenId The RFT to transfer
/// @dev EVM selector for this function is: 0xbb2f5a58,
/// or in textual repr: burnFromCross((address,uint256),uint256)
- function burnFromCross(CrossAccount memory from, uint256 tokenId) public {
+ function burnFromCross(CrossAddress memory from, uint256 tokenId) public {
require(false, stub_error);
from;
tokenId;
@@ -964,7 +964,7 @@
/// @return uint256 The id of the newly minted token
/// @dev EVM selector for this function is: 0xb904db03,
/// or in textual repr: mintCross((address,uint256),(string,bytes)[])
- function mintCross(CrossAccount memory to, Property[] memory properties) public returns (uint256) {
+ function mintCross(CrossAddress memory to, Property[] memory properties) public returns (uint256) {
require(false, stub_error);
to;
properties;
pallets/refungible/src/stubs/UniqueRefungibleToken.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungibleToken.soldiffbeforeafterboth--- a/pallets/refungible/src/stubs/UniqueRefungibleToken.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungibleToken.sol
@@ -58,7 +58,7 @@
/// @param amount The amount that will be burnt.
/// @dev EVM selector for this function is: 0xbb2f5a58,
/// or in textual repr: burnFromCross((address,uint256),uint256)
- function burnFromCross(CrossAccount memory from, uint256 amount) public returns (bool) {
+ function burnFromCross(CrossAddress memory from, uint256 amount) public returns (bool) {
require(false, stub_error);
from;
amount;
@@ -75,7 +75,7 @@
/// @param amount The amount of tokens to be spent.
/// @dev EVM selector for this function is: 0x0ecd0ab0,
/// or in textual repr: approveCross((address,uint256),uint256)
- function approveCross(CrossAccount memory spender, uint256 amount) public returns (bool) {
+ function approveCross(CrossAddress memory spender, uint256 amount) public returns (bool) {
require(false, stub_error);
spender;
amount;
@@ -100,7 +100,7 @@
/// @param amount The amount to be transferred.
/// @dev EVM selector for this function is: 0x2ada85ff,
/// or in textual repr: transferCross((address,uint256),uint256)
- function transferCross(CrossAccount memory to, uint256 amount) public returns (bool) {
+ function transferCross(CrossAddress memory to, uint256 amount) public returns (bool) {
require(false, stub_error);
to;
amount;
@@ -115,8 +115,8 @@
/// @dev EVM selector for this function is: 0xd5cf430b,
/// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)
function transferFromCross(
- CrossAccount memory from,
- CrossAccount memory to,
+ CrossAddress memory from,
+ CrossAddress memory to,
uint256 amount
) public returns (bool) {
require(false, stub_error);
@@ -129,7 +129,7 @@
}
/// @dev Cross account struct
-struct CrossAccount {
+struct CrossAddress {
address eth;
uint256 sub;
}
tests/src/eth/abi/contractHelpers.jsondiffbeforeafterboth--- a/tests/src/eth/abi/contractHelpers.json
+++ b/tests/src/eth/abi/contractHelpers.json
@@ -226,7 +226,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "",
"type": "tuple"
}
tests/src/eth/abi/fungible.jsondiffbeforeafterboth--- a/tests/src/eth/abi/fungible.json
+++ b/tests/src/eth/abi/fungible.json
@@ -56,7 +56,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "newAdmin",
"type": "tuple"
}
@@ -73,7 +73,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "user",
"type": "tuple"
}
@@ -100,7 +100,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "user",
"type": "tuple"
}
@@ -127,7 +127,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "spender",
"type": "tuple"
},
@@ -154,7 +154,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "from",
"type": "tuple"
},
@@ -172,7 +172,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "newOwner",
"type": "tuple"
}
@@ -191,7 +191,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount[]",
+ "internalType": "struct CrossAddress[]",
"name": "",
"type": "tuple[]"
}
@@ -282,7 +282,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "",
"type": "tuple"
}
@@ -325,7 +325,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "",
"type": "tuple"
}
@@ -384,7 +384,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "user",
"type": "tuple"
}
@@ -428,7 +428,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "to",
"type": "tuple"
},
@@ -453,7 +453,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "admin",
"type": "tuple"
}
@@ -477,7 +477,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "user",
"type": "tuple"
}
@@ -575,7 +575,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "sponsor",
"type": "tuple"
}
@@ -625,7 +625,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "to",
"type": "tuple"
},
@@ -654,7 +654,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "from",
"type": "tuple"
},
@@ -663,7 +663,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "to",
"type": "tuple"
},
tests/src/eth/abi/nonFungible.jsondiffbeforeafterboth--- a/tests/src/eth/abi/nonFungible.json
+++ b/tests/src/eth/abi/nonFungible.json
@@ -87,7 +87,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "newAdmin",
"type": "tuple"
}
@@ -104,7 +104,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "user",
"type": "tuple"
}
@@ -121,7 +121,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "user",
"type": "tuple"
}
@@ -148,7 +148,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "approved",
"type": "tuple"
},
@@ -184,7 +184,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "from",
"type": "tuple"
},
@@ -202,7 +202,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "newOwner",
"type": "tuple"
}
@@ -221,7 +221,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount[]",
+ "internalType": "struct CrossAddress[]",
"name": "",
"type": "tuple[]"
}
@@ -312,7 +312,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "",
"type": "tuple"
}
@@ -355,7 +355,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "",
"type": "tuple"
}
@@ -388,7 +388,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "",
"type": "tuple"
}
@@ -462,7 +462,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "user",
"type": "tuple"
}
@@ -486,7 +486,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "to",
"type": "tuple"
},
@@ -582,7 +582,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "admin",
"type": "tuple"
}
@@ -606,7 +606,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "user",
"type": "tuple"
}
@@ -737,7 +737,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "sponsor",
"type": "tuple"
}
@@ -891,7 +891,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "to",
"type": "tuple"
},
@@ -920,7 +920,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "from",
"type": "tuple"
},
@@ -929,7 +929,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "to",
"type": "tuple"
},
tests/src/eth/abi/reFungible.jsondiffbeforeafterboth--- a/tests/src/eth/abi/reFungible.json
+++ b/tests/src/eth/abi/reFungible.json
@@ -87,7 +87,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "newAdmin",
"type": "tuple"
}
@@ -104,7 +104,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "user",
"type": "tuple"
}
@@ -121,7 +121,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "user",
"type": "tuple"
}
@@ -166,7 +166,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "from",
"type": "tuple"
},
@@ -184,7 +184,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "newOwner",
"type": "tuple"
}
@@ -203,7 +203,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount[]",
+ "internalType": "struct CrossAddress[]",
"name": "",
"type": "tuple[]"
}
@@ -294,7 +294,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "",
"type": "tuple"
}
@@ -337,7 +337,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "",
"type": "tuple"
}
@@ -370,7 +370,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "",
"type": "tuple"
}
@@ -444,7 +444,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "user",
"type": "tuple"
}
@@ -468,7 +468,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "to",
"type": "tuple"
},
@@ -564,7 +564,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "admin",
"type": "tuple"
}
@@ -588,7 +588,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "user",
"type": "tuple"
}
@@ -719,7 +719,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "sponsor",
"type": "tuple"
}
@@ -882,7 +882,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "to",
"type": "tuple"
},
@@ -911,7 +911,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "from",
"type": "tuple"
},
@@ -920,7 +920,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "to",
"type": "tuple"
},
tests/src/eth/abi/reFungibleToken.jsondiffbeforeafterboth--- a/tests/src/eth/abi/reFungibleToken.json
+++ b/tests/src/eth/abi/reFungibleToken.json
@@ -76,7 +76,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "spender",
"type": "tuple"
},
@@ -113,7 +113,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "from",
"type": "tuple"
},
@@ -201,7 +201,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "to",
"type": "tuple"
},
@@ -230,7 +230,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "from",
"type": "tuple"
},
@@ -239,7 +239,7 @@
{ "internalType": "address", "name": "eth", "type": "address" },
{ "internalType": "uint256", "name": "sub", "type": "uint256" }
],
- "internalType": "struct CrossAccount",
+ "internalType": "struct CrossAddress",
"name": "to",
"type": "tuple"
},
tests/src/eth/api/ContractHelpers.soldiffbeforeafterboth--- a/tests/src/eth/api/ContractHelpers.sol
+++ b/tests/src/eth/api/ContractHelpers.sol
@@ -69,7 +69,7 @@
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
/// @dev EVM selector for this function is: 0x766c4f37,
/// or in textual repr: sponsor(address)
- function sponsor(address contractAddress) external view returns (CrossAccount memory);
+ function sponsor(address contractAddress) external view returns (CrossAddress memory);
/// Check tat contract has confirmed sponsor.
///
@@ -172,7 +172,7 @@
}
/// @dev Cross account struct
-struct CrossAccount {
+struct CrossAddress {
address eth;
uint256 sub;
}
tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -78,7 +78,7 @@
/// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.
/// @dev EVM selector for this function is: 0x84a1d5a8,
/// or in textual repr: setCollectionSponsorCross((address,uint256))
- function setCollectionSponsorCross(CrossAccount memory sponsor) external;
+ function setCollectionSponsorCross(CrossAddress memory sponsor) external;
/// Whether there is a pending sponsor.
/// @dev EVM selector for this function is: 0x058ac185,
@@ -102,7 +102,7 @@
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
/// @dev EVM selector for this function is: 0x6ec0a9f1,
/// or in textual repr: collectionSponsor()
- function collectionSponsor() external view returns (CrossAccount memory);
+ function collectionSponsor() external view returns (CrossAddress memory);
/// Get current collection limits.
///
@@ -127,13 +127,13 @@
/// @param newAdmin Cross account administrator address.
/// @dev EVM selector for this function is: 0x859aa7d6,
/// or in textual repr: addCollectionAdminCross((address,uint256))
- function addCollectionAdminCross(CrossAccount memory newAdmin) external;
+ function addCollectionAdminCross(CrossAddress memory newAdmin) external;
/// Remove collection admin.
/// @param admin Cross account administrator address.
/// @dev EVM selector for this function is: 0x6c0cd173,
/// or in textual repr: removeCollectionAdminCross((address,uint256))
- function removeCollectionAdminCross(CrossAccount memory admin) external;
+ function removeCollectionAdminCross(CrossAddress memory admin) external;
// /// Add collection admin.
// /// @param newAdmin Address of the added administrator.
@@ -186,7 +186,7 @@
/// @param user User address to check.
/// @dev EVM selector for this function is: 0x91b6df49,
/// or in textual repr: allowlistedCross((address,uint256))
- function allowlistedCross(CrossAccount memory user) external view returns (bool);
+ function allowlistedCross(CrossAddress memory user) external view returns (bool);
// /// Add the user to the allowed list.
// ///
@@ -200,7 +200,7 @@
/// @param user User cross account address.
/// @dev EVM selector for this function is: 0xa0184a3a,
/// or in textual repr: addToCollectionAllowListCross((address,uint256))
- function addToCollectionAllowListCross(CrossAccount memory user) external;
+ function addToCollectionAllowListCross(CrossAddress memory user) external;
// /// Remove the user from the allowed list.
// ///
@@ -214,7 +214,7 @@
/// @param user User cross account address.
/// @dev EVM selector for this function is: 0x09ba452a,
/// or in textual repr: removeFromCollectionAllowListCross((address,uint256))
- function removeFromCollectionAllowListCross(CrossAccount memory user) external;
+ function removeFromCollectionAllowListCross(CrossAddress memory user) external;
/// Switch permission for minting.
///
@@ -237,7 +237,7 @@
/// @return "true" if account is the owner or admin
/// @dev EVM selector for this function is: 0x3e75a905,
/// or in textual repr: isOwnerOrAdminCross((address,uint256))
- function isOwnerOrAdminCross(CrossAccount memory user) external view returns (bool);
+ function isOwnerOrAdminCross(CrossAddress memory user) external view returns (bool);
/// Returns collection type
///
@@ -252,7 +252,7 @@
/// If address is canonical then substrate mirror is zero and vice versa.
/// @dev EVM selector for this function is: 0xdf727d3b,
/// or in textual repr: collectionOwner()
- function collectionOwner() external view returns (CrossAccount memory);
+ function collectionOwner() external view returns (CrossAddress memory);
// /// Changes collection owner to another account
// ///
@@ -268,7 +268,7 @@
/// If address is canonical then substrate mirror is zero and vice versa.
/// @dev EVM selector for this function is: 0x5813216b,
/// or in textual repr: collectionAdmins()
- function collectionAdmins() external view returns (CrossAccount[] memory);
+ function collectionAdmins() external view returns (CrossAddress[] memory);
/// Changes collection owner to another account
///
@@ -276,11 +276,11 @@
/// @param newOwner new owner cross account
/// @dev EVM selector for this function is: 0x6496c497,
/// or in textual repr: changeCollectionOwnerCross((address,uint256))
- function changeCollectionOwnerCross(CrossAccount memory newOwner) external;
+ function changeCollectionOwnerCross(CrossAddress memory newOwner) external;
}
/// @dev Cross account struct
-struct CrossAccount {
+struct CrossAddress {
address eth;
uint256 sub;
}
@@ -354,11 +354,11 @@
/// @dev EVM selector for this function is: 0x269e6158,
/// or in textual repr: mintCross((address,uint256),uint256)
- function mintCross(CrossAccount memory to, uint256 amount) external returns (bool);
+ function mintCross(CrossAddress memory to, uint256 amount) external returns (bool);
/// @dev EVM selector for this function is: 0x0ecd0ab0,
/// or in textual repr: approveCross((address,uint256),uint256)
- function approveCross(CrossAccount memory spender, uint256 amount) external returns (bool);
+ function approveCross(CrossAddress memory spender, uint256 amount) external returns (bool);
// /// Burn tokens from account
// /// @dev Function that burns an `amount` of the tokens of a given account,
@@ -376,7 +376,7 @@
/// @param amount The amount that will be burnt.
/// @dev EVM selector for this function is: 0xbb2f5a58,
/// or in textual repr: burnFromCross((address,uint256),uint256)
- function burnFromCross(CrossAccount memory from, uint256 amount) external returns (bool);
+ function burnFromCross(CrossAddress memory from, uint256 amount) external returns (bool);
/// Mint tokens for multiple accounts.
/// @param amounts array of pairs of account address and amount
@@ -386,13 +386,13 @@
/// @dev EVM selector for this function is: 0x2ada85ff,
/// or in textual repr: transferCross((address,uint256),uint256)
- function transferCross(CrossAccount memory to, uint256 amount) external returns (bool);
+ function transferCross(CrossAddress memory to, uint256 amount) external returns (bool);
/// @dev EVM selector for this function is: 0xd5cf430b,
/// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)
function transferFromCross(
- CrossAccount memory from,
- CrossAccount memory to,
+ CrossAddress memory from,
+ CrossAddress memory to,
uint256 amount
) external returns (bool);
}
tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -178,7 +178,7 @@
/// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.
/// @dev EVM selector for this function is: 0x84a1d5a8,
/// or in textual repr: setCollectionSponsorCross((address,uint256))
- function setCollectionSponsorCross(CrossAccount memory sponsor) external;
+ function setCollectionSponsorCross(CrossAddress memory sponsor) external;
/// Whether there is a pending sponsor.
/// @dev EVM selector for this function is: 0x058ac185,
@@ -202,7 +202,7 @@
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
/// @dev EVM selector for this function is: 0x6ec0a9f1,
/// or in textual repr: collectionSponsor()
- function collectionSponsor() external view returns (CrossAccount memory);
+ function collectionSponsor() external view returns (CrossAddress memory);
/// Get current collection limits.
///
@@ -227,13 +227,13 @@
/// @param newAdmin Cross account administrator address.
/// @dev EVM selector for this function is: 0x859aa7d6,
/// or in textual repr: addCollectionAdminCross((address,uint256))
- function addCollectionAdminCross(CrossAccount memory newAdmin) external;
+ function addCollectionAdminCross(CrossAddress memory newAdmin) external;
/// Remove collection admin.
/// @param admin Cross account administrator address.
/// @dev EVM selector for this function is: 0x6c0cd173,
/// or in textual repr: removeCollectionAdminCross((address,uint256))
- function removeCollectionAdminCross(CrossAccount memory admin) external;
+ function removeCollectionAdminCross(CrossAddress memory admin) external;
// /// Add collection admin.
// /// @param newAdmin Address of the added administrator.
@@ -286,7 +286,7 @@
/// @param user User address to check.
/// @dev EVM selector for this function is: 0x91b6df49,
/// or in textual repr: allowlistedCross((address,uint256))
- function allowlistedCross(CrossAccount memory user) external view returns (bool);
+ function allowlistedCross(CrossAddress memory user) external view returns (bool);
// /// Add the user to the allowed list.
// ///
@@ -300,7 +300,7 @@
/// @param user User cross account address.
/// @dev EVM selector for this function is: 0xa0184a3a,
/// or in textual repr: addToCollectionAllowListCross((address,uint256))
- function addToCollectionAllowListCross(CrossAccount memory user) external;
+ function addToCollectionAllowListCross(CrossAddress memory user) external;
// /// Remove the user from the allowed list.
// ///
@@ -314,7 +314,7 @@
/// @param user User cross account address.
/// @dev EVM selector for this function is: 0x09ba452a,
/// or in textual repr: removeFromCollectionAllowListCross((address,uint256))
- function removeFromCollectionAllowListCross(CrossAccount memory user) external;
+ function removeFromCollectionAllowListCross(CrossAddress memory user) external;
/// Switch permission for minting.
///
@@ -337,7 +337,7 @@
/// @return "true" if account is the owner or admin
/// @dev EVM selector for this function is: 0x3e75a905,
/// or in textual repr: isOwnerOrAdminCross((address,uint256))
- function isOwnerOrAdminCross(CrossAccount memory user) external view returns (bool);
+ function isOwnerOrAdminCross(CrossAddress memory user) external view returns (bool);
/// Returns collection type
///
@@ -352,7 +352,7 @@
/// If address is canonical then substrate mirror is zero and vice versa.
/// @dev EVM selector for this function is: 0xdf727d3b,
/// or in textual repr: collectionOwner()
- function collectionOwner() external view returns (CrossAccount memory);
+ function collectionOwner() external view returns (CrossAddress memory);
// /// Changes collection owner to another account
// ///
@@ -368,7 +368,7 @@
/// If address is canonical then substrate mirror is zero and vice versa.
/// @dev EVM selector for this function is: 0x5813216b,
/// or in textual repr: collectionAdmins()
- function collectionAdmins() external view returns (CrossAccount[] memory);
+ function collectionAdmins() external view returns (CrossAddress[] memory);
/// Changes collection owner to another account
///
@@ -376,11 +376,11 @@
/// @param newOwner new owner cross account
/// @dev EVM selector for this function is: 0x6496c497,
/// or in textual repr: changeCollectionOwnerCross((address,uint256))
- function changeCollectionOwnerCross(CrossAccount memory newOwner) external;
+ function changeCollectionOwnerCross(CrossAddress memory newOwner) external;
}
/// @dev Cross account struct
-struct CrossAccount {
+struct CrossAddress {
address eth;
uint256 sub;
}
@@ -556,7 +556,7 @@
/// @param tokenId Id for the token.
/// @dev EVM selector for this function is: 0x2b29dace,
/// or in textual repr: crossOwnerOf(uint256)
- function crossOwnerOf(uint256 tokenId) external view returns (CrossAccount memory);
+ function crossOwnerOf(uint256 tokenId) external view returns (CrossAddress memory);
/// Returns the token properties.
///
@@ -575,7 +575,7 @@
/// @param tokenId The NFT to approve
/// @dev EVM selector for this function is: 0x0ecd0ab0,
/// or in textual repr: approveCross((address,uint256),uint256)
- function approveCross(CrossAccount memory approved, uint256 tokenId) external;
+ function approveCross(CrossAddress memory approved, uint256 tokenId) external;
/// @notice Transfer ownership of an NFT
/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
@@ -593,7 +593,7 @@
/// @param tokenId The NFT to transfer
/// @dev EVM selector for this function is: 0x2ada85ff,
/// or in textual repr: transferCross((address,uint256),uint256)
- function transferCross(CrossAccount memory to, uint256 tokenId) external;
+ function transferCross(CrossAddress memory to, uint256 tokenId) external;
/// @notice Transfer ownership of an NFT from cross account address to cross account address
/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
@@ -604,8 +604,8 @@
/// @dev EVM selector for this function is: 0xd5cf430b,
/// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)
function transferFromCross(
- CrossAccount memory from,
- CrossAccount memory to,
+ CrossAddress memory from,
+ CrossAddress memory to,
uint256 tokenId
) external;
@@ -627,7 +627,7 @@
/// @param tokenId The NFT to transfer
/// @dev EVM selector for this function is: 0xbb2f5a58,
/// or in textual repr: burnFromCross((address,uint256),uint256)
- function burnFromCross(CrossAccount memory from, uint256 tokenId) external;
+ function burnFromCross(CrossAddress memory from, uint256 tokenId) external;
/// @notice Returns next free NFT ID.
/// @dev EVM selector for this function is: 0x75794a3c,
@@ -658,7 +658,7 @@
/// @return uint256 The id of the newly minted token
/// @dev EVM selector for this function is: 0xb904db03,
/// or in textual repr: mintCross((address,uint256),(string,bytes)[])
- function mintCross(CrossAccount memory to, Property[] memory properties) external returns (uint256);
+ function mintCross(CrossAddress memory to, Property[] memory properties) external returns (uint256);
}
/// @dev anonymous struct
tests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -178,7 +178,7 @@
/// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.
/// @dev EVM selector for this function is: 0x84a1d5a8,
/// or in textual repr: setCollectionSponsorCross((address,uint256))
- function setCollectionSponsorCross(CrossAccount memory sponsor) external;
+ function setCollectionSponsorCross(CrossAddress memory sponsor) external;
/// Whether there is a pending sponsor.
/// @dev EVM selector for this function is: 0x058ac185,
@@ -202,7 +202,7 @@
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
/// @dev EVM selector for this function is: 0x6ec0a9f1,
/// or in textual repr: collectionSponsor()
- function collectionSponsor() external view returns (CrossAccount memory);
+ function collectionSponsor() external view returns (CrossAddress memory);
/// Get current collection limits.
///
@@ -227,13 +227,13 @@
/// @param newAdmin Cross account administrator address.
/// @dev EVM selector for this function is: 0x859aa7d6,
/// or in textual repr: addCollectionAdminCross((address,uint256))
- function addCollectionAdminCross(CrossAccount memory newAdmin) external;
+ function addCollectionAdminCross(CrossAddress memory newAdmin) external;
/// Remove collection admin.
/// @param admin Cross account administrator address.
/// @dev EVM selector for this function is: 0x6c0cd173,
/// or in textual repr: removeCollectionAdminCross((address,uint256))
- function removeCollectionAdminCross(CrossAccount memory admin) external;
+ function removeCollectionAdminCross(CrossAddress memory admin) external;
// /// Add collection admin.
// /// @param newAdmin Address of the added administrator.
@@ -286,7 +286,7 @@
/// @param user User address to check.
/// @dev EVM selector for this function is: 0x91b6df49,
/// or in textual repr: allowlistedCross((address,uint256))
- function allowlistedCross(CrossAccount memory user) external view returns (bool);
+ function allowlistedCross(CrossAddress memory user) external view returns (bool);
// /// Add the user to the allowed list.
// ///
@@ -300,7 +300,7 @@
/// @param user User cross account address.
/// @dev EVM selector for this function is: 0xa0184a3a,
/// or in textual repr: addToCollectionAllowListCross((address,uint256))
- function addToCollectionAllowListCross(CrossAccount memory user) external;
+ function addToCollectionAllowListCross(CrossAddress memory user) external;
// /// Remove the user from the allowed list.
// ///
@@ -314,7 +314,7 @@
/// @param user User cross account address.
/// @dev EVM selector for this function is: 0x09ba452a,
/// or in textual repr: removeFromCollectionAllowListCross((address,uint256))
- function removeFromCollectionAllowListCross(CrossAccount memory user) external;
+ function removeFromCollectionAllowListCross(CrossAddress memory user) external;
/// Switch permission for minting.
///
@@ -337,7 +337,7 @@
/// @return "true" if account is the owner or admin
/// @dev EVM selector for this function is: 0x3e75a905,
/// or in textual repr: isOwnerOrAdminCross((address,uint256))
- function isOwnerOrAdminCross(CrossAccount memory user) external view returns (bool);
+ function isOwnerOrAdminCross(CrossAddress memory user) external view returns (bool);
/// Returns collection type
///
@@ -352,7 +352,7 @@
/// If address is canonical then substrate mirror is zero and vice versa.
/// @dev EVM selector for this function is: 0xdf727d3b,
/// or in textual repr: collectionOwner()
- function collectionOwner() external view returns (CrossAccount memory);
+ function collectionOwner() external view returns (CrossAddress memory);
// /// Changes collection owner to another account
// ///
@@ -368,7 +368,7 @@
/// If address is canonical then substrate mirror is zero and vice versa.
/// @dev EVM selector for this function is: 0x5813216b,
/// or in textual repr: collectionAdmins()
- function collectionAdmins() external view returns (CrossAccount[] memory);
+ function collectionAdmins() external view returns (CrossAddress[] memory);
/// Changes collection owner to another account
///
@@ -376,11 +376,11 @@
/// @param newOwner new owner cross account
/// @dev EVM selector for this function is: 0x6496c497,
/// or in textual repr: changeCollectionOwnerCross((address,uint256))
- function changeCollectionOwnerCross(CrossAccount memory newOwner) external;
+ function changeCollectionOwnerCross(CrossAddress memory newOwner) external;
}
/// @dev Cross account struct
-struct CrossAccount {
+struct CrossAddress {
address eth;
uint256 sub;
}
@@ -554,7 +554,7 @@
/// @param tokenId Id for the token.
/// @dev EVM selector for this function is: 0x2b29dace,
/// or in textual repr: crossOwnerOf(uint256)
- function crossOwnerOf(uint256 tokenId) external view returns (CrossAccount memory);
+ function crossOwnerOf(uint256 tokenId) external view returns (CrossAddress memory);
/// Returns the token properties.
///
@@ -583,7 +583,7 @@
/// @param tokenId The RFT to transfer
/// @dev EVM selector for this function is: 0x2ada85ff,
/// or in textual repr: transferCross((address,uint256),uint256)
- function transferCross(CrossAccount memory to, uint256 tokenId) external;
+ function transferCross(CrossAddress memory to, uint256 tokenId) external;
/// @notice Transfer ownership of an RFT
/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
@@ -594,8 +594,8 @@
/// @dev EVM selector for this function is: 0xd5cf430b,
/// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)
function transferFromCross(
- CrossAccount memory from,
- CrossAccount memory to,
+ CrossAddress memory from,
+ CrossAddress memory to,
uint256 tokenId
) external;
@@ -619,7 +619,7 @@
/// @param tokenId The RFT to transfer
/// @dev EVM selector for this function is: 0xbb2f5a58,
/// or in textual repr: burnFromCross((address,uint256),uint256)
- function burnFromCross(CrossAccount memory from, uint256 tokenId) external;
+ function burnFromCross(CrossAddress memory from, uint256 tokenId) external;
/// @notice Returns next free RFT ID.
/// @dev EVM selector for this function is: 0x75794a3c,
@@ -650,7 +650,7 @@
/// @return uint256 The id of the newly minted token
/// @dev EVM selector for this function is: 0xb904db03,
/// or in textual repr: mintCross((address,uint256),(string,bytes)[])
- function mintCross(CrossAccount memory to, Property[] memory properties) external returns (uint256);
+ function mintCross(CrossAddress memory to, Property[] memory properties) external returns (uint256);
/// Returns EVM address for refungible token
///
tests/src/eth/api/UniqueRefungibleToken.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueRefungibleToken.sol
+++ b/tests/src/eth/api/UniqueRefungibleToken.sol
@@ -39,7 +39,7 @@
/// @param amount The amount that will be burnt.
/// @dev EVM selector for this function is: 0xbb2f5a58,
/// or in textual repr: burnFromCross((address,uint256),uint256)
- function burnFromCross(CrossAccount memory from, uint256 amount) external returns (bool);
+ function burnFromCross(CrossAddress memory from, uint256 amount) external returns (bool);
/// @dev Approve the passed address to spend the specified amount of tokens on behalf of `msg.sender`.
/// Beware that changing an allowance with this method brings the risk that someone may use both the old
@@ -50,7 +50,7 @@
/// @param amount The amount of tokens to be spent.
/// @dev EVM selector for this function is: 0x0ecd0ab0,
/// or in textual repr: approveCross((address,uint256),uint256)
- function approveCross(CrossAccount memory spender, uint256 amount) external returns (bool);
+ function approveCross(CrossAddress memory spender, uint256 amount) external returns (bool);
/// @dev Function that changes total amount of the tokens.
/// Throws if `msg.sender` doesn't owns all of the tokens.
@@ -64,7 +64,7 @@
/// @param amount The amount to be transferred.
/// @dev EVM selector for this function is: 0x2ada85ff,
/// or in textual repr: transferCross((address,uint256),uint256)
- function transferCross(CrossAccount memory to, uint256 amount) external returns (bool);
+ function transferCross(CrossAddress memory to, uint256 amount) external returns (bool);
/// @dev Transfer tokens from one address to another
/// @param from The address which you want to send tokens from
@@ -73,14 +73,14 @@
/// @dev EVM selector for this function is: 0xd5cf430b,
/// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)
function transferFromCross(
- CrossAccount memory from,
- CrossAccount memory to,
+ CrossAddress memory from,
+ CrossAddress memory to,
uint256 amount
) external returns (bool);
}
/// @dev Cross account struct
-struct CrossAccount {
+struct CrossAddress {
address eth;
uint256 sub;
}
tests/src/eth/fractionalizer/Fractionalizer.soldiffbeforeafterboth--- a/tests/src/eth/fractionalizer/Fractionalizer.sol
+++ b/tests/src/eth/fractionalizer/Fractionalizer.sol
@@ -3,7 +3,7 @@
import {CollectionHelpers} from "../api/CollectionHelpers.sol";
import {ContractHelpers} from "../api/ContractHelpers.sol";
import {UniqueRefungibleToken} from "../api/UniqueRefungibleToken.sol";
-import {UniqueRefungible, CrossAccount} from "../api/UniqueRefungible.sol";
+import {UniqueRefungible, CrossAddress} from "../api/UniqueRefungible.sol";
import {UniqueNFT} from "../api/UniqueNFT.sol";
/// @dev Fractionalization contract. It stores mappings between NFT and RFT tokens,
@@ -63,7 +63,7 @@
"Wrong collection type. Collection is not refungible."
);
require(
- refungibleContract.isOwnerOrAdminCross(CrossAccount({eth: address(this), sub: uint256(0)})),
+ refungibleContract.isOwnerOrAdminCross(CrossAddress({eth: address(this), sub: uint256(0)})),
"Fractionalizer contract should be an admin of the collection"
);
rftCollection = _collection;
tests/src/eth/util/playgrounds/types.tsdiffbeforeafterboth--- a/tests/src/eth/util/playgrounds/types.ts
+++ b/tests/src/eth/util/playgrounds/types.ts
@@ -19,7 +19,7 @@
value: bigint,
}
-export interface TEthCrossAccount {
+export interface CrossAddress {
readonly eth: string,
readonly sub: string | Uint8Array,
}
tests/src/eth/util/playgrounds/unique.dev.tsdiffbeforeafterboth--- a/tests/src/eth/util/playgrounds/unique.dev.ts
+++ b/tests/src/eth/util/playgrounds/unique.dev.ts
@@ -18,7 +18,7 @@
import {DevUniqueHelper} from '../../../util/playgrounds/unique.dev';
-import {ContractImports, CompiledContract, TEthCrossAccount, NormalizedEvent, EthProperty} from './types';
+import {ContractImports, CompiledContract, CrossAddress, NormalizedEvent, EthProperty} from './types';
// Native contracts ABI
import collectionHelpersAbi from '../../abi/collectionHelpers.json';
@@ -388,7 +388,7 @@
export type EthUniqueHelperConstructor = new (...args: any[]) => EthUniqueHelper;
export class EthCrossAccountGroup extends EthGroupBase {
- createAccount(): TEthCrossAccount {
+ createAccount(): CrossAddress {
return this.fromAddress(this.helper.eth.createAccount());
}
@@ -396,14 +396,14 @@
return this.fromAddress(await this.helper.eth.createAccountWithBalance(donor, amount));
}
- fromAddress(address: TEthereumAccount): TEthCrossAccount {
+ fromAddress(address: TEthereumAccount): CrossAddress {
return {
eth: address,
sub: '0',
};
}
- fromKeyringPair(keyring: IKeyringPair): TEthCrossAccount {
+ fromKeyringPair(keyring: IKeyringPair): CrossAddress {
return {
eth: '0x0000000000000000000000000000000000000000',
sub: keyring.addressRaw,