-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removes
batchUpdate
, moves additional access in child app to extend…
…ed contract, makes child app upgradeable,
- Loading branch information
Showing
9 changed files
with
127 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import "../threshold/ITACoChildApplication.sol"; | ||
|
||
/** | ||
* @notice Contract for testing Coordinator contract | ||
*/ | ||
contract ChildApplicationForCoordinatorMock is ITACoChildApplication { | ||
mapping(address => uint96) public authorizedStake; | ||
mapping(address => address) public operatorFromStakingProvider; | ||
mapping(address => address) public stakingProviderFromOperator; | ||
mapping(address => bool) public confirmations; | ||
|
||
function updateOperator(address _stakingProvider, address _operator) external { | ||
address oldOperator = operatorFromStakingProvider[_stakingProvider]; | ||
stakingProviderFromOperator[oldOperator] = address(0); | ||
operatorFromStakingProvider[_stakingProvider] = _operator; | ||
stakingProviderFromOperator[_operator] = _stakingProvider; | ||
} | ||
|
||
function updateAuthorization(address _stakingProvider, uint96 _amount) external { | ||
authorizedStake[_stakingProvider] = _amount; | ||
} | ||
|
||
function confirmOperatorAddress(address _operator) external { | ||
confirmations[_operator] = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import "../contracts/coordination/ITACoRootToChild.sol"; | ||
|
||
/** | ||
* @notice Contract for testing TACo child application contract | ||
*/ | ||
contract RootApplicationForTACoChildApplicationMock { | ||
ITACoRootToChild public childApplication; | ||
|
||
mapping(address => bool) public confirmations; | ||
|
||
function setChildApplication(ITACoRootToChild _childApplication) external { | ||
childApplication = _childApplication; | ||
} | ||
|
||
function updateOperator(address _stakingProvider, address _operator) external { | ||
childApplication.updateOperator(_stakingProvider, _operator); | ||
} | ||
|
||
function updateAuthorization(address _stakingProvider, uint96 _amount) external { | ||
childApplication.updateAuthorization(_stakingProvider, _amount); | ||
} | ||
|
||
function confirmOperatorAddress(address _operator) external { | ||
confirmations[_operator] = true; | ||
} | ||
|
||
function resetConfirmation(address _operator) external { | ||
confirmations[_operator] = false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters