Skip to content

Commit

Permalink
test: setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Grimal committed Oct 14, 2024
1 parent 03ab532 commit c8ade2d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
3 changes: 3 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ src = "src"
out = "out"
libs = ["lib"]

[rpc_endpoints]
mainnet = "https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}"

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
18 changes: 16 additions & 2 deletions test/MorphoToken.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ pragma solidity ^0.8.13;

import {Test, console} from "forge-std/Test.sol";
import {MorphoToken} from "../src/MorphoToken.sol";
import {Wrapper} from "../src/Wrapper.sol";
import {ERC1967Proxy} from
"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol";

// TODO: Test the following:
// - Test every paths
Expand All @@ -12,7 +15,18 @@ import {MorphoToken} from "../src/MorphoToken.sol";
// - Test voting
// - Test delegation
contract MorphoTokenTest is Test {
MorphoToken public token;
address public constant MORPHO_DAO = 0xcBa28b38103307Ec8dA98377ffF9816C164f9AFa;

function setUp() public {}
MorphoToken public tokenImplem;
MorphoToken public newMorpho;
ERC1967Proxy public tokenProxy;
Wrapper public wrapper;

function setUp() public {
tokenImplem = new MorphoToken();
tokenProxy = new ERC1967Proxy(address(tokenImplem), hex"");
wrapper = new Wrapper(address(tokenProxy));
newMorpho = MorphoToken(payable(address(tokenProxy)));
newMorpho.initialize(MORPHO_DAO, address(wrapper));
}
}

0 comments on commit c8ade2d

Please # to comment.