Skip to content

Commit

Permalink
Now that Coordinator is proxied, we no longer need a customized TACoC…
Browse files Browse the repository at this point in the history
…hildApplication for lynx.
  • Loading branch information
derekpierre committed Nov 16, 2023
1 parent 820b8a4 commit c86153b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
16 changes: 0 additions & 16 deletions contracts/contracts/testnet/LynxSet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,6 @@ contract MockPolygonChild is Ownable, ITACoChildToRoot, ITACoRootToChild {
function confirmOperatorAddress(address _operator) external override {}
}

contract LynxTACoChildApplication is TACoChildApplication, Ownable {
constructor(
ITACoChildToRoot _rootApplication,
uint96 _minimumAuthorization
) TACoChildApplication(_rootApplication, _minimumAuthorization) Ownable(msg.sender) {}

function setCoordinator(address _coordinator) external onlyOwner {
require(_coordinator != address(0), "Coordinator must be specified");
require(
address(Coordinator(_coordinator).application()) == address(this),
"Invalid coordinator"
);
coordinator = _coordinator;
}
}

contract LynxRitualToken is ERC20("LynxRitualToken", "LRT") {
constructor(uint256 _totalSupplyOfTokens) {
_mint(msg.sender, _totalSupplyOfTokens);
Expand Down
5 changes: 2 additions & 3 deletions deployment/constructor_params/lynx/child.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ constants:

contracts:
- MockPolygonChild
- LynxTACoChildApplication:
- TACoChildApplication:
proxy:
contract_type: TACoChildApplication
constructor:
_rootApplication: $MockPolygonChild
_minimumAuthorization: $FORTY_THOUSAND_TOKENS_IN_WEI_UNITS
Expand All @@ -28,7 +27,7 @@ contracts:
constructor:
_data: $encode:initialize,$ONE_HOUR_IN_SECONDS,$MAX_DKG_SIZE,$deployer
constructor:
_application: $LynxTACoChildApplication
_application: $TACoChildApplication
_currency: $LynxRitualToken
_feeRatePerSecond: 1
- GlobalAllowList:
Expand Down
3 changes: 2 additions & 1 deletion scripts/lynx/deploy_child.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/python3

from ape import project

from deployment.constants import CONSTRUCTOR_PARAMS_DIR
from deployment.params import Deployer

Expand All @@ -26,7 +27,7 @@ def main():

mock_polygon_child = deployer.deploy(project.MockPolygonChild)

taco_child_application = deployer.deploy(project.LynxTACoChildApplication)
taco_child_application = deployer.deploy(project.TACoChildApplication)

deployer.transact(mock_polygon_child.setChildApplication, taco_child_application.address)

Expand Down

0 comments on commit c86153b

Please sign in to comment.