Skip to content
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

fix: ots_getContractCreater has field hash instead of tx #999

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

jsvisa
Copy link
Contributor

@jsvisa jsvisa commented Jul 1, 2024

Motivation

the response of ots_getContractCreator from https://github.com/otterscan/otterscan/blob/develop/docs/custom-jsonrpc.md#ots_getcontractcreator as below:

object containing the following attributes, or null if the address does not contain a contract.
hash - The tx hash of the transaction who created the contract.
creator - The address who directly created the contract. Note that for simple transactions that directly deploy a contract this corresponds to the EOA in the from field of the transaction. For deployer contracts, i.e., the contract is created as a result of a method call, this corresponds to the address of the contract who created it.

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "hash": "0xe881c43cd88063e84a1d0283f41ee5348239b259c0d17a7e2e4552da3f4b2bc7",
    "creator": "0x6c9fc64a53c1b71fb3f9af64d1ae3a4931a5f4e9"
  }
}

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Signed-off-by: jsvisa <delweng@gmail.com>
@jsvisa jsvisa changed the title fix: ots_ContractCreater has hash instead of tx field fix: ots_getContractCreater has field hash instead of tx Jul 1, 2024
Signed-off-by: jsvisa <delweng@gmail.com>
@mattsse mattsse merged commit c98a175 into alloy-rs:main Jul 1, 2024
22 checks passed
@jsvisa jsvisa deleted the ots-ContractCreater branch July 1, 2024 09:54
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
* fix: ots_ContractCreater has hash instead of tx field

Signed-off-by: jsvisa <delweng@gmail.com>

* clippy

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants