difftreelog
feat generate solidity documentation
in: master
9 files changed
crates/evm-coder-macros/src/solidity_interface.rsdiffbeforeafterboth6use std::fmt::Write;6use std::fmt::Write;7use syn::{7use syn::{8 Expr, FnArg, GenericArgument, Generics, Ident, ImplItem, ImplItemMethod, ItemImpl, Lit, Meta,8 Expr, FnArg, GenericArgument, Generics, Ident, ImplItem, ImplItemMethod, ItemImpl, Lit, Meta,9 NestedMeta, PatType, Path, PathArguments, ReturnType, Type, spanned::Spanned,9 MetaNameValue, NestedMeta, PatType, Path, PathArguments, ReturnType, Type, spanned::Spanned,10};10};111112use crate::{12use crate::{362 has_normal_args: bool,362 has_normal_args: bool,363 mutability: Mutability,363 mutability: Mutability,364 result: Type,364 result: Type,365 docs: Vec<String>,365}366}366impl Method {367impl Method {367 fn try_from(value: &ImplItemMethod) -> syn::Result<Self> {368 fn try_from(value: &ImplItemMethod) -> syn::Result<Self> {368 let mut info = MethodInfo {369 let mut info = MethodInfo {369 rename_selector: None,370 rename_selector: None,370 };371 };372 let mut docs = Vec::new();371 for attr in &value.attrs {373 for attr in &value.attrs {372 let ident = parse_ident_from_path(&attr.path, false)?;374 let ident = parse_ident_from_path(&attr.path, false)?;373 if ident == "solidity" {375 if ident == "solidity" {374 let args = attr.parse_meta().unwrap();376 let args = attr.parse_meta().unwrap();375 info = MethodInfo::from_meta(&args).unwrap();377 info = MethodInfo::from_meta(&args).unwrap();376 } else if ident == "doc" {378 } else if ident == "doc" {377 // TODO: Add docs to evm interfaces379 let args = attr.parse_meta().unwrap();380 let value = match args {381 Meta::NameValue(MetaNameValue {382 lit: Lit::Str(str), ..383 }) => str.value(),384 _ => unreachable!(),385 };386 docs.push(value);378 }387 }379 }388 }380 let ident = &value.sig.ident;389 let ident = &value.sig.ident;457 has_normal_args,466 has_normal_args,458 mutability,467 mutability,459 result: result.clone(),468 result: result.clone(),469 docs,460 })470 })461 }471 }462 fn expand_call_def(&self) -> proc_macro2::TokenStream {472 fn expand_call_def(&self) -> proc_macro2::TokenStream {570 .iter()580 .iter()571 .filter(|a| !a.is_special())581 .filter(|a| !a.is_special())572 .map(MethodArg::expand_solidity_argument);582 .map(MethodArg::expand_solidity_argument);583 let docs = self.docs.iter();573 let selector = format!("{} {:0>8x}", self.selector_str, self.selector);584 let selector = format!("{} {:0>8x}", self.selector_str, self.selector);574585575 quote! {586 quote! {576 SolidityFunction {587 SolidityFunction {588 docs: &[#(#docs),*],577 selector: #selector,589 selector: #selector,578 name: #camel_name,590 name: #camel_name,579 mutability: #mutability,591 mutability: #mutability,704 use core::fmt::Write;716 use core::fmt::Write;705 let interface = SolidityInterface {717 let interface = SolidityInterface {706 name: #solidity_name,718 name: #solidity_name,719 selector: Self::interface_id(),707 is: &["Dummy", "ERC165", #(720 is: &["Dummy", "ERC165", #(708 #solidity_is,721 #solidity_is,709 )* #(722 )* #(crates/evm-coder-macros/src/to_log.rsdiffbeforeafterboth183 use evm_coder::solidity::*;183 use evm_coder::solidity::*;184 use core::fmt::Write;184 use core::fmt::Write;185 let interface = SolidityInterface {185 let interface = SolidityInterface {186 selector: 0,186 name: #solidity_name,187 name: #solidity_name,187 is: &[],188 is: &[],188 functions: (#(189 functions: (#(crates/evm-coder/src/solidity.rsdiffbeforeafterboth84solidity_type_name! {84solidity_type_name! {85 uint8 => "uint8" true = "0",85 uint8 => "uint8" true = "0",86 uint32 => "uint32" true = "0",86 uint32 => "uint32" true = "0",87 uint64 => "uint64" true = "0",87 uint128 => "uint128" true = "0",88 uint128 => "uint128" true = "0",88 uint256 => "uint256" true = "0",89 uint256 => "uint256" true = "0",89 address => "address" true = "0x0000000000000000000000000000000000000000",90 address => "address" true = "0x0000000000000000000000000000000000000000",376 Mutable,377 Mutable,377}378}378pub struct SolidityFunction<A, R> {379pub struct SolidityFunction<A, R> {380 pub docs: &'static [&'static str],379 pub selector: &'static str,381 pub selector: &'static str,380 pub name: &'static str,382 pub name: &'static str,381 pub args: A,383 pub args: A,389 writer: &mut impl fmt::Write,391 writer: &mut impl fmt::Write,390 tc: &TypeCollector,392 tc: &TypeCollector,391 ) -> fmt::Result {393 ) -> fmt::Result {394 for doc in self.docs {395 writeln!(writer, "\t//{}", doc)?;396 }397 if !self.docs.is_empty() {398 writeln!(writer, "\t//")?;399 }392 writeln!(writer, "\t// Selector: {}", self.selector)?;400 writeln!(writer, "\t// Selector: {}", self.selector)?;393 write!(writer, "\tfunction {}(", self.name)?;401 write!(writer, "\tfunction {}(", self.name)?;394 self.args.solidity_name(writer, tc)?;402 self.args.solidity_name(writer, tc)?;449}457}450458451pub struct SolidityInterface<F: SolidityFunctions> {459pub struct SolidityInterface<F: SolidityFunctions> {460 pub selector: u32,452 pub name: &'static str,461 pub name: &'static str,453 pub is: &'static [&'static str],462 pub is: &'static [&'static str],454 pub functions: F,463 pub functions: F,461 out: &mut impl fmt::Write,470 out: &mut impl fmt::Write,462 tc: &TypeCollector,471 tc: &TypeCollector,463 ) -> fmt::Result {472 ) -> fmt::Result {473 if self.selector != 0 {474 writeln!(out, "// Selector: {:0>8x}", self.selector)?;475 }464 if is_impl {476 if is_impl {465 write!(out, "contract ")?;477 write!(out, "contract ")?;466 } else {478 } else {pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth31 );31 );32}32}333334// Selector: 942e8b2234contract ERC20 is Dummy, ERC165, ERC20Events {35contract ERC20 is Dummy, ERC165, ERC20Events {35 // Selector: name() 06fdde0336 // Selector: name() 06fdde0336 function name() public view returns (string memory) {37 function name() public view returns (string memory) {pallets/nonfungible/src/erc.rsdiffbeforeafterboth61 Ok(string::from_utf8_lossy(&self.token_prefix).into())61 Ok(string::from_utf8_lossy(&self.token_prefix).into())62 }62 }636364 /// Returns token's const_metadata64 #[solidity(rename_selector = "tokenURI")]65 #[solidity(rename_selector = "tokenURI")]65 fn token_uri(&self, token_id: uint256) -> Result<string> {66 fn token_uri(&self, token_id: uint256) -> Result<string> {66 let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;67 let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;79 Ok(index)80 Ok(index)80 }81 }818283 /// Not implemented82 fn token_of_owner_by_index(&self, _owner: address, _index: uint256) -> Result<uint256> {84 fn token_of_owner_by_index(&self, _owner: address, _index: uint256) -> Result<uint256> {83 // TODO: Not implemetable85 // TODO: Not implemetable84 Err("not implemented".into())86 Err("not implemented".into())103 .owner105 .owner104 .as_eth())106 .as_eth())105 }107 }108 /// Not implemented106 fn safe_transfer_from_with_data(109 fn safe_transfer_from_with_data(107 &mut self,110 &mut self,108 _from: address,111 _from: address,114 // TODO: Not implemetable117 // TODO: Not implemetable115 Err("not implemented".into())118 Err("not implemented".into())116 }119 }120 /// Not implemented117 fn safe_transfer_from(121 fn safe_transfer_from(118 &mut self,122 &mut self,119 _from: address,123 _from: address,159 Ok(())163 Ok(())160 }164 }161165166 /// Not implemented162 fn set_approval_for_all(167 fn set_approval_for_all(163 &mut self,168 &mut self,164 _caller: caller,169 _caller: caller,169 Err("not implemented".into())174 Err("not implemented".into())170 }175 }171176177 /// Not implemented172 fn get_approved(&self, _token_id: uint256) -> Result<address> {178 fn get_approved(&self, _token_id: uint256) -> Result<address> {173 // TODO: Not implemetable179 // TODO: Not implemetable174 Err("not implemented".into())180 Err("not implemented".into())175 }181 }176182183 /// Not implemented177 fn is_approved_for_all(&self, _owner: address, _operator: address) -> Result<address> {184 fn is_approved_for_all(&self, _owner: address, _operator: address) -> Result<address> {178 // TODO: Not implemetable185 // TODO: Not implemetable179 Err("not implemented".into())186 Err("not implemented".into())197 Ok(false)204 Ok(false)198 }205 }199206207 /// `token_id` should be obtained with `next_token_id` method,208 /// unlike standard, you can't specify it manually200 fn mint(&mut self, caller: caller, to: address, token_id: uint256) -> Result<bool> {209 fn mint(&mut self, caller: caller, to: address, token_id: uint256) -> Result<bool> {201 let caller = T::CrossAccountId::from_eth(caller);210 let caller = T::CrossAccountId::from_eth(caller);202 let to = T::CrossAccountId::from_eth(to);211 let to = T::CrossAccountId::from_eth(to);223 Ok(true)232 Ok(true)224 }233 }225234235 /// `token_id` should be obtained with `next_token_id` method,236 /// unlike standard, you can't specify it manually226 #[solidity(rename_selector = "mintWithTokenURI")]237 #[solidity(rename_selector = "mintWithTokenURI")]227 fn mint_with_token_uri(238 fn mint_with_token_uri(228 &mut self,239 &mut self,257 Ok(true)268 Ok(true)258 }269 }259270271 /// Not implemented260 fn finish_minting(&mut self, _caller: caller) -> Result<bool> {272 fn finish_minting(&mut self, _caller: caller) -> Result<bool> {261 Err("not implementable".into())273 Err("not implementable".into())262 }274 }pallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth51 event MintingFinished();51 event MintingFinished();52}52}535354contract ERC721 is Dummy, ERC165, ERC721Events {54// Selector: 42966c6855 // Selector: balanceOf(address) 70a0823156 function balanceOf(address owner) public view returns (uint256) {57 require(false, stub_error);58 owner;59 dummy;60 return 0;61 }6263 // Selector: ownerOf(uint256) 6352211e64 function ownerOf(uint256 tokenId) public view returns (address) {65 require(false, stub_error);66 tokenId;67 dummy;68 return 0x0000000000000000000000000000000000000000;69 }7071 // Selector: safeTransferFromWithData(address,address,uint256,bytes) 60a1167272 function safeTransferFromWithData(73 address from,74 address to,75 uint256 tokenId,76 bytes memory data77 ) public {78 require(false, stub_error);79 from;80 to;81 tokenId;82 data;83 dummy = 0;84 }8586 // Selector: safeTransferFrom(address,address,uint256) 42842e0e87 function safeTransferFrom(88 address from,89 address to,90 uint256 tokenId91 ) public {92 require(false, stub_error);93 from;94 to;95 tokenId;96 dummy = 0;97 }9899 // Selector: transferFrom(address,address,uint256) 23b872dd100 function transferFrom(101 address from,102 address to,103 uint256 tokenId104 ) public {105 require(false, stub_error);106 from;107 to;108 tokenId;109 dummy = 0;110 }111112 // Selector: approve(address,uint256) 095ea7b3113 function approve(address approved, uint256 tokenId) public {114 require(false, stub_error);115 approved;116 tokenId;117 dummy = 0;118 }119120 // Selector: setApprovalForAll(address,bool) a22cb465121 function setApprovalForAll(address operator, bool approved) public {122 require(false, stub_error);123 operator;124 approved;125 dummy = 0;126 }127128 // Selector: getApproved(uint256) 081812fc129 function getApproved(uint256 tokenId) public view returns (address) {130 require(false, stub_error);131 tokenId;132 dummy;133 return 0x0000000000000000000000000000000000000000;134 }135136 // Selector: isApprovedForAll(address,address) e985e9c5137 function isApprovedForAll(address owner, address operator)138 public139 view140 returns (address)141 {142 require(false, stub_error);143 owner;144 operator;145 dummy;146 return 0x0000000000000000000000000000000000000000;147 }148}149150contract ERC721Burnable is Dummy, ERC165 {55contract ERC721Burnable is Dummy, ERC165 {151 // Selector: burn(uint256) 42966c6856 // Selector: burn(uint256) 42966c68156 }61 }157}62}1586364// Selector: 58800161159contract ERC721Enumerable is Dummy, ERC165 {65contract ERC721 is Dummy, ERC165, ERC721Events {160 // Selector: tokenByIndex(uint256) 4f6ccce766 // Selector: balanceOf(address) 70a08231161 function tokenByIndex(uint256 index) public view returns (uint256) {67 function balanceOf(address owner) public view returns (uint256) {162 require(false, stub_error);68 require(false, stub_error);163 index;69 owner;164 dummy;70 dummy;165 return 0;71 return 0;166 }72 }7374 // Selector: ownerOf(uint256) 6352211e75 function ownerOf(uint256 tokenId) public view returns (address) {76 require(false, stub_error);77 tokenId;78 dummy;79 return 0x0000000000000000000000000000000000000000;80 }8182 // Not implemented83 //84 // Selector: safeTransferFromWithData(address,address,uint256,bytes) 60a1167285 function safeTransferFromWithData(86 address from,87 address to,88 uint256 tokenId,89 bytes memory data90 ) public {91 require(false, stub_error);92 from;93 to;94 tokenId;95 data;96 dummy = 0;97 }9899 // Not implemented100 //101 // Selector: safeTransferFrom(address,address,uint256) 42842e0e102 function safeTransferFrom(103 address from,104 address to,105 uint256 tokenId106 ) public {107 require(false, stub_error);108 from;109 to;110 tokenId;111 dummy = 0;112 }167113168 // Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59114 // Selector: transferFrom(address,address,uint256) 23b872dd169 function tokenOfOwnerByIndex(address owner, uint256 index)115 function transferFrom(116 address from,117 address to,118 uint256 tokenId119 ) public {120 require(false, stub_error);121 from;122 to;123 tokenId;124 dummy = 0;125 }126127 // Selector: approve(address,uint256) 095ea7b3170 public128 function approve(address approved, uint256 tokenId) public {129 require(false, stub_error);130 approved;131 tokenId;132 dummy = 0;133 }134135 // Not implemented136 //137 // Selector: setApprovalForAll(address,bool) a22cb465138 function setApprovalForAll(address operator, bool approved) public {139 require(false, stub_error);140 operator;141 approved;142 dummy = 0;143 }144145 // Not implemented146 //147 // Selector: getApproved(uint256) 081812fc171 view148 function getApproved(uint256 tokenId) public view returns (address) {172 returns (uint256)173 {174 require(false, stub_error);149 require(false, stub_error);175 owner;150 tokenId;176 index;177 dummy;151 dummy;178 return 0;152 return 0x0000000000000000000000000000000000000000;179 }153 }180154181 // Selector: totalSupply() 18160ddd155 // Not implemented156 //157 // Selector: isApprovedForAll(address,address) e985e9c5182 function totalSupply() public view returns (uint256) {158 function isApprovedForAll(address owner, address operator)159 public160 view161 returns (address)162 {183 require(false, stub_error);163 require(false, stub_error);164 owner;165 operator;184 dummy;166 dummy;185 return 0;167 return 0x0000000000000000000000000000000000000000;186 }168 }187}169}188170171// Selector: 5b5e139f189contract ERC721Metadata is Dummy, ERC165 {172contract ERC721Metadata is Dummy, ERC165 {190 // Selector: name() 06fdde03173 // Selector: name() 06fdde03191 function name() public view returns (string memory) {174 function name() public view returns (string memory) {201 return "";184 return "";202 }185 }203186187 // Returns token's const_metadata188 //204 // Selector: tokenURI(uint256) c87b56dd189 // Selector: tokenURI(uint256) c87b56dd205 function tokenURI(uint256 tokenId) public view returns (string memory) {190 function tokenURI(uint256 tokenId) public view returns (string memory) {206 require(false, stub_error);191 require(false, stub_error);210 }195 }211}196}212197198// Selector: 68ccfe89213contract ERC721Mintable is Dummy, ERC165, ERC721MintableEvents {199contract ERC721Mintable is Dummy, ERC165, ERC721MintableEvents {214 // Selector: mintingFinished() 05d2035b200 // Selector: mintingFinished() 05d2035b215 function mintingFinished() public view returns (bool) {201 function mintingFinished() public view returns (bool) {218 return false;204 return false;219 }205 }220206207 // `token_id` should be obtained with `next_token_id` method,208 // unlike standard, you can't specify it manually209 //221 // Selector: mint(address,uint256) 40c10f19210 // Selector: mint(address,uint256) 40c10f19222 function mint(address to, uint256 tokenId) public returns (bool) {211 function mint(address to, uint256 tokenId) public returns (bool) {223 require(false, stub_error);212 require(false, stub_error);227 return false;216 return false;228 }217 }229218219 // `token_id` should be obtained with `next_token_id` method,220 // unlike standard, you can't specify it manually221 //230 // Selector: mintWithTokenURI(address,uint256,string) 50bb4e7f222 // Selector: mintWithTokenURI(address,uint256,string) 50bb4e7f231 function mintWithTokenURI(223 function mintWithTokenURI(232 address to,224 address to,241 return false;233 return false;242 }234 }243235236 // Not implemented237 //244 // Selector: finishMinting() 7d64bcb4238 // Selector: finishMinting() 7d64bcb4245 function finishMinting() public returns (bool) {239 function finishMinting() public returns (bool) {246 require(false, stub_error);240 require(false, stub_error);249 }243 }250}244}251245246// Selector: 780e9d63247contract ERC721Enumerable is Dummy, ERC165 {248 // Selector: tokenByIndex(uint256) 4f6ccce7249 function tokenByIndex(uint256 index) public view returns (uint256) {250 require(false, stub_error);251 index;252 dummy;253 return 0;254 }255256 // Not implemented257 //258 // Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59259 function tokenOfOwnerByIndex(address owner, uint256 index)260 public261 view262 returns (uint256)263 {264 require(false, stub_error);265 owner;266 index;267 dummy;268 return 0;269 }270271 // Selector: totalSupply() 18160ddd272 function totalSupply() public view returns (uint256) {273 require(false, stub_error);274 dummy;275 return 0;276 }277}278279// Selector: e562194d252contract ERC721UniqueExtensions is Dummy, ERC165 {280contract ERC721UniqueExtensions is Dummy, ERC165 {253 // Selector: transfer(address,uint256) a9059cbb281 // Selector: transfer(address,uint256) a9059cbb254 function transfer(address to, uint256 tokenId) public {282 function transfer(address to, uint256 tokenId) public {tests/src/eth/api/ContractHelpers.soldiffbeforeafterboth12 function supportsInterface(bytes4 interfaceID) external view returns (bool);12 function supportsInterface(bytes4 interfaceID) external view returns (bool);13}13}141415// Selector: 31acb1fe15interface ContractHelpers is Dummy, ERC165 {16interface ContractHelpers is Dummy, ERC165 {16 // Selector: contractOwner(address) 5152b14c17 // Selector: contractOwner(address) 5152b14c17 function contractOwner(address contractAddress)18 function contractOwner(address contractAddress)tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth22 );22 );23}23}242425// Selector: 942e8b2225interface ERC20 is Dummy, ERC165, ERC20Events {26interface ERC20 is Dummy, ERC165, ERC20Events {26 // Selector: name() 06fdde0327 // Selector: name() 06fdde0327 function name() external view returns (string memory);28 function name() external view returns (string memory);tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth42 event MintingFinished();42 event MintingFinished();43}43}444445interface ERC721 is Dummy, ERC165, ERC721Events {45// Selector: 42966c6846 // Selector: balanceOf(address) 70a0823147 function balanceOf(address owner) external view returns (uint256);4849 // Selector: ownerOf(uint256) 6352211e50 function ownerOf(uint256 tokenId) external view returns (address);5152 // Selector: safeTransferFromWithData(address,address,uint256,bytes) 60a1167253 function safeTransferFromWithData(54 address from,55 address to,56 uint256 tokenId,57 bytes memory data58 ) external;5960 // Selector: safeTransferFrom(address,address,uint256) 42842e0e61 function safeTransferFrom(62 address from,63 address to,64 uint256 tokenId65 ) external;6667 // Selector: transferFrom(address,address,uint256) 23b872dd68 function transferFrom(69 address from,70 address to,71 uint256 tokenId72 ) external;7374 // Selector: approve(address,uint256) 095ea7b375 function approve(address approved, uint256 tokenId) external;7677 // Selector: setApprovalForAll(address,bool) a22cb46578 function setApprovalForAll(address operator, bool approved) external;7980 // Selector: getApproved(uint256) 081812fc81 function getApproved(uint256 tokenId) external view returns (address);8283 // Selector: isApprovedForAll(address,address) e985e9c584 function isApprovedForAll(address owner, address operator)85 external86 view87 returns (address);88}8990interface ERC721Burnable is Dummy, ERC165 {46interface ERC721Burnable is Dummy, ERC165 {91 // Selector: burn(uint256) 42966c6847 // Selector: burn(uint256) 42966c6892 function burn(uint256 tokenId) external;48 function burn(uint256 tokenId) external;93}49}945051// Selector: 5880016195interface ERC721Enumerable is Dummy, ERC165 {52interface ERC721 is Dummy, ERC165, ERC721Events {96 // Selector: tokenByIndex(uint256) 4f6ccce753 // Selector: balanceOf(address) 70a0823197 function tokenByIndex(uint256 index) external view returns (uint256);54 function balanceOf(address owner) external view returns (uint256);5556 // Selector: ownerOf(uint256) 6352211e57 function ownerOf(uint256 tokenId) external view returns (address);5859 // Not implemented60 //61 // Selector: safeTransferFromWithData(address,address,uint256,bytes) 60a1167262 function safeTransferFromWithData(63 address from,64 address to,65 uint256 tokenId,66 bytes memory data67 ) external;6869 // Not implemented70 //71 // Selector: safeTransferFrom(address,address,uint256) 42842e0e72 function safeTransferFrom(73 address from,74 address to,75 uint256 tokenId76 ) external;987799 // Selector: tokenOfOwnerByIndex(address,uint256) 2f745c5978 // Selector: transferFrom(address,address,uint256) 23b872dd100 function tokenOfOwnerByIndex(address owner, uint256 index)79 function transferFrom(80 address from,81 address to,82 uint256 tokenId83 ) external;8485 // Selector: approve(address,uint256) 095ea7b3101 external86 function approve(address approved, uint256 tokenId) external;8788 // Not implemented89 //90 // Selector: setApprovalForAll(address,bool) a22cb46591 function setApprovalForAll(address operator, bool approved) external;9293 // Not implemented94 //95 // Selector: getApproved(uint256) 081812fc102 view96 function getApproved(uint256 tokenId) external view returns (address);103 returns (uint256);9710498 // Not implemented105 // Selector: totalSupply() 18160ddd99 //100 // Selector: isApprovedForAll(address,address) e985e9c5106 function totalSupply() external view returns (uint256);101 function isApprovedForAll(address owner, address operator)102 external103 view104 returns (address);107}105}108106107// Selector: 5b5e139f109interface ERC721Metadata is Dummy, ERC165 {108interface ERC721Metadata is Dummy, ERC165 {110 // Selector: name() 06fdde03109 // Selector: name() 06fdde03111 function name() external view returns (string memory);110 function name() external view returns (string memory);112111113 // Selector: symbol() 95d89b41112 // Selector: symbol() 95d89b41114 function symbol() external view returns (string memory);113 function symbol() external view returns (string memory);115114115 // Returns token's const_metadata116 //116 // Selector: tokenURI(uint256) c87b56dd117 // Selector: tokenURI(uint256) c87b56dd117 function tokenURI(uint256 tokenId) external view returns (string memory);118 function tokenURI(uint256 tokenId) external view returns (string memory);118}119}119120121// Selector: 68ccfe89120interface ERC721Mintable is Dummy, ERC165, ERC721MintableEvents {122interface ERC721Mintable is Dummy, ERC165, ERC721MintableEvents {121 // Selector: mintingFinished() 05d2035b123 // Selector: mintingFinished() 05d2035b122 function mintingFinished() external view returns (bool);124 function mintingFinished() external view returns (bool);123125126 // `token_id` should be obtained with `next_token_id` method,127 // unlike standard, you can't specify it manually128 //124 // Selector: mint(address,uint256) 40c10f19129 // Selector: mint(address,uint256) 40c10f19125 function mint(address to, uint256 tokenId) external returns (bool);130 function mint(address to, uint256 tokenId) external returns (bool);126131132 // `token_id` should be obtained with `next_token_id` method,133 // unlike standard, you can't specify it manually134 //127 // Selector: mintWithTokenURI(address,uint256,string) 50bb4e7f135 // Selector: mintWithTokenURI(address,uint256,string) 50bb4e7f128 function mintWithTokenURI(136 function mintWithTokenURI(129 address to,137 address to,130 uint256 tokenId,138 uint256 tokenId,131 string memory tokenUri139 string memory tokenUri132 ) external returns (bool);140 ) external returns (bool);133141142 // Not implemented143 //134 // Selector: finishMinting() 7d64bcb4144 // Selector: finishMinting() 7d64bcb4135 function finishMinting() external returns (bool);145 function finishMinting() external returns (bool);136}146}137147148// Selector: 780e9d63149interface ERC721Enumerable is Dummy, ERC165 {150 // Selector: tokenByIndex(uint256) 4f6ccce7151 function tokenByIndex(uint256 index) external view returns (uint256);152153 // Not implemented154 //155 // Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59156 function tokenOfOwnerByIndex(address owner, uint256 index)157 external158 view159 returns (uint256);160161 // Selector: totalSupply() 18160ddd162 function totalSupply() external view returns (uint256);163}164165// Selector: e562194d138interface ERC721UniqueExtensions is Dummy, ERC165 {166interface ERC721UniqueExtensions is Dummy, ERC165 {139 // Selector: transfer(address,uint256) a9059cbb167 // Selector: transfer(address,uint256) a9059cbb140 function transfer(address to, uint256 tokenId) external;168 function transfer(address to, uint256 tokenId) external;