ApeWorX / ape

The smart contract development tool for Pythonistas, Data Scientists, and Security Professionals
https://apeworx.io
Apache License 2.0
872 stars 133 forks source link

ERROR: (ChainError) Failed to find a contract-creation receipt #2227

Closed theref closed 3 weeks ago

theref commented 4 weeks ago
ERROR: (ChainError) Failed to find a contract-creation receipt for '0x8d10e1b110761DB713A809eF7B3b084E1eA3A607'. Note that it may be the case that the backend used cannot detect contracts deployed by other contracts, and you may receive better results by installing a plugin that supports it, like Etherscan.

Environment information

$ ape --version
0.7.23

$ ape plugins list
Installed Plugins
  etherscan    0.6.4.dev39+gca9ae64.d20240821
  infura       0.7.3
  polygon      0.7.2
  solidity     0.7.3

etherscan is a local version because I'm using Polygon Amoy and needed this change https://github.com/ApeWorX/ape-etherscan/pull/146

$ cat ape-config.yaml
name: nucypher-contracts
contracts_folder: contracts

plugins:
  - name: solidity
  - name: polygon
  - name: ape-etherscan

dependencies:
  - name: openzeppelin
    github: OpenZeppelin/openzeppelin-contracts
    version: 5.0.0
    config_override:
      solidity:
        version: 0.8.23
        evm_version: paris
  - name: openzeppelin-upgradeable
    github: OpenZeppelin/openzeppelin-contracts-upgradeable
    version: 5.0.0
  - name: fx-portal
    github: 0xPolygon/fx-portal
    version: 1.0.5
  - name: threshold
    github: threshold-network/solidity-contracts
    version: 1.2.1

solidity:
  version: 0.8.23
  evm_version: paris
  import_remapping:
    - "@openzeppelin/contracts=openzeppelin/v5.0.0"
    - "@openzeppelin-upgradeable/contracts=openzeppelin-upgradeable/v5.0.0"
    - "@fx-portal/contracts=fx-portal/v1.0.5"
    - "@threshold/contracts=threshold/v1.2.1"

ethereum:
  mainnet:
    transaction_acceptance_timeout: 600  # 10 minutes

test:
  mnemonic: test test test test test test test test test test test junk
  number_of_accounts: 40

What went wrong?

I'm a running a deployment script. The deployment works fine, but when I'm trying to create a custom local registry and need to read some info from the contract. The above error comes from this line in my script:

receipt = contract_instance.receipt

which comes from here https://docs.apeworx.io/ape/v0.7.23/methoddocs/contracts.html#ape.contracts.base.ContractInstance.receipt

I'm only seeing this when deploying a proxied contract, standard contracts work fine

linear[bot] commented 4 weeks ago

APE-1800 ERROR: (ChainError) Failed to find a contract-creation receipt

antazoey commented 4 weeks ago

I think this may have been fixed by this: https://github.com/ApeWorX/ape/pull/2001

fubuloubu commented 4 weeks ago

@theref have you tried upgrading ape/plugins to >0.8?

antazoey commented 3 weeks ago

@theref See Ape was upgraded to 0.8 in that closed PR. Was the issue resolved?

theref commented 3 weeks ago

@antazoey Upgrading to 0.8 and upgrading all the plugins has resolved this. Thanks!