difftreelog
misc: Use PascalCase in OptionGeneric name
in: master
17 files changed
crates/evm-coder/src/solidity/impls.rsdiffbeforeafterboth141141142impl<T: SolidityTypeName> super::SolidityStructTy for Option<T> {142impl<T: SolidityTypeName> super::SolidityStructTy for Option<T> {143 fn generate_solidity_interface(tc: &TypeCollector) -> String {143 fn generate_solidity_interface(tc: &TypeCollector) -> String {144 const option_name: &str = "Option";145 const option_name_len: usize = option_name.len();146147 let to_upper_case_generic_type_name = |s: &mut String| {148 let c = s149 .chars()150 .skip(option_name_len)151 .next()152 .expect("Ethereum name must be presented");153 if c.is_ascii_uppercase() {154 return;155 }156 let uc = String::from(c.to_ascii_uppercase());157 s.replace_range(option_name_len..option_name_len + 1, uc.as_str());158 };159144 let mut solidity_name = "Option_".to_string();160 let mut solidity_name = option_name.to_string();145 T::solidity_name(&mut solidity_name, tc);161 T::solidity_name(&mut solidity_name, tc);146 let solidity_name_str = solidity_name.as_str();162 to_upper_case_generic_type_name(&mut solidity_name);163147 let interface = super::SolidityStruct {164 let interface = super::SolidityStruct {148 docs: &[" Optional value"],165 docs: &[" Optional value"],149 name: solidity_name_str,166 name: solidity_name.as_str(),150 fields: (167 fields: (151 super::SolidityStructField::<bool> {168 super::SolidityStructField::<bool> {152 docs: &[" Shows the status of accessibility of value"],169 docs: &[" Shows the status of accessibility of value"],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 (Option_CrossAddress memory) {99 function sponsor(address contractAddress) public view returns (OptionCrossAddress memory) {100 require(false, stub_error);100 require(false, stub_error);101 contractAddress;101 contractAddress;102 dummy;102 dummy;103 return Option_CrossAddress(false, CrossAddress(0x0000000000000000000000000000000000000000, 0));103 return OptionCrossAddress(false, CrossAddress(0x0000000000000000000000000000000000000000, 0));104 }104 }105105106 /// Check tat contract has confirmed sponsor.106 /// Check tat contract has confirmed sponsor.282}282}283283284/// Optional value284/// Optional value285struct Option_CrossAddress {285struct OptionCrossAddress {286 /// Shows the status of accessibility of value286 /// Shows the status of accessibility of value287 bool status;287 bool status;288 /// Actual value if `status` is true288 /// Actual value if `status` is truepallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth466/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.466/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.467struct CollectionLimit {467struct CollectionLimit {468 CollectionLimitField field;468 CollectionLimitField field;469 Option_uint256 value;469 OptionUint256 value;470}470}471471472/// Optional value472/// Optional value473struct Option_uint256 {473struct OptionUint256 {474 /// Shows the status of accessibility of value474 /// Shows the status of accessibility of value475 bool status;475 bool status;476 /// Actual value if `status` is true476 /// Actual value if `status` is truepallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterbothbinary blob — no preview
pallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth608/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.608/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.609struct CollectionLimit {609struct CollectionLimit {610 CollectionLimitField field;610 CollectionLimitField field;611 Option_uint256 value;611 OptionUint256 value;612}612}613613614/// Optional value614/// Optional value615struct Option_uint256 {615struct OptionUint256 {616 /// Shows the status of accessibility of value616 /// Shows the status of accessibility of value617 bool status;617 bool status;618 /// Actual value if `status` is true618 /// Actual value if `status` is truepallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth608/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.608/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.609struct CollectionLimit {609struct CollectionLimit {610 CollectionLimitField field;610 CollectionLimitField field;611 Option_uint256 value;611 OptionUint256 value;612}612}613613614/// Optional value614/// Optional value615struct Option_uint256 {615struct OptionUint256 {616 /// Shows the status of accessibility of value616 /// Shows the status of accessibility of value617 bool status;617 bool status;618 /// Actual value if `status` is true618 /// Actual value if `status` is truetests/src/eth/abi/contractHelpers.jsondiffbeforeafterboth238 "type": "tuple"238 "type": "tuple"239 }239 }240 ],240 ],241 "internalType": "struct Option_CrossAddress",241 "internalType": "struct OptionCrossAddress",242 "name": "",242 "name": "",243 "type": "tuple"243 "type": "tuple"244 }244 }tests/src/eth/abi/fungible.jsondiffbeforeafterboth222 { "internalType": "bool", "name": "status", "type": "bool" },222 { "internalType": "bool", "name": "status", "type": "bool" },223 { "internalType": "uint256", "name": "value", "type": "uint256" }223 { "internalType": "uint256", "name": "value", "type": "uint256" }224 ],224 ],225 "internalType": "struct Option_uint256",225 "internalType": "struct OptionUint256",226 "name": "value",226 "name": "value",227 "type": "tuple"227 "type": "tuple"228 }228 }508 { "internalType": "bool", "name": "status", "type": "bool" },508 { "internalType": "bool", "name": "status", "type": "bool" },509 { "internalType": "uint256", "name": "value", "type": "uint256" }509 { "internalType": "uint256", "name": "value", "type": "uint256" }510 ],510 ],511 "internalType": "struct Option_uint256",511 "internalType": "struct OptionUint256",512 "name": "value",512 "name": "value",513 "type": "tuple"513 "type": "tuple"514 }514 }tests/src/eth/abi/nonFungible.jsondiffbeforeafterboth252 { "internalType": "bool", "name": "status", "type": "bool" },252 { "internalType": "bool", "name": "status", "type": "bool" },253 { "internalType": "uint256", "name": "value", "type": "uint256" }253 { "internalType": "uint256", "name": "value", "type": "uint256" }254 ],254 ],255 "internalType": "struct Option_uint256",255 "internalType": "struct OptionUint256",256 "name": "value",256 "name": "value",257 "type": "tuple"257 "type": "tuple"258 }258 }670 { "internalType": "bool", "name": "status", "type": "bool" },670 { "internalType": "bool", "name": "status", "type": "bool" },671 { "internalType": "uint256", "name": "value", "type": "uint256" }671 { "internalType": "uint256", "name": "value", "type": "uint256" }672 ],672 ],673 "internalType": "struct Option_uint256",673 "internalType": "struct OptionUint256",674 "name": "value",674 "name": "value",675 "type": "tuple"675 "type": "tuple"676 }676 }tests/src/eth/abi/reFungible.jsondiffbeforeafterboth234 { "internalType": "bool", "name": "status", "type": "bool" },234 { "internalType": "bool", "name": "status", "type": "bool" },235 { "internalType": "uint256", "name": "value", "type": "uint256" }235 { "internalType": "uint256", "name": "value", "type": "uint256" }236 ],236 ],237 "internalType": "struct Option_uint256",237 "internalType": "struct OptionUint256",238 "name": "value",238 "name": "value",239 "type": "tuple"239 "type": "tuple"240 }240 }652 { "internalType": "bool", "name": "status", "type": "bool" },652 { "internalType": "bool", "name": "status", "type": "bool" },653 { "internalType": "uint256", "name": "value", "type": "uint256" }653 { "internalType": "uint256", "name": "value", "type": "uint256" }654 ],654 ],655 "internalType": "struct Option_uint256",655 "internalType": "struct OptionUint256",656 "name": "value",656 "name": "value",657 "type": "tuple"657 "type": "tuple"658 }658 }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 (Option_CrossAddress memory);72 function sponsor(address contractAddress) external view returns (OptionCrossAddress memory);737374 /// Check tat contract has confirmed sponsor.74 /// Check tat contract has confirmed sponsor.75 ///75 ///182}182}183183184/// Optional value184/// Optional value185struct Option_CrossAddress {185struct OptionCrossAddress {186 /// Shows the status of accessibility of value186 /// Shows the status of accessibility of value187 bool status;187 bool status;188 /// Actual value if `status` is true188 /// Actual value if `status` is truetests/src/eth/api/UniqueFungible.soldiffbeforeafterboth308/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.308/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.309struct CollectionLimit {309struct CollectionLimit {310 CollectionLimitField field;310 CollectionLimitField field;311 Option_uint256 value;311 OptionUint256 value;312}312}313313314/// Optional value314/// Optional value315struct Option_uint256 {315struct OptionUint256 {316 /// Shows the status of accessibility of value316 /// Shows the status of accessibility of value317 bool status;317 bool status;318 /// Actual value if `status` is true318 /// Actual value if `status` is truetests/src/eth/api/UniqueNFT.soldiffbeforeafterboth408/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.408/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.409struct CollectionLimit {409struct CollectionLimit {410 CollectionLimitField field;410 CollectionLimitField field;411 Option_uint256 value;411 OptionUint256 value;412}412}413413414/// Optional value414/// Optional value415struct Option_uint256 {415struct OptionUint256 {416 /// Shows the status of accessibility of value416 /// Shows the status of accessibility of value417 bool status;417 bool status;418 /// Actual value if `status` is true418 /// Actual value if `status` is truetests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth408/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.408/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.409struct CollectionLimit {409struct CollectionLimit {410 CollectionLimitField field;410 CollectionLimitField field;411 Option_uint256 value;411 OptionUint256 value;412}412}413413414/// Optional value414/// Optional value415struct Option_uint256 {415struct OptionUint256 {416 /// Shows the status of accessibility of value416 /// Shows the status of accessibility of value417 bool status;417 bool status;418 /// Actual value if `status` is true418 /// Actual value if `status` is true