-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
56 changed files
with
187 additions
and
110 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >=0.8.0 <=0.9.0; | ||
|
||
import { Script } from "@dev/forge-std/Script.sol"; | ||
|
||
abstract contract EthernautScript is Script { | ||
/// @dev Included to enable compilation of the script without a $MNEMONIC environment variable. | ||
string internal constant TEST_MNEMONIC = "test test test test test test test test test test test junk"; | ||
|
||
/// @dev Needed for the deterministic deployments. | ||
bytes32 internal constant ZERO_SALT = bytes32(0); | ||
|
||
/// @dev The address of the transaction broadcaster. | ||
address internal broadcaster; | ||
|
||
/// @dev Used to derive the broadcaster's address if $ETH_FROM is not defined. | ||
string internal mnemonic; | ||
uint256 internal mnemonicAccountIndex; | ||
|
||
/// @dev Initializes the transaction broadcaster like this: | ||
/// | ||
/// - If $ETH_FROM is defined, use it. | ||
/// - Otherwise, derive the broadcaster address from $MNEMONIC. | ||
/// - If $MNEMONIC is not defined, default to a test mnemonic. | ||
/// | ||
/// The use case for $ETH_FROM is to specify the broadcaster key and its address via the command line. | ||
constructor() { | ||
address from = vm.envOr({ name: "ETH_FROM", defaultValue: address(0) }); | ||
if (from != address(0)) { | ||
broadcaster = from; | ||
} else { | ||
mnemonic = vm.envOr({ name: "MNEMONIC_DEV", defaultValue: TEST_MNEMONIC }); | ||
mnemonicAccountIndex = vm.envOr({ name: "MNEMONIC_ACCOUNT_INDEX", defaultValue: uint256(0) }); | ||
// (broadcaster,) = deriveRememberKey({ mnemonic: mnemonic, index: uint32(mnemonicAccountIndex) }); | ||
} | ||
} | ||
|
||
modifier broadcast() { | ||
vm.startBroadcast(broadcaster); | ||
_; | ||
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
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
Submodule contracts-ccip
deleted from
8f6b61
Submodule safe-contracts
deleted from
810fad
Submodule safe-contracts-v1.3.0
deleted from
186a21
Submodule contracts-upgradeable
deleted from
9610f7
Submodule contracts-upgradeable-v4.7.1
deleted from
5e9bcc
Submodule contracts-v4.7.1
deleted from
3b8b4b
Submodule contracts-v4.7.3
deleted from
ecd2ca
Submodule v2-periphery
deleted from
0335e8
Submodule v3-periphery
deleted from
697c24
Submodule v4-periphery
deleted from
581d96
Submodule aave-v3-core
deleted from
6070e8
Submodule aave-v3-periphery
deleted from
72fdcc
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,44 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >=0.8.0 <=0.9.0; | ||
|
||
import { Script } from "@dev/forge-std/Script.sol"; | ||
|
||
abstract contract EthernautScript is Script { | ||
/// @dev Included to enable compilation of the script without a $MNEMONIC environment variable. | ||
string internal constant TEST_MNEMONIC = "test test test test test test test test test test test junk"; | ||
|
||
/// @dev Needed for the deterministic deployments. | ||
bytes32 internal constant ZERO_SALT = bytes32(0); | ||
|
||
/// @dev The address of the transaction broadcaster. | ||
address internal broadcaster; | ||
|
||
/// @dev Used to derive the broadcaster's address if $ETH_FROM is not defined. | ||
string internal mnemonic; | ||
uint256 internal mnemonicAccountIndex; | ||
|
||
/// @dev Initializes the transaction broadcaster like this: | ||
/// | ||
/// - If $ETH_FROM is defined, use it. | ||
/// - Otherwise, derive the broadcaster address from $MNEMONIC. | ||
/// - If $MNEMONIC is not defined, default to a test mnemonic. | ||
/// | ||
/// The use case for $ETH_FROM is to specify the broadcaster key and its address via the command line. | ||
constructor() { | ||
address from = vm.envOr({ name: "ETH_FROM", defaultValue: address(0) }); | ||
if (from != address(0)) { | ||
broadcaster = from; | ||
} else { | ||
mnemonic = vm.envOr({ name: "MNEMONIC_DEV", defaultValue: TEST_MNEMONIC }); | ||
mnemonicAccountIndex = vm.envOr({ name: "MNEMONIC_ACCOUNT_INDEX", defaultValue: uint256(0) }); | ||
// uint256 privateKey = vm.deriveKey(mnemonic, uint32(mnemonicAccountIndex)); | ||
broadcaster = vm.addr(vm.deriveKey(mnemonic, uint32(mnemonicAccountIndex))); | ||
} | ||
} | ||
|
||
modifier broadcast() { | ||
vm.startBroadcast(0x7Dd8A1d5C63DB4fDF4C1A303566601158B6EbBA6); | ||
_; | ||
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
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
Oops, something went wrong.