Added readme and improved deployment script
This commit is contained in:
parent
a19e691cea
commit
7e003575f1
@ -12,5 +12,50 @@ yarn
|
||||
|
||||
In the zero ex folder
|
||||
```
|
||||
git submodule update --init --recursive
|
||||
foundryup
|
||||
```
|
||||
|
||||
If you have issues with VS code and the deploy script, try opening only this zero-ex folder.
|
||||
|
||||
3. Config
|
||||
|
||||
- Add your private key in a new .env file (PRIVATE_KEY)
|
||||
- Update constants in the deployment script
|
||||
- Comment the transfer ownership if you are in a test network
|
||||
|
||||
4. Running the script
|
||||
|
||||
```
|
||||
forge script scripts/deployment.s.sol --rpc-url https://muster-anytrust.alt.technology --broadcast -vvvv --slow
|
||||
forge script scripts/deployment.s.sol --rpc-url https://rpc-amoy.polygon.technology --broadcast -vvvv --slow -g 200
|
||||
```
|
||||
|
||||
|
||||
# Networks configs
|
||||
|
||||
## Amoy
|
||||
|
||||
WETH: 0x18292606c7e2eEB8A9459DB1A44157679E7338b6
|
||||
Deployer: 0x6e76Fdca84343Fc83DeF060CeA85c7Ab790189d8
|
||||
RPC: https://rpc-amoy.polygon.technology
|
||||
|
||||
Command:
|
||||
```
|
||||
forge script scripts/deployment.s.sol --rpc-url https://rpc-amoy.polygon.technology --broadcast -vvvv --slow --legacy --with-gas-price 40000000000
|
||||
```
|
||||
|
||||
Result: 0xcc72984b2ab10a2311dd82986a57823da6c59662
|
||||
|
||||
## Artbitrum Sepolia
|
||||
|
||||
WETH: 0x980B62Da83eFf3D4576C647993b0c1D7faf17c73
|
||||
Deployer: 0x6e76Fdca84343Fc83DeF060CeA85c7Ab790189d8
|
||||
RPC: https://public.stackup.sh/api/v1/node/arbitrum-sepolia
|
||||
|
||||
Command:
|
||||
```
|
||||
forge script scripts/deployment.s.sol --rpc-url https://public.stackup.sh/api/v1/node/arbitrum-sepolia --broadcast -vvvv --slow
|
||||
```
|
||||
|
||||
Result: 0xdd1de4ff6f558f21ac1a892923999fed87423560
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -14,17 +14,21 @@ import "forge-std/console.sol";
|
||||
|
||||
|
||||
|
||||
|
||||
contract Deployement is Script {
|
||||
|
||||
address constant WETH = address(0x980B62Da83eFf3D4576C647993b0c1D7faf17c73);
|
||||
address constant DEPLOYER = address(0x6e76Fdca84343Fc83DeF060CeA85c7Ab790189d8);
|
||||
address constant ZERO_EX_OWNER = address(0xE3198781E730e0E46D6b4Be7Ce09812B29c99233);
|
||||
|
||||
function run() external {
|
||||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
|
||||
vm.startBroadcast(deployerPrivateKey);
|
||||
|
||||
IEtherToken weth = IEtherToken(
|
||||
address(0x869Bf8814d77106323745758135b999D34C79a87)
|
||||
);
|
||||
IEtherToken weth = IEtherToken(WETH);
|
||||
|
||||
InitialMigration initMigration = new InitialMigration(
|
||||
address(0xF851b22255d30FA024433AAd8c9c0d32De413159)
|
||||
DEPLOYER
|
||||
);
|
||||
ZeroEx zeroEx = new ZeroEx(address(initMigration));
|
||||
|
||||
@ -39,7 +43,7 @@ contract Deployement is Script {
|
||||
);
|
||||
|
||||
initMigration.initializeZeroEx(
|
||||
payable(address(0xF851b22255d30FA024433AAd8c9c0d32De413159)),
|
||||
payable(DEPLOYER),
|
||||
zeroEx,
|
||||
InitialMigration.BootstrapFeatures({
|
||||
registry: simpleFunc,
|
||||
@ -50,15 +54,15 @@ contract Deployement is Script {
|
||||
IZERO_EX.migrate(
|
||||
address(erc721Feat),
|
||||
abi.encodeWithSelector(0x8fd3ab80),
|
||||
address(0xF851b22255d30FA024433AAd8c9c0d32De413159)
|
||||
DEPLOYER
|
||||
);
|
||||
|
||||
IZERO_EX.extend(0x01ffc9a7, address(erc165));
|
||||
|
||||
IZERO_EX.transferOwnership(
|
||||
address(0xE3198781E730e0E46D6b4Be7Ce09812B29c99233)
|
||||
);
|
||||
console.log(IZERO_EX.owner());
|
||||
// IZERO_EX.transferOwnership(
|
||||
// ZERO_EX_OWNER
|
||||
// );
|
||||
// console.log(IZERO_EX.owner());
|
||||
|
||||
vm.stopBroadcast();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user