difftreelog
rename: CrossAccount -> CrossAddress
in: master
30 files changed
pallets/common/src/erc.rsdiffbeforeafterboth244 fn set_collection_sponsor_cross(244 fn set_collection_sponsor_cross(245 &mut self,245 &mut self,246 caller: caller,246 caller: caller,247 sponsor: eth::CrossAccount,247 sponsor: eth::CrossAddress,248 ) -> Result<void> {248 ) -> Result<void> {249 self.consume_store_reads_and_writes(1, 1)?;249 self.consume_store_reads_and_writes(1, 1)?;250250284 /// Get current sponsor.284 /// Get current sponsor.285 ///285 ///286 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.286 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.287 fn collection_sponsor(&self) -> Result<eth::CrossAccount> {287 fn collection_sponsor(&self) -> Result<eth::CrossAddress> {288 let sponsor = match self.collection.sponsorship.sponsor() {288 let sponsor = match self.collection.sponsorship.sponsor() {289 Some(sponsor) => sponsor,289 Some(sponsor) => sponsor,290 None => return Ok(Default::default()),290 None => return Ok(Default::default()),291 };291 };292292293 Ok(eth::CrossAccount::from_sub::<T>(&sponsor))293 Ok(eth::CrossAddress::from_sub::<T>(&sponsor))294 }294 }295295296 /// Get current collection limits.296 /// Get current collection limits.376 fn add_collection_admin_cross(376 fn add_collection_admin_cross(377 &mut self,377 &mut self,378 caller: caller,378 caller: caller,379 new_admin: eth::CrossAccount,379 new_admin: eth::CrossAddress,380 ) -> Result<void> {380 ) -> Result<void> {381 self.consume_store_reads_and_writes(2, 2)?;381 self.consume_store_reads_and_writes(2, 2)?;382382391 fn remove_collection_admin_cross(391 fn remove_collection_admin_cross(392 &mut self,392 &mut self,393 caller: caller,393 caller: caller,394 admin: eth::CrossAccount,394 admin: eth::CrossAddress,395 ) -> Result<void> {395 ) -> Result<void> {396 self.consume_store_reads_and_writes(2, 2)?;396 self.consume_store_reads_and_writes(2, 2)?;397397539 /// Checks that user allowed to operate with collection.539 /// Checks that user allowed to operate with collection.540 ///540 ///541 /// @param user User address to check.541 /// @param user User address to check.542 fn allowlisted_cross(&self, user: eth::CrossAccount) -> Result<bool> {542 fn allowlisted_cross(&self, user: eth::CrossAddress) -> Result<bool> {543 let user = user.into_sub_cross_account::<T>()?;543 let user = user.into_sub_cross_account::<T>()?;544 Ok(Pallet::<T>::allowed(self.id, user))544 Ok(Pallet::<T>::allowed(self.id, user))545 }545 }563 fn add_to_collection_allow_list_cross(563 fn add_to_collection_allow_list_cross(564 &mut self,564 &mut self,565 caller: caller,565 caller: caller,566 user: eth::CrossAccount,566 user: eth::CrossAddress,567 ) -> Result<void> {567 ) -> Result<void> {568 self.consume_store_writes(1)?;568 self.consume_store_writes(1)?;569569592 fn remove_from_collection_allow_list_cross(592 fn remove_from_collection_allow_list_cross(593 &mut self,593 &mut self,594 caller: caller,594 caller: caller,595 user: eth::CrossAccount,595 user: eth::CrossAddress,596 ) -> Result<void> {596 ) -> Result<void> {597 self.consume_store_writes(1)?;597 self.consume_store_writes(1)?;598598630 ///630 ///631 /// @param user User cross account to verify631 /// @param user User cross account to verify632 /// @return "true" if account is the owner or admin632 /// @return "true" if account is the owner or admin633 fn is_owner_or_admin_cross(&self, user: eth::CrossAccount) -> Result<bool> {633 fn is_owner_or_admin_cross(&self, user: eth::CrossAddress) -> Result<bool> {634 let user = user.into_sub_cross_account::<T>()?;634 let user = user.into_sub_cross_account::<T>()?;635 Ok(self.is_owner_or_admin(&user))635 Ok(self.is_owner_or_admin(&user))636 }636 }651 ///651 ///652 /// @return Tuble with sponsor address and his substrate mirror.652 /// @return Tuble with sponsor address and his substrate mirror.653 /// If address is canonical then substrate mirror is zero and vice versa.653 /// If address is canonical then substrate mirror is zero and vice versa.654 fn collection_owner(&self) -> Result<eth::CrossAccount> {654 fn collection_owner(&self) -> Result<eth::CrossAddress> {655 Ok(eth::CrossAccount::from_sub_cross_account::<T>(655 Ok(eth::CrossAddress::from_sub_cross_account::<T>(656 &T::CrossAccountId::from_sub(self.owner.clone()),656 &T::CrossAccountId::from_sub(self.owner.clone()),657 ))657 ))658 }658 }675 ///675 ///676 /// @return Vector of tuples with admins address and his substrate mirror.676 /// @return Vector of tuples with admins address and his substrate mirror.677 /// If address is canonical then substrate mirror is zero and vice versa.677 /// If address is canonical then substrate mirror is zero and vice versa.678 fn collection_admins(&self) -> Result<Vec<eth::CrossAccount>> {678 fn collection_admins(&self) -> Result<Vec<eth::CrossAddress>> {679 let result = crate::IsAdmin::<T>::iter_prefix((self.id,))679 let result = crate::IsAdmin::<T>::iter_prefix((self.id,))680 .map(|(admin, _)| eth::CrossAccount::from_sub_cross_account::<T>(&admin))680 .map(|(admin, _)| eth::CrossAddress::from_sub_cross_account::<T>(&admin))681 .collect();681 .collect();682 Ok(result)682 Ok(result)683 }683 }689 fn change_collection_owner_cross(689 fn change_collection_owner_cross(690 &mut self,690 &mut self,691 caller: caller,691 caller: caller,692 new_owner: eth::CrossAccount,692 new_owner: eth::CrossAddress,693 ) -> Result<void> {693 ) -> Result<void> {694 self.consume_store_writes(1)?;694 self.consume_store_writes(1)?;695695pallets/common/src/eth.rsdiffbeforeafterboth118118119/// Cross account struct119/// Cross account struct120#[derive(Debug, Default, AbiCoder)]120#[derive(Debug, Default, AbiCoder)]121pub struct CrossAccount {121pub struct CrossAddress {122 pub(crate) eth: address,122 pub(crate) eth: address,123 pub(crate) sub: uint256,123 pub(crate) sub: uint256,124}124}125125126impl CrossAccount {126impl CrossAddress {127 /// Converts `CrossAccountId` to [`CrossAccount`]127 /// Converts `CrossAccountId` to [`CrossAddress`]128 pub fn from_sub_cross_account<T>(cross_account_id: &T::CrossAccountId) -> Self128 pub fn from_sub_cross_account<T>(cross_account_id: &T::CrossAccountId) -> Self129 where129 where130 T: pallet_evm::Config,130 T: pallet_evm::Config,139 }139 }140 }140 }141 }141 }142 /// Creates [`CrossAccount`] from substrate account142 /// Creates [`CrossAddress`] from substrate account143 pub fn from_sub<T>(account_id: &T::AccountId) -> Self143 pub fn from_sub<T>(account_id: &T::AccountId) -> Self144 where144 where145 T: pallet_evm::Config,145 T: pallet_evm::Config,150 sub: uint256::from_big_endian(account_id.as_ref()),150 sub: uint256::from_big_endian(account_id.as_ref()),151 }151 }152 }152 }153 /// Converts [`CrossAccount`] to `CrossAccountId`153 /// Converts [`CrossAddress`] to `CrossAccountId`154 pub fn into_sub_cross_account<T>(&self) -> evm_coder::execution::Result<T::CrossAccountId>154 pub fn into_sub_cross_account<T>(&self) -> evm_coder::execution::Result<T::CrossAccountId>155 where155 where156 T: pallet_evm::Config,156 T: pallet_evm::Config,pallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth174 ///174 ///175 /// @param contractAddress The contract for which a sponsor is requested.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.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> {177 fn sponsor(&self, contract_address: address) -> Result<pallet_common::eth::CrossAddress> {178 Ok(178 Ok(179 pallet_common::eth::CrossAccount::from_sub_cross_account::<T>(179 pallet_common::eth::CrossAddress::from_sub_cross_account::<T>(180 &Pallet::<T>::get_sponsor(contract_address).ok_or("Contract has no sponsor")?,180 &Pallet::<T>::get_sponsor(contract_address).ok_or("Contract has no sponsor")?,181 ),181 ),182 )182 )pallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterbothbinary blob — no preview
pallets/evm-contract-helpers/src/stubs/ContractHelpers.soldiffbeforeafterboth96 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.96 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.97 /// @dev EVM selector for this function is: 0x766c4f37,97 /// @dev EVM selector for this function is: 0x766c4f37,98 /// or in textual repr: sponsor(address)98 /// or in textual repr: sponsor(address)99 function sponsor(address contractAddress) public view returns (CrossAccount memory) {99 function sponsor(address contractAddress) public view returns (CrossAddress memory) {100 require(false, stub_error);100 require(false, stub_error);101 contractAddress;101 contractAddress;102 dummy;102 dummy;103 return CrossAccount(0x0000000000000000000000000000000000000000, 0);103 return CrossAddress(0x0000000000000000000000000000000000000000, 0);104 }104 }105105106 /// Check tat contract has confirmed sponsor.106 /// Check tat contract has confirmed sponsor.266}266}267267268/// @dev Cross account struct268/// @dev Cross account struct269struct CrossAccount {269struct CrossAddress {270 address eth;270 address eth;271 uint256 sub;271 uint256 sub;272}272}pallets/fungible/src/erc.rsdiffbeforeafterboth177 fn mint_cross(177 fn mint_cross(178 &mut self,178 &mut self,179 caller: caller,179 caller: caller,180 to: pallet_common::eth::CrossAccount,180 to: pallet_common::eth::CrossAddress,181 amount: uint256,181 amount: uint256,182 ) -> Result<bool> {182 ) -> Result<bool> {183 let caller = T::CrossAccountId::from_eth(caller);183 let caller = T::CrossAccountId::from_eth(caller);195 fn approve_cross(195 fn approve_cross(196 &mut self,196 &mut self,197 caller: caller,197 caller: caller,198 spender: pallet_common::eth::CrossAccount,198 spender: pallet_common::eth::CrossAddress,199 amount: uint256,199 amount: uint256,200 ) -> Result<bool> {200 ) -> Result<bool> {201 let caller = T::CrossAccountId::from_eth(caller);201 let caller = T::CrossAccountId::from_eth(caller);236 fn burn_from_cross(236 fn burn_from_cross(237 &mut self,237 &mut self,238 caller: caller,238 caller: caller,239 from: pallet_common::eth::CrossAccount,239 from: pallet_common::eth::CrossAddress,240 amount: uint256,240 amount: uint256,241 ) -> Result<bool> {241 ) -> Result<bool> {242 let caller = T::CrossAccountId::from_eth(caller);242 let caller = T::CrossAccountId::from_eth(caller);278 fn transfer_cross(278 fn transfer_cross(279 &mut self,279 &mut self,280 caller: caller,280 caller: caller,281 to: pallet_common::eth::CrossAccount,281 to: pallet_common::eth::CrossAddress,282 amount: uint256,282 amount: uint256,283 ) -> Result<bool> {283 ) -> Result<bool> {284 let caller = T::CrossAccountId::from_eth(caller);284 let caller = T::CrossAccountId::from_eth(caller);296 fn transfer_from_cross(296 fn transfer_from_cross(297 &mut self,297 &mut self,298 caller: caller,298 caller: caller,299 from: pallet_common::eth::CrossAccount,299 from: pallet_common::eth::CrossAddress,300 to: pallet_common::eth::CrossAccount,300 to: pallet_common::eth::CrossAddress,301 amount: uint256,301 amount: uint256,302 ) -> Result<bool> {302 ) -> Result<bool> {303 let caller = T::CrossAccountId::from_eth(caller);303 let caller = T::CrossAccountId::from_eth(caller);pallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth114 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.114 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.115 /// @dev EVM selector for this function is: 0x84a1d5a8,115 /// @dev EVM selector for this function is: 0x84a1d5a8,116 /// or in textual repr: setCollectionSponsorCross((address,uint256))116 /// or in textual repr: setCollectionSponsorCross((address,uint256))117 function setCollectionSponsorCross(CrossAccount memory sponsor) public {117 function setCollectionSponsorCross(CrossAddress memory sponsor) public {118 require(false, stub_error);118 require(false, stub_error);119 sponsor;119 sponsor;120 dummy = 0;120 dummy = 0;152 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.152 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.153 /// @dev EVM selector for this function is: 0x6ec0a9f1,153 /// @dev EVM selector for this function is: 0x6ec0a9f1,154 /// or in textual repr: collectionSponsor()154 /// or in textual repr: collectionSponsor()155 function collectionSponsor() public view returns (CrossAccount memory) {155 function collectionSponsor() public view returns (CrossAddress memory) {156 require(false, stub_error);156 require(false, stub_error);157 dummy;157 dummy;158 return CrossAccount(0x0000000000000000000000000000000000000000, 0);158 return CrossAddress(0x0000000000000000000000000000000000000000, 0);159 }159 }160160161 /// Get current collection limits.161 /// Get current collection limits.193 /// @param newAdmin Cross account administrator address.193 /// @param newAdmin Cross account administrator address.194 /// @dev EVM selector for this function is: 0x859aa7d6,194 /// @dev EVM selector for this function is: 0x859aa7d6,195 /// or in textual repr: addCollectionAdminCross((address,uint256))195 /// or in textual repr: addCollectionAdminCross((address,uint256))196 function addCollectionAdminCross(CrossAccount memory newAdmin) public {196 function addCollectionAdminCross(CrossAddress memory newAdmin) public {197 require(false, stub_error);197 require(false, stub_error);198 newAdmin;198 newAdmin;199 dummy = 0;199 dummy = 0;203 /// @param admin Cross account administrator address.203 /// @param admin Cross account administrator address.204 /// @dev EVM selector for this function is: 0x6c0cd173,204 /// @dev EVM selector for this function is: 0x6c0cd173,205 /// or in textual repr: removeCollectionAdminCross((address,uint256))205 /// or in textual repr: removeCollectionAdminCross((address,uint256))206 function removeCollectionAdminCross(CrossAccount memory admin) public {206 function removeCollectionAdminCross(CrossAddress memory admin) public {207 require(false, stub_error);207 require(false, stub_error);208 admin;208 admin;209 dummy = 0;209 dummy = 0;289 /// @param user User address to check.289 /// @param user User address to check.290 /// @dev EVM selector for this function is: 0x91b6df49,290 /// @dev EVM selector for this function is: 0x91b6df49,291 /// or in textual repr: allowlistedCross((address,uint256))291 /// or in textual repr: allowlistedCross((address,uint256))292 function allowlistedCross(CrossAccount memory user) public view returns (bool) {292 function allowlistedCross(CrossAddress memory user) public view returns (bool) {293 require(false, stub_error);293 require(false, stub_error);294 user;294 user;295 dummy;295 dummy;312 /// @param user User cross account address.312 /// @param user User cross account address.313 /// @dev EVM selector for this function is: 0xa0184a3a,313 /// @dev EVM selector for this function is: 0xa0184a3a,314 /// or in textual repr: addToCollectionAllowListCross((address,uint256))314 /// or in textual repr: addToCollectionAllowListCross((address,uint256))315 function addToCollectionAllowListCross(CrossAccount memory user) public {315 function addToCollectionAllowListCross(CrossAddress memory user) public {316 require(false, stub_error);316 require(false, stub_error);317 user;317 user;318 dummy = 0;318 dummy = 0;334 /// @param user User cross account address.334 /// @param user User cross account address.335 /// @dev EVM selector for this function is: 0x09ba452a,335 /// @dev EVM selector for this function is: 0x09ba452a,336 /// or in textual repr: removeFromCollectionAllowListCross((address,uint256))336 /// or in textual repr: removeFromCollectionAllowListCross((address,uint256))337 function removeFromCollectionAllowListCross(CrossAccount memory user) public {337 function removeFromCollectionAllowListCross(CrossAddress memory user) public {338 require(false, stub_error);338 require(false, stub_error);339 user;339 user;340 dummy = 0;340 dummy = 0;370 /// @return "true" if account is the owner or admin370 /// @return "true" if account is the owner or admin371 /// @dev EVM selector for this function is: 0x3e75a905,371 /// @dev EVM selector for this function is: 0x3e75a905,372 /// or in textual repr: isOwnerOrAdminCross((address,uint256))372 /// or in textual repr: isOwnerOrAdminCross((address,uint256))373 function isOwnerOrAdminCross(CrossAccount memory user) public view returns (bool) {373 function isOwnerOrAdminCross(CrossAddress memory user) public view returns (bool) {374 require(false, stub_error);374 require(false, stub_error);375 user;375 user;376 dummy;376 dummy;394 /// If address is canonical then substrate mirror is zero and vice versa.394 /// If address is canonical then substrate mirror is zero and vice versa.395 /// @dev EVM selector for this function is: 0xdf727d3b,395 /// @dev EVM selector for this function is: 0xdf727d3b,396 /// or in textual repr: collectionOwner()396 /// or in textual repr: collectionOwner()397 function collectionOwner() public view returns (CrossAccount memory) {397 function collectionOwner() public view returns (CrossAddress memory) {398 require(false, stub_error);398 require(false, stub_error);399 dummy;399 dummy;400 return CrossAccount(0x0000000000000000000000000000000000000000, 0);400 return CrossAddress(0x0000000000000000000000000000000000000000, 0);401 }401 }402402403 // /// Changes collection owner to another account403 // /// Changes collection owner to another account418 /// If address is canonical then substrate mirror is zero and vice versa.418 /// If address is canonical then substrate mirror is zero and vice versa.419 /// @dev EVM selector for this function is: 0x5813216b,419 /// @dev EVM selector for this function is: 0x5813216b,420 /// or in textual repr: collectionAdmins()420 /// or in textual repr: collectionAdmins()421 function collectionAdmins() public view returns (CrossAccount[] memory) {421 function collectionAdmins() public view returns (CrossAddress[] memory) {422 require(false, stub_error);422 require(false, stub_error);423 dummy;423 dummy;424 return new CrossAccount[](0);424 return new CrossAddress[](0);425 }425 }426426427 /// Changes collection owner to another account427 /// Changes collection owner to another account430 /// @param newOwner new owner cross account430 /// @param newOwner new owner cross account431 /// @dev EVM selector for this function is: 0x6496c497,431 /// @dev EVM selector for this function is: 0x6496c497,432 /// or in textual repr: changeCollectionOwnerCross((address,uint256))432 /// or in textual repr: changeCollectionOwnerCross((address,uint256))433 function changeCollectionOwnerCross(CrossAccount memory newOwner) public {433 function changeCollectionOwnerCross(CrossAddress memory newOwner) public {434 require(false, stub_error);434 require(false, stub_error);435 newOwner;435 newOwner;436 dummy = 0;436 dummy = 0;437 }437 }438}438}439439440/// @dev Cross account struct440/// @dev Cross account struct441struct CrossAccount {441struct CrossAddress {442 address eth;442 address eth;443 uint256 sub;443 uint256 sub;444}444}516516517 /// @dev EVM selector for this function is: 0x269e6158,517 /// @dev EVM selector for this function is: 0x269e6158,518 /// or in textual repr: mintCross((address,uint256),uint256)518 /// or in textual repr: mintCross((address,uint256),uint256)519 function mintCross(CrossAccount memory to, uint256 amount) public returns (bool) {519 function mintCross(CrossAddress memory to, uint256 amount) public returns (bool) {520 require(false, stub_error);520 require(false, stub_error);521 to;521 to;522 amount;522 amount;526526527 /// @dev EVM selector for this function is: 0x0ecd0ab0,527 /// @dev EVM selector for this function is: 0x0ecd0ab0,528 /// or in textual repr: approveCross((address,uint256),uint256)528 /// or in textual repr: approveCross((address,uint256),uint256)529 function approveCross(CrossAccount memory spender, uint256 amount) public returns (bool) {529 function approveCross(CrossAddress memory spender, uint256 amount) public returns (bool) {530 require(false, stub_error);530 require(false, stub_error);531 spender;531 spender;532 amount;532 amount;556 /// @param amount The amount that will be burnt.556 /// @param amount The amount that will be burnt.557 /// @dev EVM selector for this function is: 0xbb2f5a58,557 /// @dev EVM selector for this function is: 0xbb2f5a58,558 /// or in textual repr: burnFromCross((address,uint256),uint256)558 /// or in textual repr: burnFromCross((address,uint256),uint256)559 function burnFromCross(CrossAccount memory from, uint256 amount) public returns (bool) {559 function burnFromCross(CrossAddress memory from, uint256 amount) public returns (bool) {560 require(false, stub_error);560 require(false, stub_error);561 from;561 from;562 amount;562 amount;577577578 /// @dev EVM selector for this function is: 0x2ada85ff,578 /// @dev EVM selector for this function is: 0x2ada85ff,579 /// or in textual repr: transferCross((address,uint256),uint256)579 /// or in textual repr: transferCross((address,uint256),uint256)580 function transferCross(CrossAccount memory to, uint256 amount) public returns (bool) {580 function transferCross(CrossAddress memory to, uint256 amount) public returns (bool) {581 require(false, stub_error);581 require(false, stub_error);582 to;582 to;583 amount;583 amount;588 /// @dev EVM selector for this function is: 0xd5cf430b,588 /// @dev EVM selector for this function is: 0xd5cf430b,589 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)589 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)590 function transferFromCross(590 function transferFromCross(591 CrossAccount memory from,591 CrossAddress memory from,592 CrossAccount memory to,592 CrossAddress memory to,593 uint256 amount593 uint256 amount594 ) public returns (bool) {594 ) public returns (bool) {595 require(false, stub_error);595 require(false, stub_error);pallets/nonfungible/src/erc.rsdiffbeforeafterboth762 /// Returns the owner (in cross format) of the token.762 /// Returns the owner (in cross format) of the token.763 ///763 ///764 /// @param tokenId Id for the token.764 /// @param tokenId Id for the token.765 fn cross_owner_of(&self, token_id: uint256) -> Result<pallet_common::eth::CrossAccount> {765 fn cross_owner_of(&self, token_id: uint256) -> Result<pallet_common::eth::CrossAddress> {766 Self::token_owner(&self, token_id.try_into()?)766 Self::token_owner(&self, token_id.try_into()?)767 .map(|o| pallet_common::eth::CrossAccount::from_sub_cross_account::<T>(&o))767 .map(|o| pallet_common::eth::CrossAddress::from_sub_cross_account::<T>(&o))768 .ok_or(Error::Revert("key too large".into()))768 .ok_or(Error::Revert("key too large".into()))769 }769 }770770812 fn approve_cross(812 fn approve_cross(813 &mut self,813 &mut self,814 caller: caller,814 caller: caller,815 approved: pallet_common::eth::CrossAccount,815 approved: pallet_common::eth::CrossAddress,816 token_id: uint256,816 token_id: uint256,817 ) -> Result<void> {817 ) -> Result<void> {818 let caller = T::CrossAccountId::from_eth(caller);818 let caller = T::CrossAccountId::from_eth(caller);851 fn transfer_cross(851 fn transfer_cross(852 &mut self,852 &mut self,853 caller: caller,853 caller: caller,854 to: pallet_common::eth::CrossAccount,854 to: pallet_common::eth::CrossAddress,855 token_id: uint256,855 token_id: uint256,856 ) -> Result<void> {856 ) -> Result<void> {857 let caller = T::CrossAccountId::from_eth(caller);857 let caller = T::CrossAccountId::from_eth(caller);875 fn transfer_from_cross(875 fn transfer_from_cross(876 &mut self,876 &mut self,877 caller: caller,877 caller: caller,878 from: pallet_common::eth::CrossAccount,878 from: pallet_common::eth::CrossAddress,879 to: pallet_common::eth::CrossAccount,879 to: pallet_common::eth::CrossAddress,880 token_id: uint256,880 token_id: uint256,881 ) -> Result<void> {881 ) -> Result<void> {882 let caller = T::CrossAccountId::from_eth(caller);882 let caller = T::CrossAccountId::from_eth(caller);922 fn burn_from_cross(922 fn burn_from_cross(923 &mut self,923 &mut self,924 caller: caller,924 caller: caller,925 from: pallet_common::eth::CrossAccount,925 from: pallet_common::eth::CrossAddress,926 token_id: uint256,926 token_id: uint256,927 ) -> Result<void> {927 ) -> Result<void> {928 let caller = T::CrossAccountId::from_eth(caller);928 let caller = T::CrossAccountId::from_eth(caller);1044 fn mint_cross(1044 fn mint_cross(1045 &mut self,1045 &mut self,1046 caller: caller,1046 caller: caller,1047 to: pallet_common::eth::CrossAccount,1047 to: pallet_common::eth::CrossAddress,1048 properties: Vec<pallet_common::eth::Property>,1048 properties: Vec<pallet_common::eth::Property>,1049 ) -> Result<uint256> {1049 ) -> Result<uint256> {1050 let token_id = <TokensMinted<T>>::get(self.id)1050 let token_id = <TokensMinted<T>>::get(self.id)pallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterbothbinary blob — no preview
pallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth256 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.256 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.257 /// @dev EVM selector for this function is: 0x84a1d5a8,257 /// @dev EVM selector for this function is: 0x84a1d5a8,258 /// or in textual repr: setCollectionSponsorCross((address,uint256))258 /// or in textual repr: setCollectionSponsorCross((address,uint256))259 function setCollectionSponsorCross(CrossAccount memory sponsor) public {259 function setCollectionSponsorCross(CrossAddress memory sponsor) public {260 require(false, stub_error);260 require(false, stub_error);261 sponsor;261 sponsor;262 dummy = 0;262 dummy = 0;294 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.294 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.295 /// @dev EVM selector for this function is: 0x6ec0a9f1,295 /// @dev EVM selector for this function is: 0x6ec0a9f1,296 /// or in textual repr: collectionSponsor()296 /// or in textual repr: collectionSponsor()297 function collectionSponsor() public view returns (CrossAccount memory) {297 function collectionSponsor() public view returns (CrossAddress memory) {298 require(false, stub_error);298 require(false, stub_error);299 dummy;299 dummy;300 return CrossAccount(0x0000000000000000000000000000000000000000, 0);300 return CrossAddress(0x0000000000000000000000000000000000000000, 0);301 }301 }302302303 /// Get current collection limits.303 /// Get current collection limits.335 /// @param newAdmin Cross account administrator address.335 /// @param newAdmin Cross account administrator address.336 /// @dev EVM selector for this function is: 0x859aa7d6,336 /// @dev EVM selector for this function is: 0x859aa7d6,337 /// or in textual repr: addCollectionAdminCross((address,uint256))337 /// or in textual repr: addCollectionAdminCross((address,uint256))338 function addCollectionAdminCross(CrossAccount memory newAdmin) public {338 function addCollectionAdminCross(CrossAddress memory newAdmin) public {339 require(false, stub_error);339 require(false, stub_error);340 newAdmin;340 newAdmin;341 dummy = 0;341 dummy = 0;345 /// @param admin Cross account administrator address.345 /// @param admin Cross account administrator address.346 /// @dev EVM selector for this function is: 0x6c0cd173,346 /// @dev EVM selector for this function is: 0x6c0cd173,347 /// or in textual repr: removeCollectionAdminCross((address,uint256))347 /// or in textual repr: removeCollectionAdminCross((address,uint256))348 function removeCollectionAdminCross(CrossAccount memory admin) public {348 function removeCollectionAdminCross(CrossAddress memory admin) public {349 require(false, stub_error);349 require(false, stub_error);350 admin;350 admin;351 dummy = 0;351 dummy = 0;431 /// @param user User address to check.431 /// @param user User address to check.432 /// @dev EVM selector for this function is: 0x91b6df49,432 /// @dev EVM selector for this function is: 0x91b6df49,433 /// or in textual repr: allowlistedCross((address,uint256))433 /// or in textual repr: allowlistedCross((address,uint256))434 function allowlistedCross(CrossAccount memory user) public view returns (bool) {434 function allowlistedCross(CrossAddress memory user) public view returns (bool) {435 require(false, stub_error);435 require(false, stub_error);436 user;436 user;437 dummy;437 dummy;454 /// @param user User cross account address.454 /// @param user User cross account address.455 /// @dev EVM selector for this function is: 0xa0184a3a,455 /// @dev EVM selector for this function is: 0xa0184a3a,456 /// or in textual repr: addToCollectionAllowListCross((address,uint256))456 /// or in textual repr: addToCollectionAllowListCross((address,uint256))457 function addToCollectionAllowListCross(CrossAccount memory user) public {457 function addToCollectionAllowListCross(CrossAddress memory user) public {458 require(false, stub_error);458 require(false, stub_error);459 user;459 user;460 dummy = 0;460 dummy = 0;476 /// @param user User cross account address.476 /// @param user User cross account address.477 /// @dev EVM selector for this function is: 0x09ba452a,477 /// @dev EVM selector for this function is: 0x09ba452a,478 /// or in textual repr: removeFromCollectionAllowListCross((address,uint256))478 /// or in textual repr: removeFromCollectionAllowListCross((address,uint256))479 function removeFromCollectionAllowListCross(CrossAccount memory user) public {479 function removeFromCollectionAllowListCross(CrossAddress memory user) public {480 require(false, stub_error);480 require(false, stub_error);481 user;481 user;482 dummy = 0;482 dummy = 0;512 /// @return "true" if account is the owner or admin512 /// @return "true" if account is the owner or admin513 /// @dev EVM selector for this function is: 0x3e75a905,513 /// @dev EVM selector for this function is: 0x3e75a905,514 /// or in textual repr: isOwnerOrAdminCross((address,uint256))514 /// or in textual repr: isOwnerOrAdminCross((address,uint256))515 function isOwnerOrAdminCross(CrossAccount memory user) public view returns (bool) {515 function isOwnerOrAdminCross(CrossAddress memory user) public view returns (bool) {516 require(false, stub_error);516 require(false, stub_error);517 user;517 user;518 dummy;518 dummy;536 /// If address is canonical then substrate mirror is zero and vice versa.536 /// If address is canonical then substrate mirror is zero and vice versa.537 /// @dev EVM selector for this function is: 0xdf727d3b,537 /// @dev EVM selector for this function is: 0xdf727d3b,538 /// or in textual repr: collectionOwner()538 /// or in textual repr: collectionOwner()539 function collectionOwner() public view returns (CrossAccount memory) {539 function collectionOwner() public view returns (CrossAddress memory) {540 require(false, stub_error);540 require(false, stub_error);541 dummy;541 dummy;542 return CrossAccount(0x0000000000000000000000000000000000000000, 0);542 return CrossAddress(0x0000000000000000000000000000000000000000, 0);543 }543 }544544545 // /// Changes collection owner to another account545 // /// Changes collection owner to another account560 /// If address is canonical then substrate mirror is zero and vice versa.560 /// If address is canonical then substrate mirror is zero and vice versa.561 /// @dev EVM selector for this function is: 0x5813216b,561 /// @dev EVM selector for this function is: 0x5813216b,562 /// or in textual repr: collectionAdmins()562 /// or in textual repr: collectionAdmins()563 function collectionAdmins() public view returns (CrossAccount[] memory) {563 function collectionAdmins() public view returns (CrossAddress[] memory) {564 require(false, stub_error);564 require(false, stub_error);565 dummy;565 dummy;566 return new CrossAccount[](0);566 return new CrossAddress[](0);567 }567 }568568569 /// Changes collection owner to another account569 /// Changes collection owner to another account572 /// @param newOwner new owner cross account572 /// @param newOwner new owner cross account573 /// @dev EVM selector for this function is: 0x6496c497,573 /// @dev EVM selector for this function is: 0x6496c497,574 /// or in textual repr: changeCollectionOwnerCross((address,uint256))574 /// or in textual repr: changeCollectionOwnerCross((address,uint256))575 function changeCollectionOwnerCross(CrossAccount memory newOwner) public {575 function changeCollectionOwnerCross(CrossAddress memory newOwner) public {576 require(false, stub_error);576 require(false, stub_error);577 newOwner;577 newOwner;578 dummy = 0;578 dummy = 0;579 }579 }580}580}581581582/// @dev Cross account struct582/// @dev Cross account struct583struct CrossAccount {583struct CrossAddress {584 address eth;584 address eth;585 uint256 sub;585 uint256 sub;586}586}817 /// @param tokenId Id for the token.817 /// @param tokenId Id for the token.818 /// @dev EVM selector for this function is: 0x2b29dace,818 /// @dev EVM selector for this function is: 0x2b29dace,819 /// or in textual repr: crossOwnerOf(uint256)819 /// or in textual repr: crossOwnerOf(uint256)820 function crossOwnerOf(uint256 tokenId) public view returns (CrossAccount memory) {820 function crossOwnerOf(uint256 tokenId) public view returns (CrossAddress memory) {821 require(false, stub_error);821 require(false, stub_error);822 tokenId;822 tokenId;823 dummy;823 dummy;824 return CrossAccount(0x0000000000000000000000000000000000000000, 0);824 return CrossAddress(0x0000000000000000000000000000000000000000, 0);825 }825 }826826827 /// Returns the token properties.827 /// Returns the token properties.847 /// @param tokenId The NFT to approve847 /// @param tokenId The NFT to approve848 /// @dev EVM selector for this function is: 0x0ecd0ab0,848 /// @dev EVM selector for this function is: 0x0ecd0ab0,849 /// or in textual repr: approveCross((address,uint256),uint256)849 /// or in textual repr: approveCross((address,uint256),uint256)850 function approveCross(CrossAccount memory approved, uint256 tokenId) public {850 function approveCross(CrossAddress memory approved, uint256 tokenId) public {851 require(false, stub_error);851 require(false, stub_error);852 approved;852 approved;853 tokenId;853 tokenId;875 /// @param tokenId The NFT to transfer875 /// @param tokenId The NFT to transfer876 /// @dev EVM selector for this function is: 0x2ada85ff,876 /// @dev EVM selector for this function is: 0x2ada85ff,877 /// or in textual repr: transferCross((address,uint256),uint256)877 /// or in textual repr: transferCross((address,uint256),uint256)878 function transferCross(CrossAccount memory to, uint256 tokenId) public {878 function transferCross(CrossAddress memory to, uint256 tokenId) public {879 require(false, stub_error);879 require(false, stub_error);880 to;880 to;881 tokenId;881 tokenId;891 /// @dev EVM selector for this function is: 0xd5cf430b,891 /// @dev EVM selector for this function is: 0xd5cf430b,892 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)892 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)893 function transferFromCross(893 function transferFromCross(894 CrossAccount memory from,894 CrossAddress memory from,895 CrossAccount memory to,895 CrossAddress memory to,896 uint256 tokenId896 uint256 tokenId897 ) public {897 ) public {898 require(false, stub_error);898 require(false, stub_error);925 /// @param tokenId The NFT to transfer925 /// @param tokenId The NFT to transfer926 /// @dev EVM selector for this function is: 0xbb2f5a58,926 /// @dev EVM selector for this function is: 0xbb2f5a58,927 /// or in textual repr: burnFromCross((address,uint256),uint256)927 /// or in textual repr: burnFromCross((address,uint256),uint256)928 function burnFromCross(CrossAccount memory from, uint256 tokenId) public {928 function burnFromCross(CrossAddress memory from, uint256 tokenId) public {929 require(false, stub_error);929 require(false, stub_error);930 from;930 from;931 tokenId;931 tokenId;977 /// @return uint256 The id of the newly minted token977 /// @return uint256 The id of the newly minted token978 /// @dev EVM selector for this function is: 0xb904db03,978 /// @dev EVM selector for this function is: 0xb904db03,979 /// or in textual repr: mintCross((address,uint256),(string,bytes)[])979 /// or in textual repr: mintCross((address,uint256),(string,bytes)[])980 function mintCross(CrossAccount memory to, Property[] memory properties) public returns (uint256) {980 function mintCross(CrossAddress memory to, Property[] memory properties) public returns (uint256) {981 require(false, stub_error);981 require(false, stub_error);982 to;982 to;983 properties;983 properties;pallets/refungible/src/erc.rsdiffbeforeafterboth797 /// Returns the owner (in cross format) of the token.797 /// Returns the owner (in cross format) of the token.798 ///798 ///799 /// @param tokenId Id for the token.799 /// @param tokenId Id for the token.800 fn cross_owner_of(&self, token_id: uint256) -> Result<pallet_common::eth::CrossAccount> {800 fn cross_owner_of(&self, token_id: uint256) -> Result<pallet_common::eth::CrossAddress> {801 Self::token_owner(&self, token_id.try_into()?)801 Self::token_owner(&self, token_id.try_into()?)802 .map(|o| pallet_common::eth::CrossAccount::from_sub_cross_account::<T>(&o))802 .map(|o| pallet_common::eth::CrossAddress::from_sub_cross_account::<T>(&o))803 .ok_or(Error::Revert("key too large".into()))803 .ok_or(Error::Revert("key too large".into()))804 }804 }805805869 fn transfer_cross(869 fn transfer_cross(870 &mut self,870 &mut self,871 caller: caller,871 caller: caller,872 to: pallet_common::eth::CrossAccount,872 to: pallet_common::eth::CrossAddress,873 token_id: uint256,873 token_id: uint256,874 ) -> Result<void> {874 ) -> Result<void> {875 let caller = T::CrossAccountId::from_eth(caller);875 let caller = T::CrossAccountId::from_eth(caller);897 fn transfer_from_cross(897 fn transfer_from_cross(898 &mut self,898 &mut self,899 caller: caller,899 caller: caller,900 from: pallet_common::eth::CrossAccount,900 from: pallet_common::eth::CrossAddress,901 to: pallet_common::eth::CrossAccount,901 to: pallet_common::eth::CrossAddress,902 token_id: uint256,902 token_id: uint256,903 ) -> Result<void> {903 ) -> Result<void> {904 let caller = T::CrossAccountId::from_eth(caller);904 let caller = T::CrossAccountId::from_eth(caller);953 fn burn_from_cross(953 fn burn_from_cross(954 &mut self,954 &mut self,955 caller: caller,955 caller: caller,956 from: pallet_common::eth::CrossAccount,956 from: pallet_common::eth::CrossAddress,957 token_id: uint256,957 token_id: uint256,958 ) -> Result<void> {958 ) -> Result<void> {959 let caller = T::CrossAccountId::from_eth(caller);959 let caller = T::CrossAccountId::from_eth(caller);1090 fn mint_cross(1090 fn mint_cross(1091 &mut self,1091 &mut self,1092 caller: caller,1092 caller: caller,1093 to: pallet_common::eth::CrossAccount,1093 to: pallet_common::eth::CrossAddress,1094 properties: Vec<pallet_common::eth::Property>,1094 properties: Vec<pallet_common::eth::Property>,1095 ) -> Result<uint256> {1095 ) -> Result<uint256> {1096 let token_id = <TokensMinted<T>>::get(self.id)1096 let token_id = <TokensMinted<T>>::get(self.id)pallets/refungible/src/erc_token.rsdiffbeforeafterboth224 fn burn_from_cross(224 fn burn_from_cross(225 &mut self,225 &mut self,226 caller: caller,226 caller: caller,227 from: pallet_common::eth::CrossAccount,227 from: pallet_common::eth::CrossAddress,228 amount: uint256,228 amount: uint256,229 ) -> Result<bool> {229 ) -> Result<bool> {230 let caller = T::CrossAccountId::from_eth(caller);230 let caller = T::CrossAccountId::from_eth(caller);250 fn approve_cross(250 fn approve_cross(251 &mut self,251 &mut self,252 caller: caller,252 caller: caller,253 spender: pallet_common::eth::CrossAccount,253 spender: pallet_common::eth::CrossAddress,254 amount: uint256,254 amount: uint256,255 ) -> Result<bool> {255 ) -> Result<bool> {256 let caller = T::CrossAccountId::from_eth(caller);256 let caller = T::CrossAccountId::from_eth(caller);280 fn transfer_cross(280 fn transfer_cross(281 &mut self,281 &mut self,282 caller: caller,282 caller: caller,283 to: pallet_common::eth::CrossAccount,283 to: pallet_common::eth::CrossAddress,284 amount: uint256,284 amount: uint256,285 ) -> Result<bool> {285 ) -> Result<bool> {286 let caller = T::CrossAccountId::from_eth(caller);286 let caller = T::CrossAccountId::from_eth(caller);303 fn transfer_from_cross(303 fn transfer_from_cross(304 &mut self,304 &mut self,305 caller: caller,305 caller: caller,306 from: pallet_common::eth::CrossAccount,306 from: pallet_common::eth::CrossAddress,307 to: pallet_common::eth::CrossAccount,307 to: pallet_common::eth::CrossAddress,308 amount: uint256,308 amount: uint256,309 ) -> Result<bool> {309 ) -> Result<bool> {310 let caller = T::CrossAccountId::from_eth(caller);310 let caller = T::CrossAccountId::from_eth(caller);pallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth256 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.256 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.257 /// @dev EVM selector for this function is: 0x84a1d5a8,257 /// @dev EVM selector for this function is: 0x84a1d5a8,258 /// or in textual repr: setCollectionSponsorCross((address,uint256))258 /// or in textual repr: setCollectionSponsorCross((address,uint256))259 function setCollectionSponsorCross(CrossAccount memory sponsor) public {259 function setCollectionSponsorCross(CrossAddress memory sponsor) public {260 require(false, stub_error);260 require(false, stub_error);261 sponsor;261 sponsor;262 dummy = 0;262 dummy = 0;294 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.294 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.295 /// @dev EVM selector for this function is: 0x6ec0a9f1,295 /// @dev EVM selector for this function is: 0x6ec0a9f1,296 /// or in textual repr: collectionSponsor()296 /// or in textual repr: collectionSponsor()297 function collectionSponsor() public view returns (CrossAccount memory) {297 function collectionSponsor() public view returns (CrossAddress memory) {298 require(false, stub_error);298 require(false, stub_error);299 dummy;299 dummy;300 return CrossAccount(0x0000000000000000000000000000000000000000, 0);300 return CrossAddress(0x0000000000000000000000000000000000000000, 0);301 }301 }302302303 /// Get current collection limits.303 /// Get current collection limits.335 /// @param newAdmin Cross account administrator address.335 /// @param newAdmin Cross account administrator address.336 /// @dev EVM selector for this function is: 0x859aa7d6,336 /// @dev EVM selector for this function is: 0x859aa7d6,337 /// or in textual repr: addCollectionAdminCross((address,uint256))337 /// or in textual repr: addCollectionAdminCross((address,uint256))338 function addCollectionAdminCross(CrossAccount memory newAdmin) public {338 function addCollectionAdminCross(CrossAddress memory newAdmin) public {339 require(false, stub_error);339 require(false, stub_error);340 newAdmin;340 newAdmin;341 dummy = 0;341 dummy = 0;345 /// @param admin Cross account administrator address.345 /// @param admin Cross account administrator address.346 /// @dev EVM selector for this function is: 0x6c0cd173,346 /// @dev EVM selector for this function is: 0x6c0cd173,347 /// or in textual repr: removeCollectionAdminCross((address,uint256))347 /// or in textual repr: removeCollectionAdminCross((address,uint256))348 function removeCollectionAdminCross(CrossAccount memory admin) public {348 function removeCollectionAdminCross(CrossAddress memory admin) public {349 require(false, stub_error);349 require(false, stub_error);350 admin;350 admin;351 dummy = 0;351 dummy = 0;431 /// @param user User address to check.431 /// @param user User address to check.432 /// @dev EVM selector for this function is: 0x91b6df49,432 /// @dev EVM selector for this function is: 0x91b6df49,433 /// or in textual repr: allowlistedCross((address,uint256))433 /// or in textual repr: allowlistedCross((address,uint256))434 function allowlistedCross(CrossAccount memory user) public view returns (bool) {434 function allowlistedCross(CrossAddress memory user) public view returns (bool) {435 require(false, stub_error);435 require(false, stub_error);436 user;436 user;437 dummy;437 dummy;454 /// @param user User cross account address.454 /// @param user User cross account address.455 /// @dev EVM selector for this function is: 0xa0184a3a,455 /// @dev EVM selector for this function is: 0xa0184a3a,456 /// or in textual repr: addToCollectionAllowListCross((address,uint256))456 /// or in textual repr: addToCollectionAllowListCross((address,uint256))457 function addToCollectionAllowListCross(CrossAccount memory user) public {457 function addToCollectionAllowListCross(CrossAddress memory user) public {458 require(false, stub_error);458 require(false, stub_error);459 user;459 user;460 dummy = 0;460 dummy = 0;476 /// @param user User cross account address.476 /// @param user User cross account address.477 /// @dev EVM selector for this function is: 0x09ba452a,477 /// @dev EVM selector for this function is: 0x09ba452a,478 /// or in textual repr: removeFromCollectionAllowListCross((address,uint256))478 /// or in textual repr: removeFromCollectionAllowListCross((address,uint256))479 function removeFromCollectionAllowListCross(CrossAccount memory user) public {479 function removeFromCollectionAllowListCross(CrossAddress memory user) public {480 require(false, stub_error);480 require(false, stub_error);481 user;481 user;482 dummy = 0;482 dummy = 0;512 /// @return "true" if account is the owner or admin512 /// @return "true" if account is the owner or admin513 /// @dev EVM selector for this function is: 0x3e75a905,513 /// @dev EVM selector for this function is: 0x3e75a905,514 /// or in textual repr: isOwnerOrAdminCross((address,uint256))514 /// or in textual repr: isOwnerOrAdminCross((address,uint256))515 function isOwnerOrAdminCross(CrossAccount memory user) public view returns (bool) {515 function isOwnerOrAdminCross(CrossAddress memory user) public view returns (bool) {516 require(false, stub_error);516 require(false, stub_error);517 user;517 user;518 dummy;518 dummy;536 /// If address is canonical then substrate mirror is zero and vice versa.536 /// If address is canonical then substrate mirror is zero and vice versa.537 /// @dev EVM selector for this function is: 0xdf727d3b,537 /// @dev EVM selector for this function is: 0xdf727d3b,538 /// or in textual repr: collectionOwner()538 /// or in textual repr: collectionOwner()539 function collectionOwner() public view returns (CrossAccount memory) {539 function collectionOwner() public view returns (CrossAddress memory) {540 require(false, stub_error);540 require(false, stub_error);541 dummy;541 dummy;542 return CrossAccount(0x0000000000000000000000000000000000000000, 0);542 return CrossAddress(0x0000000000000000000000000000000000000000, 0);543 }543 }544544545 // /// Changes collection owner to another account545 // /// Changes collection owner to another account560 /// If address is canonical then substrate mirror is zero and vice versa.560 /// If address is canonical then substrate mirror is zero and vice versa.561 /// @dev EVM selector for this function is: 0x5813216b,561 /// @dev EVM selector for this function is: 0x5813216b,562 /// or in textual repr: collectionAdmins()562 /// or in textual repr: collectionAdmins()563 function collectionAdmins() public view returns (CrossAccount[] memory) {563 function collectionAdmins() public view returns (CrossAddress[] memory) {564 require(false, stub_error);564 require(false, stub_error);565 dummy;565 dummy;566 return new CrossAccount[](0);566 return new CrossAddress[](0);567 }567 }568568569 /// Changes collection owner to another account569 /// Changes collection owner to another account572 /// @param newOwner new owner cross account572 /// @param newOwner new owner cross account573 /// @dev EVM selector for this function is: 0x6496c497,573 /// @dev EVM selector for this function is: 0x6496c497,574 /// or in textual repr: changeCollectionOwnerCross((address,uint256))574 /// or in textual repr: changeCollectionOwnerCross((address,uint256))575 function changeCollectionOwnerCross(CrossAccount memory newOwner) public {575 function changeCollectionOwnerCross(CrossAddress memory newOwner) public {576 require(false, stub_error);576 require(false, stub_error);577 newOwner;577 newOwner;578 dummy = 0;578 dummy = 0;579 }579 }580}580}581581582/// @dev Cross account struct582/// @dev Cross account struct583struct CrossAccount {583struct CrossAddress {584 address eth;584 address eth;585 uint256 sub;585 uint256 sub;586}586}815 /// @param tokenId Id for the token.815 /// @param tokenId Id for the token.816 /// @dev EVM selector for this function is: 0x2b29dace,816 /// @dev EVM selector for this function is: 0x2b29dace,817 /// or in textual repr: crossOwnerOf(uint256)817 /// or in textual repr: crossOwnerOf(uint256)818 function crossOwnerOf(uint256 tokenId) public view returns (CrossAccount memory) {818 function crossOwnerOf(uint256 tokenId) public view returns (CrossAddress memory) {819 require(false, stub_error);819 require(false, stub_error);820 tokenId;820 tokenId;821 dummy;821 dummy;822 return CrossAccount(0x0000000000000000000000000000000000000000, 0);822 return CrossAddress(0x0000000000000000000000000000000000000000, 0);823 }823 }824824825 /// Returns the token properties.825 /// Returns the token properties.860 /// @param tokenId The RFT to transfer860 /// @param tokenId The RFT to transfer861 /// @dev EVM selector for this function is: 0x2ada85ff,861 /// @dev EVM selector for this function is: 0x2ada85ff,862 /// or in textual repr: transferCross((address,uint256),uint256)862 /// or in textual repr: transferCross((address,uint256),uint256)863 function transferCross(CrossAccount memory to, uint256 tokenId) public {863 function transferCross(CrossAddress memory to, uint256 tokenId) public {864 require(false, stub_error);864 require(false, stub_error);865 to;865 to;866 tokenId;866 tokenId;876 /// @dev EVM selector for this function is: 0xd5cf430b,876 /// @dev EVM selector for this function is: 0xd5cf430b,877 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)877 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)878 function transferFromCross(878 function transferFromCross(879 CrossAccount memory from,879 CrossAddress memory from,880 CrossAccount memory to,880 CrossAddress memory to,881 uint256 tokenId881 uint256 tokenId882 ) public {882 ) public {883 require(false, stub_error);883 require(false, stub_error);912 /// @param tokenId The RFT to transfer912 /// @param tokenId The RFT to transfer913 /// @dev EVM selector for this function is: 0xbb2f5a58,913 /// @dev EVM selector for this function is: 0xbb2f5a58,914 /// or in textual repr: burnFromCross((address,uint256),uint256)914 /// or in textual repr: burnFromCross((address,uint256),uint256)915 function burnFromCross(CrossAccount memory from, uint256 tokenId) public {915 function burnFromCross(CrossAddress memory from, uint256 tokenId) public {916 require(false, stub_error);916 require(false, stub_error);917 from;917 from;918 tokenId;918 tokenId;964 /// @return uint256 The id of the newly minted token964 /// @return uint256 The id of the newly minted token965 /// @dev EVM selector for this function is: 0xb904db03,965 /// @dev EVM selector for this function is: 0xb904db03,966 /// or in textual repr: mintCross((address,uint256),(string,bytes)[])966 /// or in textual repr: mintCross((address,uint256),(string,bytes)[])967 function mintCross(CrossAccount memory to, Property[] memory properties) public returns (uint256) {967 function mintCross(CrossAddress memory to, Property[] memory properties) public returns (uint256) {968 require(false, stub_error);968 require(false, stub_error);969 to;969 to;970 properties;970 properties;pallets/refungible/src/stubs/UniqueRefungibleToken.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungibleToken.soldiffbeforeafterboth58 /// @param amount The amount that will be burnt.58 /// @param amount The amount that will be burnt.59 /// @dev EVM selector for this function is: 0xbb2f5a58,59 /// @dev EVM selector for this function is: 0xbb2f5a58,60 /// or in textual repr: burnFromCross((address,uint256),uint256)60 /// or in textual repr: burnFromCross((address,uint256),uint256)61 function burnFromCross(CrossAccount memory from, uint256 amount) public returns (bool) {61 function burnFromCross(CrossAddress memory from, uint256 amount) public returns (bool) {62 require(false, stub_error);62 require(false, stub_error);63 from;63 from;64 amount;64 amount;75 /// @param amount The amount of tokens to be spent.75 /// @param amount The amount of tokens to be spent.76 /// @dev EVM selector for this function is: 0x0ecd0ab0,76 /// @dev EVM selector for this function is: 0x0ecd0ab0,77 /// or in textual repr: approveCross((address,uint256),uint256)77 /// or in textual repr: approveCross((address,uint256),uint256)78 function approveCross(CrossAccount memory spender, uint256 amount) public returns (bool) {78 function approveCross(CrossAddress memory spender, uint256 amount) public returns (bool) {79 require(false, stub_error);79 require(false, stub_error);80 spender;80 spender;81 amount;81 amount;100 /// @param amount The amount to be transferred.100 /// @param amount The amount to be transferred.101 /// @dev EVM selector for this function is: 0x2ada85ff,101 /// @dev EVM selector for this function is: 0x2ada85ff,102 /// or in textual repr: transferCross((address,uint256),uint256)102 /// or in textual repr: transferCross((address,uint256),uint256)103 function transferCross(CrossAccount memory to, uint256 amount) public returns (bool) {103 function transferCross(CrossAddress memory to, uint256 amount) public returns (bool) {104 require(false, stub_error);104 require(false, stub_error);105 to;105 to;106 amount;106 amount;115 /// @dev EVM selector for this function is: 0xd5cf430b,115 /// @dev EVM selector for this function is: 0xd5cf430b,116 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)116 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)117 function transferFromCross(117 function transferFromCross(118 CrossAccount memory from,118 CrossAddress memory from,119 CrossAccount memory to,119 CrossAddress memory to,120 uint256 amount120 uint256 amount121 ) public returns (bool) {121 ) public returns (bool) {122 require(false, stub_error);122 require(false, stub_error);129}129}130130131/// @dev Cross account struct131/// @dev Cross account struct132struct CrossAccount {132struct CrossAddress {133 address eth;133 address eth;134 uint256 sub;134 uint256 sub;135}135}tests/src/eth/abi/contractHelpers.jsondiffbeforeafterboth226 { "internalType": "address", "name": "eth", "type": "address" },226 { "internalType": "address", "name": "eth", "type": "address" },227 { "internalType": "uint256", "name": "sub", "type": "uint256" }227 { "internalType": "uint256", "name": "sub", "type": "uint256" }228 ],228 ],229 "internalType": "struct CrossAccount",229 "internalType": "struct CrossAddress",230 "name": "",230 "name": "",231 "type": "tuple"231 "type": "tuple"232 }232 }tests/src/eth/abi/fungible.jsondiffbeforeafterboth56 { "internalType": "address", "name": "eth", "type": "address" },56 { "internalType": "address", "name": "eth", "type": "address" },57 { "internalType": "uint256", "name": "sub", "type": "uint256" }57 { "internalType": "uint256", "name": "sub", "type": "uint256" }58 ],58 ],59 "internalType": "struct CrossAccount",59 "internalType": "struct CrossAddress",60 "name": "newAdmin",60 "name": "newAdmin",61 "type": "tuple"61 "type": "tuple"62 }62 }73 { "internalType": "address", "name": "eth", "type": "address" },73 { "internalType": "address", "name": "eth", "type": "address" },74 { "internalType": "uint256", "name": "sub", "type": "uint256" }74 { "internalType": "uint256", "name": "sub", "type": "uint256" }75 ],75 ],76 "internalType": "struct CrossAccount",76 "internalType": "struct CrossAddress",77 "name": "user",77 "name": "user",78 "type": "tuple"78 "type": "tuple"79 }79 }100 { "internalType": "address", "name": "eth", "type": "address" },100 { "internalType": "address", "name": "eth", "type": "address" },101 { "internalType": "uint256", "name": "sub", "type": "uint256" }101 { "internalType": "uint256", "name": "sub", "type": "uint256" }102 ],102 ],103 "internalType": "struct CrossAccount",103 "internalType": "struct CrossAddress",104 "name": "user",104 "name": "user",105 "type": "tuple"105 "type": "tuple"106 }106 }127 { "internalType": "address", "name": "eth", "type": "address" },127 { "internalType": "address", "name": "eth", "type": "address" },128 { "internalType": "uint256", "name": "sub", "type": "uint256" }128 { "internalType": "uint256", "name": "sub", "type": "uint256" }129 ],129 ],130 "internalType": "struct CrossAccount",130 "internalType": "struct CrossAddress",131 "name": "spender",131 "name": "spender",132 "type": "tuple"132 "type": "tuple"133 },133 },154 { "internalType": "address", "name": "eth", "type": "address" },154 { "internalType": "address", "name": "eth", "type": "address" },155 { "internalType": "uint256", "name": "sub", "type": "uint256" }155 { "internalType": "uint256", "name": "sub", "type": "uint256" }156 ],156 ],157 "internalType": "struct CrossAccount",157 "internalType": "struct CrossAddress",158 "name": "from",158 "name": "from",159 "type": "tuple"159 "type": "tuple"160 },160 },172 { "internalType": "address", "name": "eth", "type": "address" },172 { "internalType": "address", "name": "eth", "type": "address" },173 { "internalType": "uint256", "name": "sub", "type": "uint256" }173 { "internalType": "uint256", "name": "sub", "type": "uint256" }174 ],174 ],175 "internalType": "struct CrossAccount",175 "internalType": "struct CrossAddress",176 "name": "newOwner",176 "name": "newOwner",177 "type": "tuple"177 "type": "tuple"178 }178 }191 { "internalType": "address", "name": "eth", "type": "address" },191 { "internalType": "address", "name": "eth", "type": "address" },192 { "internalType": "uint256", "name": "sub", "type": "uint256" }192 { "internalType": "uint256", "name": "sub", "type": "uint256" }193 ],193 ],194 "internalType": "struct CrossAccount[]",194 "internalType": "struct CrossAddress[]",195 "name": "",195 "name": "",196 "type": "tuple[]"196 "type": "tuple[]"197 }197 }282 { "internalType": "address", "name": "eth", "type": "address" },282 { "internalType": "address", "name": "eth", "type": "address" },283 { "internalType": "uint256", "name": "sub", "type": "uint256" }283 { "internalType": "uint256", "name": "sub", "type": "uint256" }284 ],284 ],285 "internalType": "struct CrossAccount",285 "internalType": "struct CrossAddress",286 "name": "",286 "name": "",287 "type": "tuple"287 "type": "tuple"288 }288 }325 { "internalType": "address", "name": "eth", "type": "address" },325 { "internalType": "address", "name": "eth", "type": "address" },326 { "internalType": "uint256", "name": "sub", "type": "uint256" }326 { "internalType": "uint256", "name": "sub", "type": "uint256" }327 ],327 ],328 "internalType": "struct CrossAccount",328 "internalType": "struct CrossAddress",329 "name": "",329 "name": "",330 "type": "tuple"330 "type": "tuple"331 }331 }384 { "internalType": "address", "name": "eth", "type": "address" },384 { "internalType": "address", "name": "eth", "type": "address" },385 { "internalType": "uint256", "name": "sub", "type": "uint256" }385 { "internalType": "uint256", "name": "sub", "type": "uint256" }386 ],386 ],387 "internalType": "struct CrossAccount",387 "internalType": "struct CrossAddress",388 "name": "user",388 "name": "user",389 "type": "tuple"389 "type": "tuple"390 }390 }428 { "internalType": "address", "name": "eth", "type": "address" },428 { "internalType": "address", "name": "eth", "type": "address" },429 { "internalType": "uint256", "name": "sub", "type": "uint256" }429 { "internalType": "uint256", "name": "sub", "type": "uint256" }430 ],430 ],431 "internalType": "struct CrossAccount",431 "internalType": "struct CrossAddress",432 "name": "to",432 "name": "to",433 "type": "tuple"433 "type": "tuple"434 },434 },453 { "internalType": "address", "name": "eth", "type": "address" },453 { "internalType": "address", "name": "eth", "type": "address" },454 { "internalType": "uint256", "name": "sub", "type": "uint256" }454 { "internalType": "uint256", "name": "sub", "type": "uint256" }455 ],455 ],456 "internalType": "struct CrossAccount",456 "internalType": "struct CrossAddress",457 "name": "admin",457 "name": "admin",458 "type": "tuple"458 "type": "tuple"459 }459 }477 { "internalType": "address", "name": "eth", "type": "address" },477 { "internalType": "address", "name": "eth", "type": "address" },478 { "internalType": "uint256", "name": "sub", "type": "uint256" }478 { "internalType": "uint256", "name": "sub", "type": "uint256" }479 ],479 ],480 "internalType": "struct CrossAccount",480 "internalType": "struct CrossAddress",481 "name": "user",481 "name": "user",482 "type": "tuple"482 "type": "tuple"483 }483 }575 { "internalType": "address", "name": "eth", "type": "address" },575 { "internalType": "address", "name": "eth", "type": "address" },576 { "internalType": "uint256", "name": "sub", "type": "uint256" }576 { "internalType": "uint256", "name": "sub", "type": "uint256" }577 ],577 ],578 "internalType": "struct CrossAccount",578 "internalType": "struct CrossAddress",579 "name": "sponsor",579 "name": "sponsor",580 "type": "tuple"580 "type": "tuple"581 }581 }625 { "internalType": "address", "name": "eth", "type": "address" },625 { "internalType": "address", "name": "eth", "type": "address" },626 { "internalType": "uint256", "name": "sub", "type": "uint256" }626 { "internalType": "uint256", "name": "sub", "type": "uint256" }627 ],627 ],628 "internalType": "struct CrossAccount",628 "internalType": "struct CrossAddress",629 "name": "to",629 "name": "to",630 "type": "tuple"630 "type": "tuple"631 },631 },654 { "internalType": "address", "name": "eth", "type": "address" },654 { "internalType": "address", "name": "eth", "type": "address" },655 { "internalType": "uint256", "name": "sub", "type": "uint256" }655 { "internalType": "uint256", "name": "sub", "type": "uint256" }656 ],656 ],657 "internalType": "struct CrossAccount",657 "internalType": "struct CrossAddress",658 "name": "from",658 "name": "from",659 "type": "tuple"659 "type": "tuple"660 },660 },663 { "internalType": "address", "name": "eth", "type": "address" },663 { "internalType": "address", "name": "eth", "type": "address" },664 { "internalType": "uint256", "name": "sub", "type": "uint256" }664 { "internalType": "uint256", "name": "sub", "type": "uint256" }665 ],665 ],666 "internalType": "struct CrossAccount",666 "internalType": "struct CrossAddress",667 "name": "to",667 "name": "to",668 "type": "tuple"668 "type": "tuple"669 },669 },tests/src/eth/abi/nonFungible.jsondiffbeforeafterboth87 { "internalType": "address", "name": "eth", "type": "address" },87 { "internalType": "address", "name": "eth", "type": "address" },88 { "internalType": "uint256", "name": "sub", "type": "uint256" }88 { "internalType": "uint256", "name": "sub", "type": "uint256" }89 ],89 ],90 "internalType": "struct CrossAccount",90 "internalType": "struct CrossAddress",91 "name": "newAdmin",91 "name": "newAdmin",92 "type": "tuple"92 "type": "tuple"93 }93 }104 { "internalType": "address", "name": "eth", "type": "address" },104 { "internalType": "address", "name": "eth", "type": "address" },105 { "internalType": "uint256", "name": "sub", "type": "uint256" }105 { "internalType": "uint256", "name": "sub", "type": "uint256" }106 ],106 ],107 "internalType": "struct CrossAccount",107 "internalType": "struct CrossAddress",108 "name": "user",108 "name": "user",109 "type": "tuple"109 "type": "tuple"110 }110 }121 { "internalType": "address", "name": "eth", "type": "address" },121 { "internalType": "address", "name": "eth", "type": "address" },122 { "internalType": "uint256", "name": "sub", "type": "uint256" }122 { "internalType": "uint256", "name": "sub", "type": "uint256" }123 ],123 ],124 "internalType": "struct CrossAccount",124 "internalType": "struct CrossAddress",125 "name": "user",125 "name": "user",126 "type": "tuple"126 "type": "tuple"127 }127 }148 { "internalType": "address", "name": "eth", "type": "address" },148 { "internalType": "address", "name": "eth", "type": "address" },149 { "internalType": "uint256", "name": "sub", "type": "uint256" }149 { "internalType": "uint256", "name": "sub", "type": "uint256" }150 ],150 ],151 "internalType": "struct CrossAccount",151 "internalType": "struct CrossAddress",152 "name": "approved",152 "name": "approved",153 "type": "tuple"153 "type": "tuple"154 },154 },184 { "internalType": "address", "name": "eth", "type": "address" },184 { "internalType": "address", "name": "eth", "type": "address" },185 { "internalType": "uint256", "name": "sub", "type": "uint256" }185 { "internalType": "uint256", "name": "sub", "type": "uint256" }186 ],186 ],187 "internalType": "struct CrossAccount",187 "internalType": "struct CrossAddress",188 "name": "from",188 "name": "from",189 "type": "tuple"189 "type": "tuple"190 },190 },202 { "internalType": "address", "name": "eth", "type": "address" },202 { "internalType": "address", "name": "eth", "type": "address" },203 { "internalType": "uint256", "name": "sub", "type": "uint256" }203 { "internalType": "uint256", "name": "sub", "type": "uint256" }204 ],204 ],205 "internalType": "struct CrossAccount",205 "internalType": "struct CrossAddress",206 "name": "newOwner",206 "name": "newOwner",207 "type": "tuple"207 "type": "tuple"208 }208 }221 { "internalType": "address", "name": "eth", "type": "address" },221 { "internalType": "address", "name": "eth", "type": "address" },222 { "internalType": "uint256", "name": "sub", "type": "uint256" }222 { "internalType": "uint256", "name": "sub", "type": "uint256" }223 ],223 ],224 "internalType": "struct CrossAccount[]",224 "internalType": "struct CrossAddress[]",225 "name": "",225 "name": "",226 "type": "tuple[]"226 "type": "tuple[]"227 }227 }312 { "internalType": "address", "name": "eth", "type": "address" },312 { "internalType": "address", "name": "eth", "type": "address" },313 { "internalType": "uint256", "name": "sub", "type": "uint256" }313 { "internalType": "uint256", "name": "sub", "type": "uint256" }314 ],314 ],315 "internalType": "struct CrossAccount",315 "internalType": "struct CrossAddress",316 "name": "",316 "name": "",317 "type": "tuple"317 "type": "tuple"318 }318 }355 { "internalType": "address", "name": "eth", "type": "address" },355 { "internalType": "address", "name": "eth", "type": "address" },356 { "internalType": "uint256", "name": "sub", "type": "uint256" }356 { "internalType": "uint256", "name": "sub", "type": "uint256" }357 ],357 ],358 "internalType": "struct CrossAccount",358 "internalType": "struct CrossAddress",359 "name": "",359 "name": "",360 "type": "tuple"360 "type": "tuple"361 }361 }388 { "internalType": "address", "name": "eth", "type": "address" },388 { "internalType": "address", "name": "eth", "type": "address" },389 { "internalType": "uint256", "name": "sub", "type": "uint256" }389 { "internalType": "uint256", "name": "sub", "type": "uint256" }390 ],390 ],391 "internalType": "struct CrossAccount",391 "internalType": "struct CrossAddress",392 "name": "",392 "name": "",393 "type": "tuple"393 "type": "tuple"394 }394 }462 { "internalType": "address", "name": "eth", "type": "address" },462 { "internalType": "address", "name": "eth", "type": "address" },463 { "internalType": "uint256", "name": "sub", "type": "uint256" }463 { "internalType": "uint256", "name": "sub", "type": "uint256" }464 ],464 ],465 "internalType": "struct CrossAccount",465 "internalType": "struct CrossAddress",466 "name": "user",466 "name": "user",467 "type": "tuple"467 "type": "tuple"468 }468 }486 { "internalType": "address", "name": "eth", "type": "address" },486 { "internalType": "address", "name": "eth", "type": "address" },487 { "internalType": "uint256", "name": "sub", "type": "uint256" }487 { "internalType": "uint256", "name": "sub", "type": "uint256" }488 ],488 ],489 "internalType": "struct CrossAccount",489 "internalType": "struct CrossAddress",490 "name": "to",490 "name": "to",491 "type": "tuple"491 "type": "tuple"492 },492 },582 { "internalType": "address", "name": "eth", "type": "address" },582 { "internalType": "address", "name": "eth", "type": "address" },583 { "internalType": "uint256", "name": "sub", "type": "uint256" }583 { "internalType": "uint256", "name": "sub", "type": "uint256" }584 ],584 ],585 "internalType": "struct CrossAccount",585 "internalType": "struct CrossAddress",586 "name": "admin",586 "name": "admin",587 "type": "tuple"587 "type": "tuple"588 }588 }606 { "internalType": "address", "name": "eth", "type": "address" },606 { "internalType": "address", "name": "eth", "type": "address" },607 { "internalType": "uint256", "name": "sub", "type": "uint256" }607 { "internalType": "uint256", "name": "sub", "type": "uint256" }608 ],608 ],609 "internalType": "struct CrossAccount",609 "internalType": "struct CrossAddress",610 "name": "user",610 "name": "user",611 "type": "tuple"611 "type": "tuple"612 }612 }737 { "internalType": "address", "name": "eth", "type": "address" },737 { "internalType": "address", "name": "eth", "type": "address" },738 { "internalType": "uint256", "name": "sub", "type": "uint256" }738 { "internalType": "uint256", "name": "sub", "type": "uint256" }739 ],739 ],740 "internalType": "struct CrossAccount",740 "internalType": "struct CrossAddress",741 "name": "sponsor",741 "name": "sponsor",742 "type": "tuple"742 "type": "tuple"743 }743 }891 { "internalType": "address", "name": "eth", "type": "address" },891 { "internalType": "address", "name": "eth", "type": "address" },892 { "internalType": "uint256", "name": "sub", "type": "uint256" }892 { "internalType": "uint256", "name": "sub", "type": "uint256" }893 ],893 ],894 "internalType": "struct CrossAccount",894 "internalType": "struct CrossAddress",895 "name": "to",895 "name": "to",896 "type": "tuple"896 "type": "tuple"897 },897 },920 { "internalType": "address", "name": "eth", "type": "address" },920 { "internalType": "address", "name": "eth", "type": "address" },921 { "internalType": "uint256", "name": "sub", "type": "uint256" }921 { "internalType": "uint256", "name": "sub", "type": "uint256" }922 ],922 ],923 "internalType": "struct CrossAccount",923 "internalType": "struct CrossAddress",924 "name": "from",924 "name": "from",925 "type": "tuple"925 "type": "tuple"926 },926 },929 { "internalType": "address", "name": "eth", "type": "address" },929 { "internalType": "address", "name": "eth", "type": "address" },930 { "internalType": "uint256", "name": "sub", "type": "uint256" }930 { "internalType": "uint256", "name": "sub", "type": "uint256" }931 ],931 ],932 "internalType": "struct CrossAccount",932 "internalType": "struct CrossAddress",933 "name": "to",933 "name": "to",934 "type": "tuple"934 "type": "tuple"935 },935 },tests/src/eth/abi/reFungible.jsondiffbeforeafterboth87 { "internalType": "address", "name": "eth", "type": "address" },87 { "internalType": "address", "name": "eth", "type": "address" },88 { "internalType": "uint256", "name": "sub", "type": "uint256" }88 { "internalType": "uint256", "name": "sub", "type": "uint256" }89 ],89 ],90 "internalType": "struct CrossAccount",90 "internalType": "struct CrossAddress",91 "name": "newAdmin",91 "name": "newAdmin",92 "type": "tuple"92 "type": "tuple"93 }93 }104 { "internalType": "address", "name": "eth", "type": "address" },104 { "internalType": "address", "name": "eth", "type": "address" },105 { "internalType": "uint256", "name": "sub", "type": "uint256" }105 { "internalType": "uint256", "name": "sub", "type": "uint256" }106 ],106 ],107 "internalType": "struct CrossAccount",107 "internalType": "struct CrossAddress",108 "name": "user",108 "name": "user",109 "type": "tuple"109 "type": "tuple"110 }110 }121 { "internalType": "address", "name": "eth", "type": "address" },121 { "internalType": "address", "name": "eth", "type": "address" },122 { "internalType": "uint256", "name": "sub", "type": "uint256" }122 { "internalType": "uint256", "name": "sub", "type": "uint256" }123 ],123 ],124 "internalType": "struct CrossAccount",124 "internalType": "struct CrossAddress",125 "name": "user",125 "name": "user",126 "type": "tuple"126 "type": "tuple"127 }127 }166 { "internalType": "address", "name": "eth", "type": "address" },166 { "internalType": "address", "name": "eth", "type": "address" },167 { "internalType": "uint256", "name": "sub", "type": "uint256" }167 { "internalType": "uint256", "name": "sub", "type": "uint256" }168 ],168 ],169 "internalType": "struct CrossAccount",169 "internalType": "struct CrossAddress",170 "name": "from",170 "name": "from",171 "type": "tuple"171 "type": "tuple"172 },172 },184 { "internalType": "address", "name": "eth", "type": "address" },184 { "internalType": "address", "name": "eth", "type": "address" },185 { "internalType": "uint256", "name": "sub", "type": "uint256" }185 { "internalType": "uint256", "name": "sub", "type": "uint256" }186 ],186 ],187 "internalType": "struct CrossAccount",187 "internalType": "struct CrossAddress",188 "name": "newOwner",188 "name": "newOwner",189 "type": "tuple"189 "type": "tuple"190 }190 }203 { "internalType": "address", "name": "eth", "type": "address" },203 { "internalType": "address", "name": "eth", "type": "address" },204 { "internalType": "uint256", "name": "sub", "type": "uint256" }204 { "internalType": "uint256", "name": "sub", "type": "uint256" }205 ],205 ],206 "internalType": "struct CrossAccount[]",206 "internalType": "struct CrossAddress[]",207 "name": "",207 "name": "",208 "type": "tuple[]"208 "type": "tuple[]"209 }209 }294 { "internalType": "address", "name": "eth", "type": "address" },294 { "internalType": "address", "name": "eth", "type": "address" },295 { "internalType": "uint256", "name": "sub", "type": "uint256" }295 { "internalType": "uint256", "name": "sub", "type": "uint256" }296 ],296 ],297 "internalType": "struct CrossAccount",297 "internalType": "struct CrossAddress",298 "name": "",298 "name": "",299 "type": "tuple"299 "type": "tuple"300 }300 }337 { "internalType": "address", "name": "eth", "type": "address" },337 { "internalType": "address", "name": "eth", "type": "address" },338 { "internalType": "uint256", "name": "sub", "type": "uint256" }338 { "internalType": "uint256", "name": "sub", "type": "uint256" }339 ],339 ],340 "internalType": "struct CrossAccount",340 "internalType": "struct CrossAddress",341 "name": "",341 "name": "",342 "type": "tuple"342 "type": "tuple"343 }343 }370 { "internalType": "address", "name": "eth", "type": "address" },370 { "internalType": "address", "name": "eth", "type": "address" },371 { "internalType": "uint256", "name": "sub", "type": "uint256" }371 { "internalType": "uint256", "name": "sub", "type": "uint256" }372 ],372 ],373 "internalType": "struct CrossAccount",373 "internalType": "struct CrossAddress",374 "name": "",374 "name": "",375 "type": "tuple"375 "type": "tuple"376 }376 }444 { "internalType": "address", "name": "eth", "type": "address" },444 { "internalType": "address", "name": "eth", "type": "address" },445 { "internalType": "uint256", "name": "sub", "type": "uint256" }445 { "internalType": "uint256", "name": "sub", "type": "uint256" }446 ],446 ],447 "internalType": "struct CrossAccount",447 "internalType": "struct CrossAddress",448 "name": "user",448 "name": "user",449 "type": "tuple"449 "type": "tuple"450 }450 }468 { "internalType": "address", "name": "eth", "type": "address" },468 { "internalType": "address", "name": "eth", "type": "address" },469 { "internalType": "uint256", "name": "sub", "type": "uint256" }469 { "internalType": "uint256", "name": "sub", "type": "uint256" }470 ],470 ],471 "internalType": "struct CrossAccount",471 "internalType": "struct CrossAddress",472 "name": "to",472 "name": "to",473 "type": "tuple"473 "type": "tuple"474 },474 },564 { "internalType": "address", "name": "eth", "type": "address" },564 { "internalType": "address", "name": "eth", "type": "address" },565 { "internalType": "uint256", "name": "sub", "type": "uint256" }565 { "internalType": "uint256", "name": "sub", "type": "uint256" }566 ],566 ],567 "internalType": "struct CrossAccount",567 "internalType": "struct CrossAddress",568 "name": "admin",568 "name": "admin",569 "type": "tuple"569 "type": "tuple"570 }570 }588 { "internalType": "address", "name": "eth", "type": "address" },588 { "internalType": "address", "name": "eth", "type": "address" },589 { "internalType": "uint256", "name": "sub", "type": "uint256" }589 { "internalType": "uint256", "name": "sub", "type": "uint256" }590 ],590 ],591 "internalType": "struct CrossAccount",591 "internalType": "struct CrossAddress",592 "name": "user",592 "name": "user",593 "type": "tuple"593 "type": "tuple"594 }594 }719 { "internalType": "address", "name": "eth", "type": "address" },719 { "internalType": "address", "name": "eth", "type": "address" },720 { "internalType": "uint256", "name": "sub", "type": "uint256" }720 { "internalType": "uint256", "name": "sub", "type": "uint256" }721 ],721 ],722 "internalType": "struct CrossAccount",722 "internalType": "struct CrossAddress",723 "name": "sponsor",723 "name": "sponsor",724 "type": "tuple"724 "type": "tuple"725 }725 }882 { "internalType": "address", "name": "eth", "type": "address" },882 { "internalType": "address", "name": "eth", "type": "address" },883 { "internalType": "uint256", "name": "sub", "type": "uint256" }883 { "internalType": "uint256", "name": "sub", "type": "uint256" }884 ],884 ],885 "internalType": "struct CrossAccount",885 "internalType": "struct CrossAddress",886 "name": "to",886 "name": "to",887 "type": "tuple"887 "type": "tuple"888 },888 },911 { "internalType": "address", "name": "eth", "type": "address" },911 { "internalType": "address", "name": "eth", "type": "address" },912 { "internalType": "uint256", "name": "sub", "type": "uint256" }912 { "internalType": "uint256", "name": "sub", "type": "uint256" }913 ],913 ],914 "internalType": "struct CrossAccount",914 "internalType": "struct CrossAddress",915 "name": "from",915 "name": "from",916 "type": "tuple"916 "type": "tuple"917 },917 },920 { "internalType": "address", "name": "eth", "type": "address" },920 { "internalType": "address", "name": "eth", "type": "address" },921 { "internalType": "uint256", "name": "sub", "type": "uint256" }921 { "internalType": "uint256", "name": "sub", "type": "uint256" }922 ],922 ],923 "internalType": "struct CrossAccount",923 "internalType": "struct CrossAddress",924 "name": "to",924 "name": "to",925 "type": "tuple"925 "type": "tuple"926 },926 },tests/src/eth/abi/reFungibleToken.jsondiffbeforeafterboth76 { "internalType": "address", "name": "eth", "type": "address" },76 { "internalType": "address", "name": "eth", "type": "address" },77 { "internalType": "uint256", "name": "sub", "type": "uint256" }77 { "internalType": "uint256", "name": "sub", "type": "uint256" }78 ],78 ],79 "internalType": "struct CrossAccount",79 "internalType": "struct CrossAddress",80 "name": "spender",80 "name": "spender",81 "type": "tuple"81 "type": "tuple"82 },82 },113 { "internalType": "address", "name": "eth", "type": "address" },113 { "internalType": "address", "name": "eth", "type": "address" },114 { "internalType": "uint256", "name": "sub", "type": "uint256" }114 { "internalType": "uint256", "name": "sub", "type": "uint256" }115 ],115 ],116 "internalType": "struct CrossAccount",116 "internalType": "struct CrossAddress",117 "name": "from",117 "name": "from",118 "type": "tuple"118 "type": "tuple"119 },119 },201 { "internalType": "address", "name": "eth", "type": "address" },201 { "internalType": "address", "name": "eth", "type": "address" },202 { "internalType": "uint256", "name": "sub", "type": "uint256" }202 { "internalType": "uint256", "name": "sub", "type": "uint256" }203 ],203 ],204 "internalType": "struct CrossAccount",204 "internalType": "struct CrossAddress",205 "name": "to",205 "name": "to",206 "type": "tuple"206 "type": "tuple"207 },207 },230 { "internalType": "address", "name": "eth", "type": "address" },230 { "internalType": "address", "name": "eth", "type": "address" },231 { "internalType": "uint256", "name": "sub", "type": "uint256" }231 { "internalType": "uint256", "name": "sub", "type": "uint256" }232 ],232 ],233 "internalType": "struct CrossAccount",233 "internalType": "struct CrossAddress",234 "name": "from",234 "name": "from",235 "type": "tuple"235 "type": "tuple"236 },236 },239 { "internalType": "address", "name": "eth", "type": "address" },239 { "internalType": "address", "name": "eth", "type": "address" },240 { "internalType": "uint256", "name": "sub", "type": "uint256" }240 { "internalType": "uint256", "name": "sub", "type": "uint256" }241 ],241 ],242 "internalType": "struct CrossAccount",242 "internalType": "struct CrossAddress",243 "name": "to",243 "name": "to",244 "type": "tuple"244 "type": "tuple"245 },245 },tests/src/eth/api/ContractHelpers.soldiffbeforeafterboth69 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.69 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.70 /// @dev EVM selector for this function is: 0x766c4f37,70 /// @dev EVM selector for this function is: 0x766c4f37,71 /// or in textual repr: sponsor(address)71 /// or in textual repr: sponsor(address)72 function sponsor(address contractAddress) external view returns (CrossAccount memory);72 function sponsor(address contractAddress) external view returns (CrossAddress memory);737374 /// Check tat contract has confirmed sponsor.74 /// Check tat contract has confirmed sponsor.75 ///75 ///172}172}173173174/// @dev Cross account struct174/// @dev Cross account struct175struct CrossAccount {175struct CrossAddress {176 address eth;176 address eth;177 uint256 sub;177 uint256 sub;178}178}tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth78 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.78 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.79 /// @dev EVM selector for this function is: 0x84a1d5a8,79 /// @dev EVM selector for this function is: 0x84a1d5a8,80 /// or in textual repr: setCollectionSponsorCross((address,uint256))80 /// or in textual repr: setCollectionSponsorCross((address,uint256))81 function setCollectionSponsorCross(CrossAccount memory sponsor) external;81 function setCollectionSponsorCross(CrossAddress memory sponsor) external;828283 /// Whether there is a pending sponsor.83 /// Whether there is a pending sponsor.84 /// @dev EVM selector for this function is: 0x058ac185,84 /// @dev EVM selector for this function is: 0x058ac185,102 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.102 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.103 /// @dev EVM selector for this function is: 0x6ec0a9f1,103 /// @dev EVM selector for this function is: 0x6ec0a9f1,104 /// or in textual repr: collectionSponsor()104 /// or in textual repr: collectionSponsor()105 function collectionSponsor() external view returns (CrossAccount memory);105 function collectionSponsor() external view returns (CrossAddress memory);106106107 /// Get current collection limits.107 /// Get current collection limits.108 ///108 ///127 /// @param newAdmin Cross account administrator address.127 /// @param newAdmin Cross account administrator address.128 /// @dev EVM selector for this function is: 0x859aa7d6,128 /// @dev EVM selector for this function is: 0x859aa7d6,129 /// or in textual repr: addCollectionAdminCross((address,uint256))129 /// or in textual repr: addCollectionAdminCross((address,uint256))130 function addCollectionAdminCross(CrossAccount memory newAdmin) external;130 function addCollectionAdminCross(CrossAddress memory newAdmin) external;131131132 /// Remove collection admin.132 /// Remove collection admin.133 /// @param admin Cross account administrator address.133 /// @param admin Cross account administrator address.134 /// @dev EVM selector for this function is: 0x6c0cd173,134 /// @dev EVM selector for this function is: 0x6c0cd173,135 /// or in textual repr: removeCollectionAdminCross((address,uint256))135 /// or in textual repr: removeCollectionAdminCross((address,uint256))136 function removeCollectionAdminCross(CrossAccount memory admin) external;136 function removeCollectionAdminCross(CrossAddress memory admin) external;137137138 // /// Add collection admin.138 // /// Add collection admin.139 // /// @param newAdmin Address of the added administrator.139 // /// @param newAdmin Address of the added administrator.186 /// @param user User address to check.186 /// @param user User address to check.187 /// @dev EVM selector for this function is: 0x91b6df49,187 /// @dev EVM selector for this function is: 0x91b6df49,188 /// or in textual repr: allowlistedCross((address,uint256))188 /// or in textual repr: allowlistedCross((address,uint256))189 function allowlistedCross(CrossAccount memory user) external view returns (bool);189 function allowlistedCross(CrossAddress memory user) external view returns (bool);190190191 // /// Add the user to the allowed list.191 // /// Add the user to the allowed list.192 // ///192 // ///200 /// @param user User cross account address.200 /// @param user User cross account address.201 /// @dev EVM selector for this function is: 0xa0184a3a,201 /// @dev EVM selector for this function is: 0xa0184a3a,202 /// or in textual repr: addToCollectionAllowListCross((address,uint256))202 /// or in textual repr: addToCollectionAllowListCross((address,uint256))203 function addToCollectionAllowListCross(CrossAccount memory user) external;203 function addToCollectionAllowListCross(CrossAddress memory user) external;204204205 // /// Remove the user from the allowed list.205 // /// Remove the user from the allowed list.206 // ///206 // ///214 /// @param user User cross account address.214 /// @param user User cross account address.215 /// @dev EVM selector for this function is: 0x09ba452a,215 /// @dev EVM selector for this function is: 0x09ba452a,216 /// or in textual repr: removeFromCollectionAllowListCross((address,uint256))216 /// or in textual repr: removeFromCollectionAllowListCross((address,uint256))217 function removeFromCollectionAllowListCross(CrossAccount memory user) external;217 function removeFromCollectionAllowListCross(CrossAddress memory user) external;218218219 /// Switch permission for minting.219 /// Switch permission for minting.220 ///220 ///237 /// @return "true" if account is the owner or admin237 /// @return "true" if account is the owner or admin238 /// @dev EVM selector for this function is: 0x3e75a905,238 /// @dev EVM selector for this function is: 0x3e75a905,239 /// or in textual repr: isOwnerOrAdminCross((address,uint256))239 /// or in textual repr: isOwnerOrAdminCross((address,uint256))240 function isOwnerOrAdminCross(CrossAccount memory user) external view returns (bool);240 function isOwnerOrAdminCross(CrossAddress memory user) external view returns (bool);241241242 /// Returns collection type242 /// Returns collection type243 ///243 ///252 /// If address is canonical then substrate mirror is zero and vice versa.252 /// If address is canonical then substrate mirror is zero and vice versa.253 /// @dev EVM selector for this function is: 0xdf727d3b,253 /// @dev EVM selector for this function is: 0xdf727d3b,254 /// or in textual repr: collectionOwner()254 /// or in textual repr: collectionOwner()255 function collectionOwner() external view returns (CrossAccount memory);255 function collectionOwner() external view returns (CrossAddress memory);256256257 // /// Changes collection owner to another account257 // /// Changes collection owner to another account258 // ///258 // ///268 /// If address is canonical then substrate mirror is zero and vice versa.268 /// If address is canonical then substrate mirror is zero and vice versa.269 /// @dev EVM selector for this function is: 0x5813216b,269 /// @dev EVM selector for this function is: 0x5813216b,270 /// or in textual repr: collectionAdmins()270 /// or in textual repr: collectionAdmins()271 function collectionAdmins() external view returns (CrossAccount[] memory);271 function collectionAdmins() external view returns (CrossAddress[] memory);272272273 /// Changes collection owner to another account273 /// Changes collection owner to another account274 ///274 ///275 /// @dev Owner can be changed only by current owner275 /// @dev Owner can be changed only by current owner276 /// @param newOwner new owner cross account276 /// @param newOwner new owner cross account277 /// @dev EVM selector for this function is: 0x6496c497,277 /// @dev EVM selector for this function is: 0x6496c497,278 /// or in textual repr: changeCollectionOwnerCross((address,uint256))278 /// or in textual repr: changeCollectionOwnerCross((address,uint256))279 function changeCollectionOwnerCross(CrossAccount memory newOwner) external;279 function changeCollectionOwnerCross(CrossAddress memory newOwner) external;280}280}281281282/// @dev Cross account struct282/// @dev Cross account struct283struct CrossAccount {283struct CrossAddress {284 address eth;284 address eth;285 uint256 sub;285 uint256 sub;286}286}354354355 /// @dev EVM selector for this function is: 0x269e6158,355 /// @dev EVM selector for this function is: 0x269e6158,356 /// or in textual repr: mintCross((address,uint256),uint256)356 /// or in textual repr: mintCross((address,uint256),uint256)357 function mintCross(CrossAccount memory to, uint256 amount) external returns (bool);357 function mintCross(CrossAddress memory to, uint256 amount) external returns (bool);358358359 /// @dev EVM selector for this function is: 0x0ecd0ab0,359 /// @dev EVM selector for this function is: 0x0ecd0ab0,360 /// or in textual repr: approveCross((address,uint256),uint256)360 /// or in textual repr: approveCross((address,uint256),uint256)361 function approveCross(CrossAccount memory spender, uint256 amount) external returns (bool);361 function approveCross(CrossAddress memory spender, uint256 amount) external returns (bool);362362363 // /// Burn tokens from account363 // /// Burn tokens from account364 // /// @dev Function that burns an `amount` of the tokens of a given account,364 // /// @dev Function that burns an `amount` of the tokens of a given account,376 /// @param amount The amount that will be burnt.376 /// @param amount The amount that will be burnt.377 /// @dev EVM selector for this function is: 0xbb2f5a58,377 /// @dev EVM selector for this function is: 0xbb2f5a58,378 /// or in textual repr: burnFromCross((address,uint256),uint256)378 /// or in textual repr: burnFromCross((address,uint256),uint256)379 function burnFromCross(CrossAccount memory from, uint256 amount) external returns (bool);379 function burnFromCross(CrossAddress memory from, uint256 amount) external returns (bool);380380381 /// Mint tokens for multiple accounts.381 /// Mint tokens for multiple accounts.382 /// @param amounts array of pairs of account address and amount382 /// @param amounts array of pairs of account address and amount386386387 /// @dev EVM selector for this function is: 0x2ada85ff,387 /// @dev EVM selector for this function is: 0x2ada85ff,388 /// or in textual repr: transferCross((address,uint256),uint256)388 /// or in textual repr: transferCross((address,uint256),uint256)389 function transferCross(CrossAccount memory to, uint256 amount) external returns (bool);389 function transferCross(CrossAddress memory to, uint256 amount) external returns (bool);390390391 /// @dev EVM selector for this function is: 0xd5cf430b,391 /// @dev EVM selector for this function is: 0xd5cf430b,392 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)392 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)393 function transferFromCross(393 function transferFromCross(394 CrossAccount memory from,394 CrossAddress memory from,395 CrossAccount memory to,395 CrossAddress memory to,396 uint256 amount396 uint256 amount397 ) external returns (bool);397 ) external returns (bool);398}398}tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth178 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.178 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.179 /// @dev EVM selector for this function is: 0x84a1d5a8,179 /// @dev EVM selector for this function is: 0x84a1d5a8,180 /// or in textual repr: setCollectionSponsorCross((address,uint256))180 /// or in textual repr: setCollectionSponsorCross((address,uint256))181 function setCollectionSponsorCross(CrossAccount memory sponsor) external;181 function setCollectionSponsorCross(CrossAddress memory sponsor) external;182182183 /// Whether there is a pending sponsor.183 /// Whether there is a pending sponsor.184 /// @dev EVM selector for this function is: 0x058ac185,184 /// @dev EVM selector for this function is: 0x058ac185,202 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.202 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.203 /// @dev EVM selector for this function is: 0x6ec0a9f1,203 /// @dev EVM selector for this function is: 0x6ec0a9f1,204 /// or in textual repr: collectionSponsor()204 /// or in textual repr: collectionSponsor()205 function collectionSponsor() external view returns (CrossAccount memory);205 function collectionSponsor() external view returns (CrossAddress memory);206206207 /// Get current collection limits.207 /// Get current collection limits.208 ///208 ///227 /// @param newAdmin Cross account administrator address.227 /// @param newAdmin Cross account administrator address.228 /// @dev EVM selector for this function is: 0x859aa7d6,228 /// @dev EVM selector for this function is: 0x859aa7d6,229 /// or in textual repr: addCollectionAdminCross((address,uint256))229 /// or in textual repr: addCollectionAdminCross((address,uint256))230 function addCollectionAdminCross(CrossAccount memory newAdmin) external;230 function addCollectionAdminCross(CrossAddress memory newAdmin) external;231231232 /// Remove collection admin.232 /// Remove collection admin.233 /// @param admin Cross account administrator address.233 /// @param admin Cross account administrator address.234 /// @dev EVM selector for this function is: 0x6c0cd173,234 /// @dev EVM selector for this function is: 0x6c0cd173,235 /// or in textual repr: removeCollectionAdminCross((address,uint256))235 /// or in textual repr: removeCollectionAdminCross((address,uint256))236 function removeCollectionAdminCross(CrossAccount memory admin) external;236 function removeCollectionAdminCross(CrossAddress memory admin) external;237237238 // /// Add collection admin.238 // /// Add collection admin.239 // /// @param newAdmin Address of the added administrator.239 // /// @param newAdmin Address of the added administrator.286 /// @param user User address to check.286 /// @param user User address to check.287 /// @dev EVM selector for this function is: 0x91b6df49,287 /// @dev EVM selector for this function is: 0x91b6df49,288 /// or in textual repr: allowlistedCross((address,uint256))288 /// or in textual repr: allowlistedCross((address,uint256))289 function allowlistedCross(CrossAccount memory user) external view returns (bool);289 function allowlistedCross(CrossAddress memory user) external view returns (bool);290290291 // /// Add the user to the allowed list.291 // /// Add the user to the allowed list.292 // ///292 // ///300 /// @param user User cross account address.300 /// @param user User cross account address.301 /// @dev EVM selector for this function is: 0xa0184a3a,301 /// @dev EVM selector for this function is: 0xa0184a3a,302 /// or in textual repr: addToCollectionAllowListCross((address,uint256))302 /// or in textual repr: addToCollectionAllowListCross((address,uint256))303 function addToCollectionAllowListCross(CrossAccount memory user) external;303 function addToCollectionAllowListCross(CrossAddress memory user) external;304304305 // /// Remove the user from the allowed list.305 // /// Remove the user from the allowed list.306 // ///306 // ///314 /// @param user User cross account address.314 /// @param user User cross account address.315 /// @dev EVM selector for this function is: 0x09ba452a,315 /// @dev EVM selector for this function is: 0x09ba452a,316 /// or in textual repr: removeFromCollectionAllowListCross((address,uint256))316 /// or in textual repr: removeFromCollectionAllowListCross((address,uint256))317 function removeFromCollectionAllowListCross(CrossAccount memory user) external;317 function removeFromCollectionAllowListCross(CrossAddress memory user) external;318318319 /// Switch permission for minting.319 /// Switch permission for minting.320 ///320 ///337 /// @return "true" if account is the owner or admin337 /// @return "true" if account is the owner or admin338 /// @dev EVM selector for this function is: 0x3e75a905,338 /// @dev EVM selector for this function is: 0x3e75a905,339 /// or in textual repr: isOwnerOrAdminCross((address,uint256))339 /// or in textual repr: isOwnerOrAdminCross((address,uint256))340 function isOwnerOrAdminCross(CrossAccount memory user) external view returns (bool);340 function isOwnerOrAdminCross(CrossAddress memory user) external view returns (bool);341341342 /// Returns collection type342 /// Returns collection type343 ///343 ///352 /// If address is canonical then substrate mirror is zero and vice versa.352 /// If address is canonical then substrate mirror is zero and vice versa.353 /// @dev EVM selector for this function is: 0xdf727d3b,353 /// @dev EVM selector for this function is: 0xdf727d3b,354 /// or in textual repr: collectionOwner()354 /// or in textual repr: collectionOwner()355 function collectionOwner() external view returns (CrossAccount memory);355 function collectionOwner() external view returns (CrossAddress memory);356356357 // /// Changes collection owner to another account357 // /// Changes collection owner to another account358 // ///358 // ///368 /// If address is canonical then substrate mirror is zero and vice versa.368 /// If address is canonical then substrate mirror is zero and vice versa.369 /// @dev EVM selector for this function is: 0x5813216b,369 /// @dev EVM selector for this function is: 0x5813216b,370 /// or in textual repr: collectionAdmins()370 /// or in textual repr: collectionAdmins()371 function collectionAdmins() external view returns (CrossAccount[] memory);371 function collectionAdmins() external view returns (CrossAddress[] memory);372372373 /// Changes collection owner to another account373 /// Changes collection owner to another account374 ///374 ///375 /// @dev Owner can be changed only by current owner375 /// @dev Owner can be changed only by current owner376 /// @param newOwner new owner cross account376 /// @param newOwner new owner cross account377 /// @dev EVM selector for this function is: 0x6496c497,377 /// @dev EVM selector for this function is: 0x6496c497,378 /// or in textual repr: changeCollectionOwnerCross((address,uint256))378 /// or in textual repr: changeCollectionOwnerCross((address,uint256))379 function changeCollectionOwnerCross(CrossAccount memory newOwner) external;379 function changeCollectionOwnerCross(CrossAddress memory newOwner) external;380}380}381381382/// @dev Cross account struct382/// @dev Cross account struct383struct CrossAccount {383struct CrossAddress {384 address eth;384 address eth;385 uint256 sub;385 uint256 sub;386}386}556 /// @param tokenId Id for the token.556 /// @param tokenId Id for the token.557 /// @dev EVM selector for this function is: 0x2b29dace,557 /// @dev EVM selector for this function is: 0x2b29dace,558 /// or in textual repr: crossOwnerOf(uint256)558 /// or in textual repr: crossOwnerOf(uint256)559 function crossOwnerOf(uint256 tokenId) external view returns (CrossAccount memory);559 function crossOwnerOf(uint256 tokenId) external view returns (CrossAddress memory);560560561 /// Returns the token properties.561 /// Returns the token properties.562 ///562 ///575 /// @param tokenId The NFT to approve575 /// @param tokenId The NFT to approve576 /// @dev EVM selector for this function is: 0x0ecd0ab0,576 /// @dev EVM selector for this function is: 0x0ecd0ab0,577 /// or in textual repr: approveCross((address,uint256),uint256)577 /// or in textual repr: approveCross((address,uint256),uint256)578 function approveCross(CrossAccount memory approved, uint256 tokenId) external;578 function approveCross(CrossAddress memory approved, uint256 tokenId) external;579579580 /// @notice Transfer ownership of an NFT580 /// @notice Transfer ownership of an NFT581 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`581 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`593 /// @param tokenId The NFT to transfer593 /// @param tokenId The NFT to transfer594 /// @dev EVM selector for this function is: 0x2ada85ff,594 /// @dev EVM selector for this function is: 0x2ada85ff,595 /// or in textual repr: transferCross((address,uint256),uint256)595 /// or in textual repr: transferCross((address,uint256),uint256)596 function transferCross(CrossAccount memory to, uint256 tokenId) external;596 function transferCross(CrossAddress memory to, uint256 tokenId) external;597597598 /// @notice Transfer ownership of an NFT from cross account address to cross account address598 /// @notice Transfer ownership of an NFT from cross account address to cross account address599 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`599 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`604 /// @dev EVM selector for this function is: 0xd5cf430b,604 /// @dev EVM selector for this function is: 0xd5cf430b,605 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)605 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)606 function transferFromCross(606 function transferFromCross(607 CrossAccount memory from,607 CrossAddress memory from,608 CrossAccount memory to,608 CrossAddress memory to,609 uint256 tokenId609 uint256 tokenId610 ) external;610 ) external;611611627 /// @param tokenId The NFT to transfer627 /// @param tokenId The NFT to transfer628 /// @dev EVM selector for this function is: 0xbb2f5a58,628 /// @dev EVM selector for this function is: 0xbb2f5a58,629 /// or in textual repr: burnFromCross((address,uint256),uint256)629 /// or in textual repr: burnFromCross((address,uint256),uint256)630 function burnFromCross(CrossAccount memory from, uint256 tokenId) external;630 function burnFromCross(CrossAddress memory from, uint256 tokenId) external;631631632 /// @notice Returns next free NFT ID.632 /// @notice Returns next free NFT ID.633 /// @dev EVM selector for this function is: 0x75794a3c,633 /// @dev EVM selector for this function is: 0x75794a3c,658 /// @return uint256 The id of the newly minted token658 /// @return uint256 The id of the newly minted token659 /// @dev EVM selector for this function is: 0xb904db03,659 /// @dev EVM selector for this function is: 0xb904db03,660 /// or in textual repr: mintCross((address,uint256),(string,bytes)[])660 /// or in textual repr: mintCross((address,uint256),(string,bytes)[])661 function mintCross(CrossAccount memory to, Property[] memory properties) external returns (uint256);661 function mintCross(CrossAddress memory to, Property[] memory properties) external returns (uint256);662}662}663663664/// @dev anonymous struct664/// @dev anonymous structtests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth178 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.178 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.179 /// @dev EVM selector for this function is: 0x84a1d5a8,179 /// @dev EVM selector for this function is: 0x84a1d5a8,180 /// or in textual repr: setCollectionSponsorCross((address,uint256))180 /// or in textual repr: setCollectionSponsorCross((address,uint256))181 function setCollectionSponsorCross(CrossAccount memory sponsor) external;181 function setCollectionSponsorCross(CrossAddress memory sponsor) external;182182183 /// Whether there is a pending sponsor.183 /// Whether there is a pending sponsor.184 /// @dev EVM selector for this function is: 0x058ac185,184 /// @dev EVM selector for this function is: 0x058ac185,202 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.202 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.203 /// @dev EVM selector for this function is: 0x6ec0a9f1,203 /// @dev EVM selector for this function is: 0x6ec0a9f1,204 /// or in textual repr: collectionSponsor()204 /// or in textual repr: collectionSponsor()205 function collectionSponsor() external view returns (CrossAccount memory);205 function collectionSponsor() external view returns (CrossAddress memory);206206207 /// Get current collection limits.207 /// Get current collection limits.208 ///208 ///227 /// @param newAdmin Cross account administrator address.227 /// @param newAdmin Cross account administrator address.228 /// @dev EVM selector for this function is: 0x859aa7d6,228 /// @dev EVM selector for this function is: 0x859aa7d6,229 /// or in textual repr: addCollectionAdminCross((address,uint256))229 /// or in textual repr: addCollectionAdminCross((address,uint256))230 function addCollectionAdminCross(CrossAccount memory newAdmin) external;230 function addCollectionAdminCross(CrossAddress memory newAdmin) external;231231232 /// Remove collection admin.232 /// Remove collection admin.233 /// @param admin Cross account administrator address.233 /// @param admin Cross account administrator address.234 /// @dev EVM selector for this function is: 0x6c0cd173,234 /// @dev EVM selector for this function is: 0x6c0cd173,235 /// or in textual repr: removeCollectionAdminCross((address,uint256))235 /// or in textual repr: removeCollectionAdminCross((address,uint256))236 function removeCollectionAdminCross(CrossAccount memory admin) external;236 function removeCollectionAdminCross(CrossAddress memory admin) external;237237238 // /// Add collection admin.238 // /// Add collection admin.239 // /// @param newAdmin Address of the added administrator.239 // /// @param newAdmin Address of the added administrator.286 /// @param user User address to check.286 /// @param user User address to check.287 /// @dev EVM selector for this function is: 0x91b6df49,287 /// @dev EVM selector for this function is: 0x91b6df49,288 /// or in textual repr: allowlistedCross((address,uint256))288 /// or in textual repr: allowlistedCross((address,uint256))289 function allowlistedCross(CrossAccount memory user) external view returns (bool);289 function allowlistedCross(CrossAddress memory user) external view returns (bool);290290291 // /// Add the user to the allowed list.291 // /// Add the user to the allowed list.292 // ///292 // ///300 /// @param user User cross account address.300 /// @param user User cross account address.301 /// @dev EVM selector for this function is: 0xa0184a3a,301 /// @dev EVM selector for this function is: 0xa0184a3a,302 /// or in textual repr: addToCollectionAllowListCross((address,uint256))302 /// or in textual repr: addToCollectionAllowListCross((address,uint256))303 function addToCollectionAllowListCross(CrossAccount memory user) external;303 function addToCollectionAllowListCross(CrossAddress memory user) external;304304305 // /// Remove the user from the allowed list.305 // /// Remove the user from the allowed list.306 // ///306 // ///314 /// @param user User cross account address.314 /// @param user User cross account address.315 /// @dev EVM selector for this function is: 0x09ba452a,315 /// @dev EVM selector for this function is: 0x09ba452a,316 /// or in textual repr: removeFromCollectionAllowListCross((address,uint256))316 /// or in textual repr: removeFromCollectionAllowListCross((address,uint256))317 function removeFromCollectionAllowListCross(CrossAccount memory user) external;317 function removeFromCollectionAllowListCross(CrossAddress memory user) external;318318319 /// Switch permission for minting.319 /// Switch permission for minting.320 ///320 ///337 /// @return "true" if account is the owner or admin337 /// @return "true" if account is the owner or admin338 /// @dev EVM selector for this function is: 0x3e75a905,338 /// @dev EVM selector for this function is: 0x3e75a905,339 /// or in textual repr: isOwnerOrAdminCross((address,uint256))339 /// or in textual repr: isOwnerOrAdminCross((address,uint256))340 function isOwnerOrAdminCross(CrossAccount memory user) external view returns (bool);340 function isOwnerOrAdminCross(CrossAddress memory user) external view returns (bool);341341342 /// Returns collection type342 /// Returns collection type343 ///343 ///352 /// If address is canonical then substrate mirror is zero and vice versa.352 /// If address is canonical then substrate mirror is zero and vice versa.353 /// @dev EVM selector for this function is: 0xdf727d3b,353 /// @dev EVM selector for this function is: 0xdf727d3b,354 /// or in textual repr: collectionOwner()354 /// or in textual repr: collectionOwner()355 function collectionOwner() external view returns (CrossAccount memory);355 function collectionOwner() external view returns (CrossAddress memory);356356357 // /// Changes collection owner to another account357 // /// Changes collection owner to another account358 // ///358 // ///368 /// If address is canonical then substrate mirror is zero and vice versa.368 /// If address is canonical then substrate mirror is zero and vice versa.369 /// @dev EVM selector for this function is: 0x5813216b,369 /// @dev EVM selector for this function is: 0x5813216b,370 /// or in textual repr: collectionAdmins()370 /// or in textual repr: collectionAdmins()371 function collectionAdmins() external view returns (CrossAccount[] memory);371 function collectionAdmins() external view returns (CrossAddress[] memory);372372373 /// Changes collection owner to another account373 /// Changes collection owner to another account374 ///374 ///375 /// @dev Owner can be changed only by current owner375 /// @dev Owner can be changed only by current owner376 /// @param newOwner new owner cross account376 /// @param newOwner new owner cross account377 /// @dev EVM selector for this function is: 0x6496c497,377 /// @dev EVM selector for this function is: 0x6496c497,378 /// or in textual repr: changeCollectionOwnerCross((address,uint256))378 /// or in textual repr: changeCollectionOwnerCross((address,uint256))379 function changeCollectionOwnerCross(CrossAccount memory newOwner) external;379 function changeCollectionOwnerCross(CrossAddress memory newOwner) external;380}380}381381382/// @dev Cross account struct382/// @dev Cross account struct383struct CrossAccount {383struct CrossAddress {384 address eth;384 address eth;385 uint256 sub;385 uint256 sub;386}386}554 /// @param tokenId Id for the token.554 /// @param tokenId Id for the token.555 /// @dev EVM selector for this function is: 0x2b29dace,555 /// @dev EVM selector for this function is: 0x2b29dace,556 /// or in textual repr: crossOwnerOf(uint256)556 /// or in textual repr: crossOwnerOf(uint256)557 function crossOwnerOf(uint256 tokenId) external view returns (CrossAccount memory);557 function crossOwnerOf(uint256 tokenId) external view returns (CrossAddress memory);558558559 /// Returns the token properties.559 /// Returns the token properties.560 ///560 ///583 /// @param tokenId The RFT to transfer583 /// @param tokenId The RFT to transfer584 /// @dev EVM selector for this function is: 0x2ada85ff,584 /// @dev EVM selector for this function is: 0x2ada85ff,585 /// or in textual repr: transferCross((address,uint256),uint256)585 /// or in textual repr: transferCross((address,uint256),uint256)586 function transferCross(CrossAccount memory to, uint256 tokenId) external;586 function transferCross(CrossAddress memory to, uint256 tokenId) external;587587588 /// @notice Transfer ownership of an RFT588 /// @notice Transfer ownership of an RFT589 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`589 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`594 /// @dev EVM selector for this function is: 0xd5cf430b,594 /// @dev EVM selector for this function is: 0xd5cf430b,595 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)595 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)596 function transferFromCross(596 function transferFromCross(597 CrossAccount memory from,597 CrossAddress memory from,598 CrossAccount memory to,598 CrossAddress memory to,599 uint256 tokenId599 uint256 tokenId600 ) external;600 ) external;601601619 /// @param tokenId The RFT to transfer619 /// @param tokenId The RFT to transfer620 /// @dev EVM selector for this function is: 0xbb2f5a58,620 /// @dev EVM selector for this function is: 0xbb2f5a58,621 /// or in textual repr: burnFromCross((address,uint256),uint256)621 /// or in textual repr: burnFromCross((address,uint256),uint256)622 function burnFromCross(CrossAccount memory from, uint256 tokenId) external;622 function burnFromCross(CrossAddress memory from, uint256 tokenId) external;623623624 /// @notice Returns next free RFT ID.624 /// @notice Returns next free RFT ID.625 /// @dev EVM selector for this function is: 0x75794a3c,625 /// @dev EVM selector for this function is: 0x75794a3c,650 /// @return uint256 The id of the newly minted token650 /// @return uint256 The id of the newly minted token651 /// @dev EVM selector for this function is: 0xb904db03,651 /// @dev EVM selector for this function is: 0xb904db03,652 /// or in textual repr: mintCross((address,uint256),(string,bytes)[])652 /// or in textual repr: mintCross((address,uint256),(string,bytes)[])653 function mintCross(CrossAccount memory to, Property[] memory properties) external returns (uint256);653 function mintCross(CrossAddress memory to, Property[] memory properties) external returns (uint256);654654655 /// Returns EVM address for refungible token655 /// Returns EVM address for refungible token656 ///656 ///tests/src/eth/api/UniqueRefungibleToken.soldiffbeforeafterboth39 /// @param amount The amount that will be burnt.39 /// @param amount The amount that will be burnt.40 /// @dev EVM selector for this function is: 0xbb2f5a58,40 /// @dev EVM selector for this function is: 0xbb2f5a58,41 /// or in textual repr: burnFromCross((address,uint256),uint256)41 /// or in textual repr: burnFromCross((address,uint256),uint256)42 function burnFromCross(CrossAccount memory from, uint256 amount) external returns (bool);42 function burnFromCross(CrossAddress memory from, uint256 amount) external returns (bool);434344 /// @dev Approve the passed address to spend the specified amount of tokens on behalf of `msg.sender`.44 /// @dev Approve the passed address to spend the specified amount of tokens on behalf of `msg.sender`.45 /// Beware that changing an allowance with this method brings the risk that someone may use both the old45 /// Beware that changing an allowance with this method brings the risk that someone may use both the old50 /// @param amount The amount of tokens to be spent.50 /// @param amount The amount of tokens to be spent.51 /// @dev EVM selector for this function is: 0x0ecd0ab0,51 /// @dev EVM selector for this function is: 0x0ecd0ab0,52 /// or in textual repr: approveCross((address,uint256),uint256)52 /// or in textual repr: approveCross((address,uint256),uint256)53 function approveCross(CrossAccount memory spender, uint256 amount) external returns (bool);53 function approveCross(CrossAddress memory spender, uint256 amount) external returns (bool);545455 /// @dev Function that changes total amount of the tokens.55 /// @dev Function that changes total amount of the tokens.56 /// Throws if `msg.sender` doesn't owns all of the tokens.56 /// Throws if `msg.sender` doesn't owns all of the tokens.64 /// @param amount The amount to be transferred.64 /// @param amount The amount to be transferred.65 /// @dev EVM selector for this function is: 0x2ada85ff,65 /// @dev EVM selector for this function is: 0x2ada85ff,66 /// or in textual repr: transferCross((address,uint256),uint256)66 /// or in textual repr: transferCross((address,uint256),uint256)67 function transferCross(CrossAccount memory to, uint256 amount) external returns (bool);67 function transferCross(CrossAddress memory to, uint256 amount) external returns (bool);686869 /// @dev Transfer tokens from one address to another69 /// @dev Transfer tokens from one address to another70 /// @param from The address which you want to send tokens from70 /// @param from The address which you want to send tokens from73 /// @dev EVM selector for this function is: 0xd5cf430b,73 /// @dev EVM selector for this function is: 0xd5cf430b,74 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)74 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)75 function transferFromCross(75 function transferFromCross(76 CrossAccount memory from,76 CrossAddress memory from,77 CrossAccount memory to,77 CrossAddress memory to,78 uint256 amount78 uint256 amount79 ) external returns (bool);79 ) external returns (bool);80}80}818182/// @dev Cross account struct82/// @dev Cross account struct83struct CrossAccount {83struct CrossAddress {84 address eth;84 address eth;85 uint256 sub;85 uint256 sub;86}86}tests/src/eth/fractionalizer/Fractionalizer.soldiffbeforeafterboth3import {CollectionHelpers} from "../api/CollectionHelpers.sol";3import {CollectionHelpers} from "../api/CollectionHelpers.sol";4import {ContractHelpers} from "../api/ContractHelpers.sol";4import {ContractHelpers} from "../api/ContractHelpers.sol";5import {UniqueRefungibleToken} from "../api/UniqueRefungibleToken.sol";5import {UniqueRefungibleToken} from "../api/UniqueRefungibleToken.sol";6import {UniqueRefungible, CrossAccount} from "../api/UniqueRefungible.sol";6import {UniqueRefungible, CrossAddress} from "../api/UniqueRefungible.sol";7import {UniqueNFT} from "../api/UniqueNFT.sol";7import {UniqueNFT} from "../api/UniqueNFT.sol";889/// @dev Fractionalization contract. It stores mappings between NFT and RFT tokens,9/// @dev Fractionalization contract. It stores mappings between NFT and RFT tokens,63 "Wrong collection type. Collection is not refungible."63 "Wrong collection type. Collection is not refungible."64 );64 );65 require(65 require(66 refungibleContract.isOwnerOrAdminCross(CrossAccount({eth: address(this), sub: uint256(0)})),66 refungibleContract.isOwnerOrAdminCross(CrossAddress({eth: address(this), sub: uint256(0)})),67 "Fractionalizer contract should be an admin of the collection"67 "Fractionalizer contract should be an admin of the collection"68 );68 );69 rftCollection = _collection;69 rftCollection = _collection;tests/src/eth/util/playgrounds/types.tsdiffbeforeafterboth19 value: bigint,19 value: bigint,20}20}212122export interface TEthCrossAccount {22export interface CrossAddress {23 readonly eth: string,23 readonly eth: string,24 readonly sub: string | Uint8Array,24 readonly sub: string | Uint8Array,25}25}tests/src/eth/util/playgrounds/unique.dev.tsdiffbeforeafterboth181819import {DevUniqueHelper} from '../../../util/playgrounds/unique.dev';19import {DevUniqueHelper} from '../../../util/playgrounds/unique.dev';202021import {ContractImports, CompiledContract, TEthCrossAccount, NormalizedEvent, EthProperty} from './types';21import {ContractImports, CompiledContract, CrossAddress, NormalizedEvent, EthProperty} from './types';222223// Native contracts ABI23// Native contracts ABI24import collectionHelpersAbi from '../../abi/collectionHelpers.json';24import collectionHelpersAbi from '../../abi/collectionHelpers.json';388export type EthUniqueHelperConstructor = new (...args: any[]) => EthUniqueHelper;388export type EthUniqueHelperConstructor = new (...args: any[]) => EthUniqueHelper;389389390export class EthCrossAccountGroup extends EthGroupBase {390export class EthCrossAccountGroup extends EthGroupBase {391 createAccount(): TEthCrossAccount {391 createAccount(): CrossAddress {392 return this.fromAddress(this.helper.eth.createAccount());392 return this.fromAddress(this.helper.eth.createAccount());393 }393 }394394395 async createAccountWithBalance(donor: IKeyringPair, amount=100n) {395 async createAccountWithBalance(donor: IKeyringPair, amount=100n) {396 return this.fromAddress(await this.helper.eth.createAccountWithBalance(donor, amount));396 return this.fromAddress(await this.helper.eth.createAccountWithBalance(donor, amount));397 }397 }398398399 fromAddress(address: TEthereumAccount): TEthCrossAccount {399 fromAddress(address: TEthereumAccount): CrossAddress {400 return {400 return {401 eth: address,401 eth: address,402 sub: '0',402 sub: '0',403 };403 };404 }404 }405405406 fromKeyringPair(keyring: IKeyringPair): TEthCrossAccount {406 fromKeyringPair(keyring: IKeyringPair): CrossAddress {407 return {407 return {408 eth: '0x0000000000000000000000000000000000000000',408 eth: '0x0000000000000000000000000000000000000000',409 sub: keyring.addressRaw,409 sub: keyring.addressRaw,