Skip to content

Commit a749487

Browse files
committed
feat(claimOwnership): adding two script to claim ownership of tokenfrontend & token And BlacklistValidator
1 parent ee16225 commit a749487

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// SPDX-License-Identifier: UNLICENSED
2+
pragma solidity ^0.8.20;
3+
4+
import "forge-std/Script.sol";
5+
import "../src/BlacklistValidatorUpgradeable.sol";
6+
7+
8+
contract All is Script {
9+
function run() external {
10+
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
11+
address Address = vm.envAddress("ADDRESS");
12+
13+
vm.startBroadcast(deployerPrivateKey);
14+
15+
16+
// Assuming Token and SmartController are already deployed and their ABIs are known
17+
BlacklistValidatorUpgradeable validator = BlacklistValidatorUpgradeable(Address);
18+
19+
validator.acceptOwnership();
20+
vm.stopBroadcast();
21+
}
22+
}
23+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// SPDX-License-Identifier: UNLICENSED
2+
pragma solidity ^0.8.20;
3+
4+
import "forge-std/Script.sol";
5+
import "../src/ControllerToken.sol";
6+
import "../src/BlacklistValidatorUpgradeable.sol";
7+
import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
8+
import "../src/tests/tokenfrontend.sol";
9+
10+
11+
contract All is Script {
12+
function run() external {
13+
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
14+
address tokenAddress = vm.envAddress("TOKEN_ADDRESS");
15+
16+
vm.startBroadcast(deployerPrivateKey);
17+
console.log("Configuring with Token:");//, tokenAddress, "System:", system, "Admin:", admin, "Allowance:", allowance);
18+
19+
20+
// Assuming Token and SmartController are already deployed and their ABIs are known
21+
ControllerToken token = ControllerToken(tokenAddress);
22+
TokenFrontend frontend = TokenFrontend(token.getFrontend());
23+
24+
token.acceptOwnership();
25+
frontend.claimOwnership();
26+
vm.stopBroadcast();
27+
}
28+
}
29+

0 commit comments

Comments
 (0)