Giter Site home page Giter Site logo

Comments (22)

gregegan avatar gregegan commented on May 24, 2024 1

I'd recommend taking a look at the hardhat docs for polygon configuration. Goldfinch is only deployed currently on ethereum mainnet, and have not deployed contracts to any other chains.

https://docs.polygon.technology/docs/develop/hardhat/

from mono.

wbj-goldfinch avatar wbj-goldfinch commented on May 24, 2024 1

Hey @ctindogaru,

The failing transactions are being caused by your EOA not having the OWNER_ROLE on any of the contracts. This is caused by getProtocolOwner() returning the Warbler labs Rinkeby Gnosis safe address, which is hard coded here

To get around this problem you can temporarily edit that hardcoded address to your EOA and redeploy the protocol. To verify it worked you can get call .getRoleMember(0xb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e, 0) and verify that it's your EOA. 0xb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e is the OWNER_ROLE identifier.

A way to override this via environment variable would be a good solution here. I can create an issue for this on our internal issue tracker. If you're interested, we would also accept a PR to fix this!

Let me know if that helps and thanks for raising this issue!

from mono.

wbj-goldfinch avatar wbj-goldfinch commented on May 24, 2024 1

When looking at that address that it's outputting poolTokens is deploying to it looks like it's using the existing deploys that we did a long time ago on rinkeby. You may need to delete all of the manifests under packages/protocol/deployments/rinkeby so that fresh contracts get deployed.

from mono.

ctindogaru avatar ctindogaru commented on May 24, 2024

What about rinkeby? That would still help quite a lot. Has goldfinch ever deployed their smart contracts on rinkeby network?

from mono.

ctindogaru avatar ctindogaru commented on May 24, 2024

follow up on this. Do you have some suggestions for deploying all the smart contracts on rinkeby/goerli/any other network?

There is a multitude of smart contracts and external dependencies, so it's hard to tell the exact setup that needs to be done. I've just tried to deploy everything on rinkeby, but it fails heavily...

from mono.

ctindogaru avatar ctindogaru commented on May 24, 2024

This is one of the errors that I'm getting:

failed to get chainId, falling back on net_version...
An unexpected error occurred:

ProviderError: Must be authenticated!

from mono.

ctindogaru avatar ctindogaru commented on May 24, 2024

A documentation on how to deploy to other network (other than localhost) would be gold!

from mono.

ctindogaru avatar ctindogaru commented on May 24, 2024

This is one of the errors that I'm getting:

failed to get chainId, falling back on net_version...
An unexpected error occurred:

ProviderError: Must be authenticated!

Solved this one, jumped into another one:

Fail with error 'Must have admin role to perform this action'

https://rinkeby.etherscan.io/tx/0x8dc9504e49528d48eefbce09e7ba251a4a9af9ab620be628114f782868c2b419

from mono.

ctindogaru avatar ctindogaru commented on May 24, 2024
  [RINKEBY_CHAIN_ID]: {
    safeAddress: "0x618C20c64cAc5211E099D355ba213790708e7462",
    executor: "0xeF3fAA47e1b0515f640c588a0bc3D268d5aa29B9",
  },

Does the executor address need to change as well or just the safeAddress?

from mono.

wbj-goldfinch avatar wbj-goldfinch commented on May 24, 2024

I believe just the safe address because getProtocolOwner returns that field here

from mono.

wbj-goldfinch avatar wbj-goldfinch commented on May 24, 2024

You may need to deploy your own gnosis safe on rinkeby to make this work as I think our deploy scripts build a transaction for a gnosis safe but I would give editing that to your EOA first and then use a gnosis safe.

from mono.

ctindogaru avatar ctindogaru commented on May 24, 2024

It worked, thank you! But as I've said, solving one error just leads to another one...

About to deploy Fidu...
An unexpected error occurred:

Error: ERROR processing /Users/constantindogaru/weavik/mono/packages/protocol/deploy/baseDeploy.ts:
Error: To change owner/admin, you need to call the proxy directly

And the bad thing is that all these errors are pretty hard to debug without internal help from you guys

from mono.

ctindogaru avatar ctindogaru commented on May 24, 2024

Error: To change owner/admin, you need to call the proxy directly

This error literally happens on every single contract, but only the first time. If you run it again, deploying the contract will succeed but the next contract will fail with the same error. If you run it again, it will succeed, but the next one fails and so on..

from mono.

ctindogaru avatar ctindogaru commented on May 24, 2024

To better understand what i mean, I get the following output if I run the scripts:

About to deploy Fidu...
Error: To change owner/admin, you need to call the proxy directly

I run it one more time, I get the following output:

About to deploy Fidu...
Fidu was deployed to: 0x85F97dFf419216F65A416032744bB8bCfcA44baA (9.712kb)
About to deploy Pool Tokens...
Error: To change owner/admin, you need to call the proxy directly

I run it one more time, I get the following output:

About to deploy Fidu...
Fidu was deployed to: 0x85F97dFf419216F65A416032744bB8bCfcA44baA (9.712kb)
About to deploy Pool Tokens...
PoolTokens was deployed to: 0x9aB3cfeA6f849a2106b2D3874D6d3Cb8b24cbcdC (2.286kb)
About to deploy TransferRestrictedVault...
Error: To change owner/admin, you need to call the proxy directly

