From cf8a04cd40aab6766483a7b65ae43085e35719b8 Mon Sep 17 00:00:00 2001 From: robriks Date: Tue, 6 Aug 2024 00:12:10 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20v1=20deployment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 26 ++++++++--------- docs/src/README.md | 26 ++++++++--------- docs/src/src/guides/Wave-LP-Voting.md | 41 ++++++++++++++++++++++++++- script/MainnetDeployment.s.sol | 3 +- test/CREATE2.t.sol | 1 - 5 files changed, 66 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index ba06072..ffc7f61 100644 --- a/README.md +++ b/README.md @@ -62,17 +62,15 @@ $ forge test ## Live Deployments -Wave protocol is currently deployed in Beta on Base Sepolia testnet for backend & frontend development and finalized Ethereum mainnet deployments are coming soon. - -| Name | Contract Details | Contract Address | -| --------------- | ---------------- | ------------------------------------------ | -| IdeaTokenHub | Harness, Proxy | 0xAFFED3815a60aACeACDA3aE53425f053eD6Efc4d | -| Wave | Harness, Proxy | 0x443f1F80fBB72Fa40cA70A93a0139852b0563961 | -| WaveRenderer | Singleton | 0xDAFF26c0C67B5a62077342D8487876Ed75Ad7f4A | -| FontRegistry | Singleton | 0x765EeF8b5dD7af8FC7Aa03C76aFFd23AbcE7a3Bb | -| PolymathFont | Singleton | 0xe2e6e42bf7Be8332c21652e05D385dAEDE4e9456 | -| NounsToken | Harness | 0xE8b46D16107e1d562B62B5aA8d4bF9A60e6c51b4 | -| NounsDescriptor | Singleton | 0x6cd473673A73150C8ff9Edc160262EBac3C882c0 | -| NounsRenderer | Singleton | 0x09A80D276a4dBb6a400aF1c8663ed0cC2073cFE7 | - -Note that the above testnet contracts deployed to Base Sepolia network are harnesses to expose convenience functions that would normally otherwise be protected to expedite development. +Wave protocol is currently live and deployed on Ethereum mainnet at the following contract addresses: + +| Name | Contract Details | Contract Address | +| ------------- | ---------------- | ------------------------------------------ | +| IdeaTokenHub | Proxy | 0x000000000088b111eA8679dD42f7D55512fD6bE8 | +| Wave | Proxy | 0x00000000008DDB753b2dfD31e7127f4094CE5630 | +| WaveRenderer | Singleton | 0x65DBB4C59d4D5d279beec6dfdb169D986c55962C | +| PolymathFont | Singleton | 0xf3A20995C9dD0F2d8e0DDAa738320F2C8871BD2b | +| NounsToken | Dependency | 0x9C8fF314C9Bc7F6e59A9d9225Fb22946427eDC03 | +| NounsGovernor | Dependency | 0x6f3E6272A167e8AcCb32072d08E0957F9c79223d | + +Testnet deployments can be found in previous release tags (<= v1) diff --git a/docs/src/README.md b/docs/src/README.md index eda1630..115110b 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -46,17 +46,15 @@ $ forge test ## Live Deployments -Wave protocol is currently deployed in Beta on Base Sepolia testnet for backend & frontend development and finalized Ethereum mainnet deployments are coming soon. - -| Name | Contract Details | Contract Address | -| --------------- | ---------------- | ------------------------------------------ | -| IdeaTokenHub | Harness, Proxy | 0xAFFED3815a60aACeACDA3aE53425f053eD6Efc4d | -| Wave | Harness, Proxy | 0x443f1F80fBB72Fa40cA70A93a0139852b0563961 | -| WaveRenderer | Singleton | 0xDAFF26c0C67B5a62077342D8487876Ed75Ad7f4A | -| FontRegistry | Singleton | 0x765EeF8b5dD7af8FC7Aa03C76aFFd23AbcE7a3Bb | -| PolymathFont | Singleton | 0xe2e6e42bf7Be8332c21652e05D385dAEDE4e9456 | -| NounsToken | Harness | 0xE8b46D16107e1d562B62B5aA8d4bF9A60e6c51b4 | -| NounsDescriptor | Singleton | 0x6cd473673A73150C8ff9Edc160262EBac3C882c0 | -| NounsRenderer | Singleton | 0x09A80D276a4dBb6a400aF1c8663ed0cC2073cFE7 | - -Note that the above testnet contracts deployed to Base Sepolia network are harnesses to expose convenience functions that would normally otherwise be protected to expedite development. +Wave protocol is currently live and deployed on Ethereum mainnet at the following contract addresses: + +| Name | Contract Details | Contract Address | +| ------------- | ---------------- | ------------------------------------------ | +| IdeaTokenHub | Proxy | 0x000000000088b111eA8679dD42f7D55512fD6bE8 | +| Wave | Proxy | 0x00000000008DDB753b2dfD31e7127f4094CE5630 | +| WaveRenderer | Singleton | 0x65DBB4C59d4D5d279beec6dfdb169D986c55962C | +| PolymathFont | Singleton | 0xf3A20995C9dD0F2d8e0DDAa738320F2C8871BD2b | +| NounsToken | Dependency | 0x9C8fF314C9Bc7F6e59A9d9225Fb22946427eDC03 | +| NounsGovernor | Dependency | 0x6f3E6272A167e8AcCb32072d08E0957F9c79223d | + +Testnet deployments can be found in previous release tags (<= v1) diff --git a/docs/src/src/guides/Wave-LP-Voting.md b/docs/src/src/guides/Wave-LP-Voting.md index 1333ed7..2eeee3e 100644 --- a/docs/src/src/guides/Wave-LP-Voting.md +++ b/docs/src/src/guides/Wave-LP-Voting.md @@ -1 +1,40 @@ -TODO +# Voting while delegated to Wave Protocol + +### Because Wave Protocol is noncustodial and registers delegations using optimistic state, Nouns NFT holders who have delegated their voting power to Wave Protocol retain the right to vote and participate in the Nouns governance ecosystem at all times. + +### Important note: voting on Nouns proposals uses a checkpointing system, restricting votes to the voting power of each account **when the proposal goes live**! In order to vote you must be on top of the proposal's lifecycle and complete step 1 and 2 during the proposal's "Pending" state prior to the proposal going live for public voting. + +## To vote while delegated to Wave + +Voting and participating while delegated to Wave comprises four major steps, three of which require sending an onchain transaction: + +- Write down your Wave delegate's address as you will need it in the third step when redelegating to Wave. The address may be fetched from the Wave Core contract or Nouns Token contract. +- Delegate to yourself to reclaim your voting power. This undelegates from Wave Protocol +- Vote on the proposal(s) you're interested in, provided you met the time constraints noted above +- Redelegate to your Wave delegate (which you wrote down) before the completion of the current Wave + +That's it! Profit :) + +### 1. Fetching your Wave delegate's address + +In order for Wave Protocol to guarantee your expected yield, you should record your delegate address and redelegate to the same delegate after voting. This can be done in multiple ways: + +If you know your Delegate's address, write it down and move to step 2. +If you know your Delegate's ID but not its address, call `Wave::getDelegateAddress()` on the [Wave core contract.](https://etherscan.io/address/0x00000000008DDB753b2dfD31e7127f4094CE5630) +If you don't know your Delegate's address or ID, check what delegate address you are currently delegated to by calling `NounsToken::delegates()` on the [Nouns token contract](https://etherscan.io/address/0x9C8fF314C9Bc7F6e59A9d9225Fb22946427eDC03). + +Be sure to record your Wave delegate address so that you can redelegate to it after voting. + +##### While this step is technically not necessary due to Wave Protocol's matchmaking mechanism, onchain state may change during the interim while you are delegated to yourself and voting. In certain cases this can lead to the protocol UI suggesting a different delegate ID for you when redelegating. In such a case, if your voting power is below the current minimum required votes to push a proposal (ie your voting power is considered a "partial" delegation in need of matchmaking), your yield is no longer guaranteed and may be dependent on the protocol finding another match for your liquidity. + +### 2. Delegate to yourself + +It is recommended to use the Nouns governance UI to redelegate your voting power to yourself (and away from Wave Protocol). Should the UI be unavailable for some reason, this can also be done at the contract level using `NounsToken::delegate()` + +### 3. Vote on proposals + +It is likewise recommended to use the Nouns governance UI to vote on the proposals you feel strongly about. Again, should the UI be unavailable for some reason, this can also be done at the contract level using `NounsToken::castVote()` or some variation thereof (refundable, with reason, etc) + +### 4. Redelegating to Wave Protocol + +Simply redelegate to the Delegate address that you wrote down (and had been delegated to previously before voting). This must be done on the Nouns Token contract either using the Nouns governance UI or with `NounsToken::delegate(delegateAddress)` Since your original delegation to Wave included registering an optimistic delegation in the Wave core contract's storage, there is no need to re-register or further interact with Wave Protocol contracts. diff --git a/script/MainnetDeployment.s.sol b/script/MainnetDeployment.s.sol index abca64c..91cd056 100644 --- a/script/MainnetDeployment.s.sol +++ b/script/MainnetDeployment.s.sol @@ -103,7 +103,6 @@ contract Deploy is Script { ); bytes memory waveConstructorParams = abi.encode(uint256(uint160(address(waveCoreImpl))), initData); bytes memory waveCreationCode = abi.encodePacked(proxyCreationCode, waveConstructorParams); - bytes32 waveHash = keccak256(waveCreationCode); bytes memory waveCreationCall = abi.encodeWithSignature("safeCreate2(bytes32,bytes)", waveCoreSalt, waveCreationCode); (bool rw, bytes memory retw) = create2Factory.call(waveCreationCall); require(rw); @@ -115,6 +114,8 @@ contract Deploy is Script { // asserts assert(ideaTokenHubActual == ideaTokenHubExpected); assert(waveCoreActual == waveCoreExpected); + assert(ideaTokenHub.owner() == safe); + assert(waveCore.owner() == safe); require(address(polymathTextRegular).code.length > 0); require(address(renderer).code.length > 0); diff --git a/test/CREATE2.t.sol b/test/CREATE2.t.sol index 1891c53..2c94105 100644 --- a/test/CREATE2.t.sol +++ b/test/CREATE2.t.sol @@ -35,7 +35,6 @@ contract CREATE2Test is Test { require(r); address ideaTokenHubActual = abi.decode(ret, (address)); console2.logAddress(ideaTokenHubActual); - assertEq(ideaTokenHubExpected, ideaTokenHubActual); } function test_getWaveCoreHash() public {