-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring the Makefile, optimizing env vars and making the E2E test…
… use AragonTest
- Loading branch information
Showing
8 changed files
with
300 additions
and
246 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# If deploying against a fork, pass the address of a large token holder who will be | ||
# impersonated to distribute tokens to addresses inside test cases | ||
# the whale should have >= 3000 tokens | ||
TOKEN_TEST_WHALE="0x0000000000000000000000000000000000000000" | ||
|
||
# If the factory singleton is deployed, pass the address. "Fork existing" mode will use this previously | ||
# deployed factory, and "fork deploy" will deploy a new factory instance | ||
FACTORY="0x0000000000000000000000000000000000000000" |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
^.env.example | ||
^.env.dev.example | ||
.env* | ||
|
||
# Foundry | ||
|
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: GPL-3.0-or-later | ||
pragma solidity ^0.8.17; | ||
|
||
import {IPluginSetup, PluginSetup} from "@aragon/osx/framework/plugin/setup/PluginSetup.sol"; | ||
import {DAO} from "@aragon/osx/core/dao/DAO.sol"; | ||
import {RATIO_BASE} from "@aragon/osx/plugins/utils/Ratio.sol"; | ||
import {ALICE_ADDRESS, BOB_ADDRESS, CAROL_ADDRESS, DAVID_ADDRESS, TAIKO_BRIDGE_ADDRESS} from "../constants.sol"; | ||
import {Test} from "forge-std/Test.sol"; | ||
|
||
contract AragonTest is Test { | ||
address immutable alice = ALICE_ADDRESS; | ||
address immutable bob = BOB_ADDRESS; | ||
address immutable carol = CAROL_ADDRESS; | ||
address immutable david = DAVID_ADDRESS; | ||
address immutable taikoBridge = TAIKO_BRIDGE_ADDRESS; | ||
address immutable randomWallet = vm.addr(1234567890); | ||
|
||
address immutable DAO_BASE = address(new DAO()); | ||
|
||
bytes internal constant EMPTY_BYTES = ""; | ||
|
||
constructor() { | ||
vm.label(alice, "Alice"); | ||
vm.label(bob, "Bob"); | ||
vm.label(carol, "Carol"); | ||
vm.label(david, "David"); | ||
vm.label(randomWallet, "Random wallet"); | ||
} | ||
|
||
/// @notice Returns the address and private key associated to the given name. | ||
/// @param name The name to get the address and private key for. | ||
/// @return addr The address associated with the name. | ||
/// @return pk The private key associated with the name. | ||
function getWallet(string memory name) internal returns (address addr, uint256 pk) { | ||
pk = uint256(keccak256(abi.encodePacked(name))); | ||
addr = vm.addr(pk); | ||
vm.label(addr, name); | ||
} | ||
} |
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,13 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.17; | ||
|
||
uint64 constant MAX_UINT64 = uint64(2 ** 64 - 1); | ||
address constant ADDRESS_ZERO = address(0x0); | ||
address constant NO_CONDITION = ADDRESS_ZERO; | ||
|
||
// Actors | ||
address constant ALICE_ADDRESS = address(0xa11ce); | ||
address constant BOB_ADDRESS = address(0xB0B); | ||
address constant CAROL_ADDRESS = address(0xc4601); | ||
address constant DAVID_ADDRESS = address(0xd471d); | ||
address constant TAIKO_BRIDGE_ADDRESS = address(0xb61d6e); |
Oops, something went wrong.