Open jacobrosenthal opened 6 years ago
Apparently the costs associated with calls like that are a known problem, but this is not a timeout error https://www.reddit.com/r/ethdev/comments/7jpecv/cryptokitties_tokensofowner_doesnt_return_anything/
Im not sure where if anywhere that function is defined in a public contract and it DOES look like a function not defined error. The function I can find in KittyCore is tokensOfOwner(address), so maybe there is a generator error of some kind here?
If I regen the combined abi with the etherscan copy of KittyCore.sol indeed that function dissapears from help
bash-3.2$ node cryptokitties-cli.js --help
Usage: cryptokitties-cli.js <command> [options]
Commands:
cryptokitties-cli.js approve <to> <tokenId> Grant another address the right to transfer a specific Kitty via
transferFrom(). This is the preferred flow for transfering NFTs to
contracts.
cryptokitties-cli.js approveSiring <addr> <sireId> Grants approval to another user to sire with one of your Kitties.
cryptokitties-cli.js balanceOf <owner> Returns the number of Kitties owned by a specific address.
cryptokitties-cli.js breedWithAuto <matronId> <sireId> Breed a Kitty you own (as matron) with a sire that you own, or for which
you have previously been given Siring approval. Will either make your
cat pregnant, or will fail entirely. Requires a pre-payment of the fee
given out to the first caller of giveBirth()
cryptokitties-cli.js canBreedWith <matronId> <sireId> Checks to see if two cats can breed together, including checks for
ownership and siring approvals. Does NOT check that both cats are ready
for breeding (i.e. breedWith could still fail until the cooldowns are
finished). TODO: Shouldn't this check pregnancy and cooldowns?!?
cryptokitties-cli.js getKitty <id> Returns all the relevant information about a specific kitty.
cryptokitties-cli.js giveBirth <matronId> Have a pregnant Kitty give birth!
cryptokitties-cli.js isReadyToBreed <kittyId> Checks that a given kitten is able to breed (i.e. it is not pregnant or
in the middle of a siring cooldown).
cryptokitties-cli.js ownerOf <tokenId> Returns the address currently assigned ownership of a given Kitty.
cryptokitties-cli.js supportsInterface <interfaceID> Introspection interface as per ERC-165
(https://github.com/ethereum/EIPs/issues/165). Returns true for any
standardized interfaces implemented by this contract. We implement
ERC-165 (obviously!) and ERC-721.
cryptokitties-cli.js tokenMetadata <tokenId> <preferredTransport> Returns a URI pointing to a metadata package for this token conforming
to ERC-721 (https://github.com/ethereum/EIPs/issues/721)
cryptokitties-cli.js tokensOfOwner <owner> Returns a list of all Kitty IDs assigned to an address.
cryptokitties-cli.js totalSupply Returns the total number of Kitties currently in existence.
cryptokitties-cli.js transfer <to> <tokenId> Transfers a Kitty to another address. If transferring to a smart
contract be VERY CAREFUL to ensure that it is aware of ERC-721 (or
CryptoKitties specifically) or your Kitty may be lost forever.
Seriously.
cryptokitties-cli.js transferFrom <from> <to> <tokenId> Transfer a Kitty owned by another address, for which the calling address
has previously been granted transfer approval by the owner.
cryptokitties-cli.js unpause This is public rather than external so we can call super.unpause
without using an expensive CALL.
Options:
--web3 web3 provider url [default: "https://mainnet.infura.io/remix"]
--from from address
--gasPrice gas price in wei to use for this transaction [default: "1000000010"]
--gasLimit maximum gas provided for this transaction [default: "4700000"]
--value The value transferred for the transaction in wei
--contract-address address to contract [required] [default: "0x06012c8cf97BEaD5deAe237070F9587f8E7A266d"]
--network-id The network ID [default: "1"]
--ledger use a ledger [boolean]
--hd-path hd-path (used for hardware wallets) [default: "44'/60'/0'/0"]
--help Show help [boolean]
--version Show version number [boolean]
--provider [default: (provider)]
And the new function 'runs' and returns empty, probably as a result of infura timing me out, but no more errors.
bash-3.2$ node cryptokitties-cli.js tokensOfOwner 0xa6c366D97cb64708211f24310dFAd5363BC96a04
[]
So perhaps you generated from an odd copy of the kitty contract?
Ive poked at most of the function calls (that dont require gas) and they seem valid, but this one errors on me: