Skip to content

Commit

Permalink
Merge pull request #26 from robriks/v1.0
Browse files Browse the repository at this point in the history
🚀 v1 deployment
  • Loading branch information
robriks authored Aug 6, 2024
2 parents 6900d7a + cf8a04c commit 05a52dd
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 31 deletions.
26 changes: 12 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
26 changes: 12 additions & 14 deletions docs/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
41 changes: 40 additions & 1 deletion docs/src/src/guides/Wave-LP-Voting.md
Original file line number Diff line number Diff line change
@@ -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(<delegateID>)` 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(<yourAddress>)` 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(<yourAddress>)`

### 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.
3 changes: 2 additions & 1 deletion script/MainnetDeployment.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
1 change: 0 additions & 1 deletion test/CREATE2.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 05a52dd

Please sign in to comment.