-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose Contract options #79
Comments
Hello @xf00f, I've noticed that you haven't been active on GitHub for some time. Can you accept this PR when you got a moment, please? |
Hello. I'm not sure about this solution. If the contract definition has changed, and the ABI being provided to the code generator is out of date, should the solution not be to update the ABI being fed to the generator? I'm not sure what your ABI source is, but you can provide files as inputs rather than etherscan. So you could modify the actual ABI json which you store in your repo to have the new function in it... I'm unsure as to why there isn't an up-to-date ABI out there with this |
CryptoKitties is very old contract (one of the ERC721 pioneers) that cannot be updated. Original ERC721 draft doesn't standardize
I don't think CryptoKitties has open source repository on GitHub -> that's why I send link to Etherscan where anybody can see The problem I am trying to solve is this: at some point in code you have access only to particular
That creates a need to have access to original ABI With proposed changes, you can take the existing |
Contracts in
web3x
have theirabi
,eth
(provider), anddefault options
declared as private, so there is no way to get to these parameters used to construct the Contract. Web3js exposes these parameters asoptions
property. Could we get the same in web3x?https://web3js.readthedocs.io/en/v1.2.0/web3-eth-contract.html#new-contract
Real-world use case
I have a
contract
with ERC721 ABI "loaded in it". Since some older contracts follow the initial draft of ERC721 they missgetApproved
andisApprovedForAll
methods. One such example is CryptoKitties contract, which fortunately implementgetApproved
functionality via it's ownkittyIndexToApproved
.At some point in code I want to do this:
Because of missing
options
property, I have to hack my way to Contract's private properties (via casting contract toany
) that may be changed in the future.With
options
feature code will be reduced to:The text was updated successfully, but these errors were encountered: