difftreelog
misk: Change OptionCrossAddress to Option<CrossAddress>
in: master
6 files changed
pallets/common/src/eth.rsdiffbeforeafterboth66 T::CrossAccountId::from_sub(account_id)66 T::CrossAccountId::from_sub(account_id)67}67}6869/// Ethereum representation of Optional value with CrossAddress.70#[derive(Debug, Default, AbiCoder)]71pub struct OptionCrossAddress {72 /// Whether or not this CrossAdress is valid and has meaning.73 pub status: bool,74 /// The underlying CrossAddress value. If the status is false, can be set to whatever.75 pub value: CrossAddress,76}776878/// Cross account struct69/// Cross account struct79#[derive(Debug, Default, AbiCoder)]70#[derive(Debug, Default, AbiCoder)]pallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth175 ///175 ///176 /// @param contractAddress The contract for which a sponsor is requested.176 /// @param contractAddress The contract for which a sponsor is requested.177 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.177 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.178 fn sponsor(&self, contract_address: address) -> Result<eth::OptionCrossAddress> {178 fn sponsor(&self, contract_address: address) -> Result<Option<eth::CrossAddress>> {179 Ok(match Pallet::<T>::get_sponsor(contract_address) {179 Ok(match Pallet::<T>::get_sponsor(contract_address) {180 Some(ref value) => eth::OptionCrossAddress {180 Some(ref value) => Some(eth::CrossAddress::from_sub_cross_account::<T>(value)),181 status: true,182 value: eth::CrossAddress::from_sub_cross_account::<T>(value),183 },184 None => eth::OptionCrossAddress {181 None => None,185 status: false,186 value: Default::default(),187 },188 })182 })189 }183 }190184pallets/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 (OptionCrossAddress memory) {99 function sponsor(address contractAddress) public view returns (Option_CrossAddress memory) {100 require(false, stub_error);100 require(false, stub_error);101 contractAddress;101 contractAddress;102 dummy;102 dummy;103 return OptionCrossAddress(false, CrossAddress(0x0000000000000000000000000000000000000000, 0));103 return Option_CrossAddress(false, CrossAddress(0x0000000000000000000000000000000000000000, 0));104 }104 }105105106 /// Check tat contract has confirmed sponsor.106 /// Check tat contract has confirmed sponsor.281 uint256 sub;281 uint256 sub;282}282}283283284/// Ethereum representation of Optional value with CrossAddress.284/// Optional value285struct OptionCrossAddress {285struct Option_CrossAddress {286 /// Whether or not this CrossAdress is valid and has meaning.286 /// Shows the status of accessibility of value287 bool status;287 bool status;288 /// The underlying CrossAddress value. If the status is false, can be set to whatever.288 /// Actual value if `status` is true289 CrossAddress value;289 CrossAddress value;290}290}291291tests/src/eth/abi/contractHelpers.jsondiffbeforeafterboth238 "type": "tuple"238 "type": "tuple"239 }239 }240 ],240 ],241 "internalType": "struct OptionCrossAddress",241 "internalType": "struct Option_CrossAddress",242 "name": "",242 "name": "",243 "type": "tuple"243 "type": "tuple"244 }244 }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 (OptionCrossAddress memory);72 function sponsor(address contractAddress) external view returns (Option_CrossAddress memory);737374 /// Check tat contract has confirmed sponsor.74 /// Check tat contract has confirmed sponsor.75 ///75 ///181 Generous181 Generous182}182}183183184/// Ethereum representation of Optional value with CrossAddress.184/// Optional value185struct OptionCrossAddress {185struct Option_CrossAddress {186 /// Whether or not this CrossAdress is valid and has meaning.186 /// Shows the status of accessibility of value187 bool status;187 bool status;188 /// The underlying CrossAddress value. If the status is false, can be set to whatever.188 /// Actual value if `status` is true189 CrossAddress value;189 CrossAddress value;190}190}191191