PatrickAlphaC / smartcontract-lottery

MIT License
78 stars 113 forks source link

test_lottery_integration final test on --network Rinkeby API request failed #41

Closed CornFarmerNZ closed 2 years ago

CornFarmerNZ commented 2 years ago

contract on etherscan: https://rinkeby.etherscan.io/tx/0xe627024313a6c9679ffcd4d52812cafca0971b49d8bc4b44210895d501e079e7

After running brownie run scripts/deploy_lottery.py --network rinkeby, the terminal displays this before the error dump:

Screen Shot 2022-02-20 at 11 29 15 PM

error dump:

File "brownie/_cli/run.py", line 51, in main
    return_value, frame = run(
  File "brownie/project/scripts.py", line 103, in run
    return_value = f_locals[method_name](*args, **kwargs)
  File "./scripts/deploy_lottery.py", line 53, in main
    deploy_lottery()
  File "./scripts/deploy_lottery.py", line 9, in deploy_lottery
    lottery = Lottery.deploy(
  File "brownie/network/contract.py", line 532, in __call__
    return tx["from"].deploy(
  File "brownie/network/account.py", line 557, in deploy
    contract.publish_source(deployed_contract, silent=silent)
  File "brownie/network/contract.py", line 400, in publish_source
    raise ValueError(f"API request failed with: {data['result']}")
ValueError: API request failed with: []
tim@Tims-MacBook-Air smartcontract-lottery % brownie run scripts/deploy_lottery.py --network rinkeby
Brownie v1.18.1 - Python development framework for Ethereum

SmartcontractLotteryProject is the active project.

Running 'scripts/deploy_lottery.py::main'...
Transaction sent: 0xcbd4feb68dff63d3c1acc8df5714e1729dce9c5f6044beb7509ba2e12c8ecabc
  Gas price: 1.500000011 gwei   Gas limit: 1012973   Nonce: 49
  Lottery.constructor confirmed   Block: 10200481   Gas used: 920885 (90.91%)
  Lottery deployed at: 0xF27F8ED1eB033401fD25Fd1f6F412197d04EAe8E

Waiting for https://api-rinkeby.etherscan.io/api to process contract...
brownie networks list
  File "brownie/_cli/run.py", line 51, in main
    return_value, frame = run(
  File "brownie/project/scripts.py", line 103, in run
    return_value = f_locals[method_name](*args, **kwargs)
  File "./scripts/deploy_lottery.py", line 53, in main
    deploy_lottery()
  File "./scripts/deploy_lottery.py", line 9, in deploy_lottery
    lottery = Lottery.deploy(
  File "brownie/network/contract.py", line 532, in __call__
    return tx["from"].deploy(
  File "brownie/network/account.py", line 557, in deploy
    contract.publish_source(deployed_contract, silent=silent)
  File "brownie/network/contract.py", line 400, in publish_source
    raise ValueError(f"API request failed with: {data['result']}")
ValueError: API request failed with: []

Things I checked to try diagnose:


  - smartcontractkit/chainlink-brownie-contracts@1.1.1
  - OpenZeppelin/openzeppelin-contracts@3.4.0
compiler:
  solc:
    remappings:
      - '@chainlink=smartcontractkit/chainlink-brownie-contracts@1.1.1'
      - '@openzeppelin=OpenZeppelin/openzeppelin-contracts@3.4.0'
dotenv: .env
networks:
  default: development
  development:
    keyhash: '0xd89b2bf150e3b9e13446986e571fb9cab24b13cea0a43ea20a6049a85cc807cc'
    fee: 250000000000000000
  rinkeby:
    vrf_coordinator: '0x6168499c0cFfCaCD319c818142124B7A15E857ab' #correct
    eth_usd_price_feed: '0x8A753747A1Fa494EC906cE90E9f37563A8AF630e' #correct
    link_token: '0x01BE23585060835E02B77ef475b0Cc51aA1e0709' #correct
    keyhash: '0xd89b2bf150e3b9e13446986e571fb9cab24b13cea0a43ea20a6049a85cc807cc' #correct
    fee: 250000000000000000
    verify: True
  mainnet-fork:
    eth_usd_price_feed: '0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419'
wallets:
  from_key: ${PRIVATE_KEY}```

Thank you for your time.
PatrickAlphaC commented 2 years ago

Rinkeby is being really slow and hard to verify right now. You might want to do something like this: https://github.com/smartcontractkit/chainlink-mix/blob/main/scripts/vrf_scripts/01_deploy_vrf.py

You wait X confirmations and then go for your verification.

CornFarmerNZ commented 2 years ago

Ah. Legend, thanks.