Class: EthereumContractABI::ContractInterface::EIP::ERC721EnumerableInterface
- Inherits:
-
Object
- Object
- EthereumContractABI::ContractInterface::EIP::ERC721EnumerableInterface
- Defined in:
- lib/ethereum-contract-abi/contract/eip/erc721_enumerable_interface.rb
Class Method Summary collapse
- .functions ⇒ Object
- .is_implemented_by?(contract) ⇒ Boolean
- .tokenByIndex ⇒ Object
- .tokenOfOwnerByIndex ⇒ Object
- .totalSupply ⇒ Object
Class Method Details
.functions ⇒ Object
40 41 42 |
# File 'lib/ethereum-contract-abi/contract/eip/erc721_enumerable_interface.rb', line 40 def self.functions [self.totalSupply, self.tokenByIndex, self.tokenOfOwnerByIndex] end |
.is_implemented_by?(contract) ⇒ Boolean
13 14 15 16 17 |
# File 'lib/ethereum-contract-abi/contract/eip/erc721_enumerable_interface.rb', line 13 def self.is_implemented_by?(contract) contract.has_function?(self.totalSupply) && contract.has_function?(self.tokenByIndex) && contract.has_function?(self.tokenOfOwnerByIndex) end |
.tokenByIndex ⇒ Object
26 27 28 29 30 31 |
# File 'lib/ethereum-contract-abi/contract/eip/erc721_enumerable_interface.rb', line 26 def self.tokenByIndex function_name = 'tokenByIndex' inputs = [Input.new('_index', AbiTypes::Uint.new)] outputs = [Output.new(AbiTypes::Uint.new)] Function.new(function_name, inputs, outputs) end |
.tokenOfOwnerByIndex ⇒ Object
33 34 35 36 37 38 |
# File 'lib/ethereum-contract-abi/contract/eip/erc721_enumerable_interface.rb', line 33 def self.tokenOfOwnerByIndex function_name = 'tokenOfOwnerByIndex' inputs = [Input.new('_owner', AbiTypes::Address.new), Input.new('_index', AbiTypes::Uint.new)] outputs = [Output.new(AbiTypes::Uint.new)] Function.new(function_name, inputs, outputs) end |