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

deploy.ts is broken #280

Open
Jo-Chris opened this issue Jun 17, 2024 · 0 comments
Open

deploy.ts is broken #280

Jo-Chris opened this issue Jun 17, 2024 · 0 comments

Comments

@Jo-Chris
Copy link

Several contract deployments fail:

An unexpected error occurred:
Error: missing argument: passed to contract (count=3, expectedCount=4, code=MISSING_ARGUMENT, version=contracts/5.7.0)
An unexpected error occurred:
Error: no matching function (argument="signature", value="initialize(address,address,uint256)", code=INVALID_ARGUMENT, version=abi/5.7.0)

e.g. MedianOracle

    function init(
        uint256 reportExpirationTimeSec_,
        uint256 reportDelaySec_,
        uint256 minimumProviders_,
        uint256 scalar_
    ) public initializer {
        require(reportExpirationTimeSec_ <= MAX_REPORT_EXPIRATION_TIME);
        require(minimumProviders_ > 0);
        reportExpirationTimeSec = reportExpirationTimeSec_;
        reportDelaySec = reportDelaySec_;
        minimumProviders = minimumProviders_;
        scalar = scalar_;
        __Ownable_init();
    }

in deploy.ts

    // deploy cpi oracle
    const cpiOracle = await deployContract(hre, 'MedianOracle', deployer)
    await cpiOracle.init(
      CPI_REPORT_EXPIRATION_SEC,
      CPI_REPORT_DELAY_SEC,
      CPI_MIN_PROVIDERS,
    )
    console.log('CPI oracle to:', cpiOracle.address)
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

No branches or pull requests

1 participant