-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into feat/docs-updates
- Loading branch information
Showing
58 changed files
with
3,522 additions
and
1,336 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
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,39 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.13; | ||
|
||
import "forge-std/Script.sol"; | ||
|
||
import "../src/utils/Verifier.sol"; | ||
import "../src/utils/ECDSAOwnedDKIMRegistry.sol"; | ||
import "../src/utils/ForwardDKIMRegistry.sol"; | ||
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; | ||
|
||
contract ChangeOwners is Script { | ||
function run() external { | ||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
if (deployerPrivateKey == 0) { | ||
console.log("PRIVATE_KEY env var not set"); | ||
return; | ||
} | ||
address verifier = vm.envOr("VERIFIER", address(0)); | ||
address ecdsaDkim = vm.envOr("ECDSA_DKIM", address(0)); | ||
address dkim = vm.envOr("DKIM", address(0)); | ||
address newOwner = vm.envAddress("NEW_OWNER"); | ||
if (newOwner == address(0)) { | ||
console.log("NEW_OWNER env var not set"); | ||
return; | ||
} | ||
|
||
vm.startBroadcast(deployerPrivateKey); | ||
if (verifier != address(0)) { | ||
OwnableUpgradeable(verifier).transferOwnership(newOwner); | ||
} | ||
if (ecdsaDkim != address(0)) { | ||
OwnableUpgradeable(ecdsaDkim).transferOwnership(newOwner); | ||
} | ||
if (dkim != address(0)) { | ||
OwnableUpgradeable(dkim).transferOwnership(newOwner); | ||
} | ||
vm.stopBroadcast(); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
packages/contracts/script/ChangeSignerInECDSAOwnedDKIMRegistry.s.sol
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,32 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.13; | ||
|
||
import "forge-std/Script.sol"; | ||
|
||
import {ECDSAOwnedDKIMRegistry} from "../src/utils/ECDSAOwnedDKIMRegistry.sol"; | ||
|
||
contract ChangeSigner is Script { | ||
function run() external { | ||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
if (deployerPrivateKey == 0) { | ||
console.log("PRIVATE_KEY env var not set"); | ||
return; | ||
} | ||
address ecdsaDkimAddr = vm.envAddress("ECDSA_DKIM"); | ||
if (ecdsaDkimAddr == address(0)) { | ||
console.log("ECDSA_DKIM env var not set"); | ||
return; | ||
} | ||
address newSigner = vm.envAddress("NEW_SIGNER"); | ||
if (newSigner == address(0)) { | ||
console.log("NEW_SIGNER env var not set"); | ||
return; | ||
} | ||
vm.startBroadcast(deployerPrivateKey); | ||
ECDSAOwnedDKIMRegistry ecdsaDkim = ECDSAOwnedDKIMRegistry( | ||
ecdsaDkimAddr | ||
); | ||
ecdsaDkim.changeSigner(newSigner); | ||
vm.stopBroadcast(); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
packages/contracts/script/ChangeSourceInForwardDKIMRegistry.s.sol
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: UNLICENSED | ||
pragma solidity ^0.8.13; | ||
|
||
import "forge-std/Script.sol"; | ||
|
||
import "../src/utils/ForwardDKIMRegistry.sol"; | ||
|
||
contract ChangeSource is Script { | ||
function run() external { | ||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
if (deployerPrivateKey == 0) { | ||
console.log("PRIVATE_KEY env var not set"); | ||
return; | ||
} | ||
address dkimAddr = vm.envAddress("DKIM"); | ||
if (dkimAddr == address(0)) { | ||
console.log("DKIM env var not set"); | ||
return; | ||
} | ||
address newSource = vm.envAddress("NEW_SOURCE"); | ||
if (newSource == address(0)) { | ||
console.log("NEW_SOURCE env var not set"); | ||
return; | ||
} | ||
vm.startBroadcast(deployerPrivateKey); | ||
ForwardDKIMRegistry dkim = ForwardDKIMRegistry(dkimAddr); | ||
dkim.changeSourceDKIMRegistry(newSource); | ||
vm.stopBroadcast(); | ||
} | ||
} |
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
Oops, something went wrong.