-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy v1 Factory and Implementation #66
Changes from all commits
7dc6000
d271f25
b214501
9ad8a21
6551112
5afb75b
b5e8ddd
5d4dace
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.13; | ||
|
||
import {Script, console2} from "forge-std/Script.sol"; | ||
import {SafeSingletonDeployer} from "safe-singleton-deployer-sol/src/SafeSingletonDeployer.sol"; | ||
|
||
import {CoinbaseSmartWallet, CoinbaseSmartWalletFactory} from "../src/CoinbaseSmartWalletFactory.sol"; | ||
|
||
contract DeployFactoryScript is Script { | ||
address constant EXPECTED_IMPLEMENTATION = 0x000100abaad02f1cfC8Bbe32bD5a564817339E72; | ||
address constant EXPECTED_FACTORY = 0x0BA5ED0c6AA8c49038F819E587E2633c4A9F428a; | ||
|
||
function run() public { | ||
console2.log("Deploying on chain ID", block.chainid); | ||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
address implementation = SafeSingletonDeployer.broadcastDeploy({ | ||
deployerPrivateKey: deployerPrivateKey, | ||
creationCode: type(CoinbaseSmartWallet).creationCode, | ||
args: "", | ||
salt: 0x3438ae5ce1ff7750c1e09c4b28e2a04525da412f91561eb5b57729977f591fbb | ||
}); | ||
console2.log("implementation", implementation); | ||
assert(implementation == EXPECTED_IMPLEMENTATION); | ||
address factory = SafeSingletonDeployer.broadcastDeploy({ | ||
deployerPrivateKey: deployerPrivateKey, | ||
creationCode: type(CoinbaseSmartWalletFactory).creationCode, | ||
args: abi.encode(implementation), | ||
salt: 0x278d06dab87f67bb2d83470a70c8975a2c99872f290058fb43bcc47da5f0390c | ||
}); | ||
console2.log("factory", factory); | ||
assert(factory == EXPECTED_FACTORY); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's find a better fix later for noisy fuzz tests