Skip to content

Commit

Permalink
(test/hub): start on v1 status checks test for calculate/mint issuance
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminbollen committed Mar 22, 2024
1 parent 19eccf4 commit 2e9526c
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 14 deletions.
6 changes: 2 additions & 4 deletions test/circles/Circles.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import {Test} from "forge-std/Test.sol";
import {StdCheats} from "forge-std/StdCheats.sol";
import "forge-std/console.sol";
import "./MockCircles.sol";
import "../setup/TimeSetup.sol";
import "../setup/TimeCirclesSetup.sol";
import "../utils/Approximation.sol";

contract CirclesTest is Test, TimeSetup, Approximation {
contract CirclesTest is Test, TimeCirclesSetup, Approximation {
// Constants

uint256 public constant N = 4;
Expand All @@ -17,8 +17,6 @@ contract CirclesTest is Test, TimeSetup, Approximation {

uint256 public constant EPS = 10 ** (18 - 2);

uint256 public constant CRC = 10 ** 18;

// State variables

MockCircles public circles;
Expand Down
8 changes: 2 additions & 6 deletions test/hub/PathTransferHub.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@ pragma solidity >=0.8.13;
import {Test} from "forge-std/Test.sol";
import {StdCheats} from "forge-std/StdCheats.sol";
import "forge-std/console.sol";
import "../setup/TimeSetup.sol";
import "../setup/TimeCirclesSetup.sol";
import "../setup/HumanRegistration.sol";
import "./MockPathTransferHub.sol";
import "../../src/hub/Hub.sol";

contract HubPathTransferTest is Test, TimeSetup, HumanRegistration {
// Constants

uint256 public constant CRC = uint256(10 ** 18);

contract HubPathTransferTest is Test, TimeCirclesSetup, HumanRegistration {
// State variables

MockPathTransferHub public mockHub;
Expand Down
21 changes: 21 additions & 0 deletions test/hub/V1MintStatusUpdate.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.13;

import {Test} from "forge-std/Test.sol";
import {StdCheats} from "forge-std/StdCheats.sol";
import "../setup/TimeCirclesSetup.sol";
import "../setup/HumanRegistration.sol";

contract V1MintStatusUpdateTest is Test, TimeCirclesSetup, HumanRegistration {
// State variables

// Constructor

constructor() HumanRegistration(2) {}

// Setup

function setUp() public {
startTime();
}
}
1 change: 0 additions & 1 deletion test/migration/Migration.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ pragma solidity >=0.8.13;
import {Test} from "forge-std/Test.sol";
import {StdCheats} from "forge-std/StdCheats.sol";
import "../../src/migration/Migration.sol";
import "../setup/TimeSetup.sol";
import "./MockHub.sol";

contract MigrationTest is Test {
Expand Down
4 changes: 2 additions & 2 deletions test/setup/TimeCircleSetup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import "../../src/graph/Graph.sol";
import "../../src/circles/TimeCircle.sol";
import "../../src/circles/GroupCircle.sol";
import "../migration/MockHub.sol";
import "./TimeSetup.sol";
import "./TimeCirclesSetup.sol";

contract TimeCircleSetup is TimeSetup {
contract TimeCircleSetup is TimeCirclesSetup {
// Constants
// number of avatars in the graph
uint256 public constant N = 4;
Expand Down
6 changes: 5 additions & 1 deletion test/setup/TimeSetup.sol → test/setup/TimeCirclesSetup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ pragma solidity >=0.8.13;
import {Test} from "forge-std/Test.sol";
import {StdCheats} from "forge-std/StdCheats.sol";

contract TimeSetup is Test {
contract TimeCirclesSetup is Test {
// Constants

uint256 internal constant CRC = uint256(10 ** 18);

/**
* Arbitrary origin for counting time since 10 December 2021
* "Hope" is the thing with feathers -
Expand Down

0 comments on commit 2e9526c

Please sign in to comment.