Any idea what could be the issue? Seems that re-running solves the issue, but you need to re-run couple of times to get rid of all the errors.

from mono.

ctindogaru avatar ctindogaru commented on May 24, 2024

That solved the problem! Will let you know if I encounter any other errors. Thank you so much.

I'll make sure I document all the deployment process after I finish.

from mono.

ctindogaru avatar ctindogaru commented on May 24, 2024

Bumping into

An unexpected error occurred:

Error: ERROR processing /Users/constantindogaru/weavik/mono/packages/protocol/deploy/baseDeploy.ts:
Error: replacement fee too low (error={"name":"ProviderError","code":-32000,"_isProviderError":true}, method="sendTransaction", transaction=undefined, code=REPLACEMENT_UNDERPRICED, version=providers/5.4.5)

This is the most recent blocker.

from mono.

ctindogaru avatar ctindogaru commented on May 24, 2024

Also, getting Fail with error 'Contract instance has already been initialized' if I run the script twice.

Borrower was deployed to: 0x1b4F0d7c2d1782f79Ee085f2B04B6930d8F47e9E (10.023kb)
FixedLeverageRatioStrategy was deployed to: 0x643eDB1AEa8b9Ec2C4664606093f6Dee9CAD89BF (6.213kb)
An unexpected error occurred:

See https://rinkeby.etherscan.io/tx/0xe3988196b98aa4c5e1b2ce01ba2f367c920d5758c7d32c1b1fb5cc5e203a3e75.

from mono.

ctindogaru avatar ctindogaru commented on May 24, 2024

Another one which happens on line await deployEffects.executeDeferred() from baseDeploy.ts:

Error: Safe Proxy contract is not deployed in the current network

from mono.

ctindogaru avatar ctindogaru commented on May 24, 2024

You may need to deploy your own gnosis safe on rinkeby to make this work as I think our deploy scripts build a transaction for a gnosis safe but I would give editing that to your EOA first and then use a gnosis safe.

You may need to deploy your own gnosis safe on rinkeby to make this work as I think our deploy scripts build a transaction for a gnosis safe but I would give editing that to your EOA first and then use a gnosis safe.

I've tried to use a gnosis safe address from Rinkeby and I get the following error:

Starting deploy...
Will be deploying using the gf_deployer account: 0x618C20c64cAc5211E099D355ba213790708e7462
Chain id is: 4
GoldfinchConfig was deployed to: 0x14d6B65218578b8498689F17645ead1C943b345f (6.848kb)
Config newly deployed, initializing...
Updating the config vals...
An unexpected error occurred:

Error: ERROR processing /Users/constantindogaru/weavik/mono/packages/protocol/deploy/baseDeploy.ts:
Error: transaction failed (transactionHash="0x17cad6d0badcfaa8323ef8e189172cd0bed1e2dc71fee611bef7dc8242bd93bc"

https://rinkeby.etherscan.io/tx/0x17cad6d0badcfaa8323ef8e189172cd0bed1e2dc71fee611bef7dc8242bd93bc

Any idea how to grant permissions?

from mono.

wbj-goldfinch avatar wbj-goldfinch commented on May 24, 2024

Hey @ctindogaru I think I found the problem

deployConfig does not use deployEffects for setting the initial config values. Instead it will make the transactions directly with the deployer account.

A quick overview on deployEffects: You can think about it is as a queue of transactions that will all be bundled together and executed as a single transaction. when you call add or changeImplementations it queues a transaction that will then be executed along with every other transaction. I'm actually not sure how the transaction will appear. In our current setup a proposal appears in our Defender instance. I think for it to work you need to have DEFENDER_API_KEY in your environment with a valid api key that can create proposals.

In order to get around this problem you'll need to pass deployEffects to basically every deploy___ function in baseDeploy.ts that doesn't currently take it. For every transaction that happens (besides constructors) you'll need to deployEffects.add( that transaction.

here is an example of what that looks like.

If you're successful a new proposal to execute your transaction will appear in your defender instance.

from mono.

ctindogaru avatar ctindogaru commented on May 24, 2024

Do I really need a defender or can I skip it if I want to?

from mono.

ctindogaru avatar ctindogaru commented on May 24, 2024

Hey @ctindogaru I think I found the problem

deployConfig does not use deployEffects for setting the initial config values. Instead it will make the transactions directly with the deployer account.

A quick overview on deployEffects: You can think about it is as a queue of transactions that will all be bundled together and executed as a single transaction. when you call add or changeImplementations it queues a transaction that will then be executed along with every other transaction. I'm actually not sure how the transaction will appear. In our current setup a proposal appears in our Defender instance. I think for it to work you need to have DEFENDER_API_KEY in your environment with a valid api key that can create proposals.

In order to get around this problem you'll need to pass deployEffects to basically every deploy___ function in baseDeploy.ts that doesn't currently take it. For every transaction that happens (besides constructors) you'll need to deployEffects.add( that transaction.

here is an example of what that looks like.

If you're successful a new proposal to execute your transaction will appear in your defender instance.

Thank you for the answer. I've posted several issues, this is a solution to which one?

from mono.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.