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

feat: Add script to deploy new controller #47

Merged
merged 6 commits into from
Mar 16, 2023

Conversation

fzavalia
Copy link
Contributor

@fzavalia fzavalia commented Mar 15, 2023

Closes #29

Created scripts/deploy/deployDCLControllerV2.js to deploy the new controller, which has been deployed and verified to https://goerli.etherscan.io/address/0x055a4d2c8f044bc9aac260c9194fd177654329cd

Owner - 0xb919da06d5f81777B13Fc5CBd48635E19500Fbf5

Deployed with the following params:

  • 0xe7fDae84ACaba2A5Ba817B6E6D8A2d415DBFEdbe MANA token
  • 0x6b8da2752827cf926215b43bb8E46Fd7b9dDac35 DCLRegistrar
  • 0xb919da06d5f81777B13Fc5CBd48635E19500Fbf5 FeeCollector

The deployment is intended to be done using https://frame.sh/ a desktop wallet that exposes a local port at http://127.0.0.1:1248. The benefit of using this tool is that there is no need of writing your private key on the .env file, which might lead to some security issues, it is also a good workaround to deploy hardhat contracts using a hardware wallet.

throw new Error('Invalid network')
}

const provider = ethProvider()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be initialized as ethProvider('frame') but as the docs indicate:
image
'frame' is used by default


const provider = ethProvider()

provider.setChain(chain)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The newest version of frame allows being connected to multiple chains at the same time. This is required to indicate on which chain the contract is to be deployed to.


provider.setChain(chain)

web3.setProvider(provider)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provider has to be set to the web3 client in order to replace it with the one that uses frame.

@@ -196,7 +196,7 @@ describe('DCL Names V2 with DCLControllerV2', function () {
}

beforeEach(async function () {
await loadFixture(deployTokenFixture)
await loadFixture(fixture)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Irrelevant to the PR, but changed the name of the function because it was not correct.

@fzavalia fzavalia merged commit dc66de7 into feat/stop-burning-mana Mar 16, 2023
@fzavalia fzavalia deleted the feat/deploy-goerli branch March 16, 2023 13:08
fzavalia added a commit that referenced this pull request Apr 18, 2023
* fix: Fix npm install issues by refactoring the repo (#34)

* fix: Npm install issues by refactoring the repo

* fix: Test script

* feat: Support coverage

* feat: Remove unused config

* fix: CI

* fix: CI

* chore: EOL

* chore: Update CI

* fix: Tests performance (#39)

* fix: Tests performance

---------

Co-authored-by: Nando <24811313+fzavalia@users.noreply.github.com>

* feat: Clone DCLController into DCLControllerV2 o contain future changes (#40)

* feat: Clone DCLController into DCLControllerV2 o contain future changes

* chore: EOL

* chore: EOL

* feat: Provide fee collector in constructor (#41)

* feat: Receive fee collector in constructor

* fix: FakeControllerV2

* chore: Test fee collector provided in constructor

* chore: Update test

* feat: Add function to update the fee collector (#42)

* feat: Receive fee collector in constructor

* fix: FakeControllerV2

* chore: Test fee collector provided in constructor

* feat: Function to set the fee collector

* chore: Test that constructor is using the internal set fee collector function

* chore: Test setFeeCollector function

* feat: Send fee to fee collector (#43)

* feat: Receive fee collector in constructor

* fix: FakeControllerV2

* chore: Test fee collector provided in constructor

* feat: Function to set the fee collector

* chore: Test that constructor is using the internal set fee collector function

* chore: Test setFeeCollector function

* feat: Transfer tokens to fee collector instead of burning

* chore: Fix tests

* chore: Test that the fee is transferred to the fee collector

* Update contracts/ens/DCLControllerV2.sol

Co-authored-by: Ignacio Mazzara <nachomazzara@gmail.com>
Signed-off-by: Fernando Zavalia <24811313+fzavalia@users.noreply.github.com>

* chore: Update test

* chore: Update test

* chore: Update test

---------

Signed-off-by: Fernando Zavalia <24811313+fzavalia@users.noreply.github.com>
Co-authored-by: Ignacio Mazzara <nachomazzara@gmail.com>

* feat: Validate collector is never address(0) (#45)

* feat: Validate fee collector is not address 0

* chore: Test that the fee collector is not 0

* chore: Add full DCLControllerV2 full contract (#46)

* feat: Add script to deploy new controller (#47)

* feat: Add script to deploy new controller

* chore: EOL

* chore: Add default network

* chore: Add default rpc url for deploy

* chore: Remove default network

* chore: Rename fixture

* feat: Remove mas gas price and validations (#49)

* feat: Provide owner on constructor (#51)

* feat: Provide owner on constructor

* chore: Test transfer ownership

* chore: Add natspec

* feat: Remove requireBalance function (#53)

* feat: Remove requireBalance function

* chore: Fix tests

* chore: Add comment about which ERC20 tokens should be used (#54)

* chore: Add comment about token

* chore: Remove

* chore: Add comment in contructor

* chore: Update comment

* chore: Update comment

* chore: Remove dot

* chore: Deploy mainnet (#55)

* chore: Update README

* chore: Update deploy script

---------

Signed-off-by: Fernando Zavalia <24811313+fzavalia@users.noreply.github.com>
Co-authored-by: Gabriel Díaz <gabrieldiaz31@gmail.com>
Co-authored-by: Ignacio Mazzara <nachomazzara@gmail.com>
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

Successfully merging this pull request may close these issues.

2 participants