首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >tests/integration/test_lottery_integration.py:17: ValueError

tests/integration/test_lottery_integration.py:17: ValueError
EN

Ethereum用户
提问于 2022-02-18 16:41:00
回答 1查看 115关注 0票数 1

在运行测试时,我会得到以下错误:

代码语言:javascript
复制
def test_can_pick_winner():
        if network.show_active() in LOCAL_BLOCKCHAIN_ENVIRONMENTS:
            pytest.skip()
        lottery = deploy_lottery()
        account = get_account()
        lottery.startLottery({"from": account})
        lottery.enter({"from": account, "value": lottery.getEntranceFee()})
        lottery.enter({"from": account, "value": lottery.getEntranceFee()})
        fund_with_link
>       lottery.endLottery({"from": account})
E       ValueError: Gas estimation failed: 'execution reverted'. This transaction will likely revert. If you wish to broadcast, you must set the gas limit manually.

tests/integration/test_lottery_integration.py:17: ValueError
============================================================================================================= short test summary info ==============================================================================================================
FAILED tests/integration/test_lottery_integration.py::test_can_pick_winner - ValueError: Gas estimation failed: 'execution reverted'. This transaction will likely revert. If you wish to broadcast, you must set the gas limit manually.

知道出了什么问题吗?

EN

回答 1

Ethereum用户

发布于 2022-03-13 18:53:10

我也遇到了同样的问题,我更改了vrf_coordinator =‘0xb3dCcb4Cf7a26f6cf6Cf6Cf5A73875B7BC655B’,并在brownie-config.yaml文件中验证= false。因为这是vrf合同版本1 https://docs.chain.link/docs/vrf-contracts/v1/的地址.这对我有用!

票数 0
EN
页面原文内容由Ethereum提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://ethereum.stackexchange.com/questions/121974

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档