Skip to content

Commit

Permalink
Child Gauge Implementation update (#11)
Browse files Browse the repository at this point in the history
* feat: bump latest V6 version where possible, so code looks similar and has all these cool descriptive comments

* chore: forbid CRV as reward

* feat: remove msg.sender from salt
  • Loading branch information
romanagureev authored Sep 16, 2024
1 parent 2328fd6 commit 3876cf0
Show file tree
Hide file tree
Showing 8 changed files with 514 additions and 322 deletions.
2 changes: 1 addition & 1 deletion contracts/ChildGaugeFactory.vy
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def deploy_gauge(_lp_token: address, _salt: bytes32, _manager: address = msg.sen

gauge_data: uint256 = 1 # set is_valid_gauge = True
implementation: address = self.get_implementation
salt: bytes32 = keccak256(_abi_encode(chain.id, msg.sender, _salt))
salt: bytes32 = keccak256(_abi_encode(chain.id, _salt))
gauge: address = create_minimal_proxy_to(
implementation, salt=salt
)
Expand Down
2 changes: 1 addition & 1 deletion contracts/RootGaugeFactory.vy
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def deploy_gauge(_chain_id: uint256, _salt: bytes32) -> RootGauge:
assert bridger != empty(Bridger) # dev: chain id not supported

implementation: address = self.get_implementation
salt: bytes32 = keccak256(_abi_encode(_chain_id, msg.sender, _salt))
salt: bytes32 = keccak256(_abi_encode(_chain_id, _salt))
gauge: RootGauge = RootGauge(create_minimal_proxy_to(
implementation,
value=msg.value,
Expand Down
Loading

0 comments on commit 3876cf0

Please sign in to comment.