diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 09880b1..91bcba0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,11 @@ name: test -on: workflow_dispatch +on: + push: + branches: [ master, develop ] + pull_request: + branches: [ master, develop ] + workflow_dispatch: env: FOUNDRY_PROFILE: ci @@ -22,6 +27,11 @@ jobs: with: version: nightly + - name: Check Code Formatting + run: | + forge fmt --check + id: formatting + - name: Run Forge build run: | forge --version diff --git a/src/circles/TemporalDiscount.sol b/src/circles/TemporalDiscount.sol index 0debe3b..0a6e7a5 100644 --- a/src/circles/TemporalDiscount.sol +++ b/src/circles/TemporalDiscount.sol @@ -34,7 +34,7 @@ contract TemporalDiscount is IERC20 { /** * Store the signed 128-bit 64.64 representation of 1 as a constant */ - int128 internal constant ONE_64x64 = int128(2**64); + int128 internal constant ONE_64x64 = int128(2 ** 64); /** * Reduction factor gamma for temporally discounting balances @@ -249,7 +249,6 @@ contract TemporalDiscount is IERC20 { // and update the timespan in which we updated the balance. balanceTimeSpans[_owner] = _currentSpan; - // emit DiscountCost only when effectively discounted. // if the original balance was zero before adding, // discount cost can still be zero, even when discounted diff --git a/test/graph/Graph.t.sol b/test/graph/Graph.t.sol index 0ef3deb..0b5491a 100644 --- a/test/graph/Graph.t.sol +++ b/test/graph/Graph.t.sol @@ -7,7 +7,7 @@ import "../../src/graph/Graph.sol"; import "../../src/graph/ICircleNode.sol"; import "../../src/circles/TimeCircle.sol"; import "../../src/circles/GroupCircle.sol"; -import "./MockHubV1.sol"; +import "./MockHub.sol"; import "./MockInternalGraph.sol"; contract GraphTest is Test { diff --git a/test/graph/GraphPathTransfer.t.sol b/test/graph/GraphPathTransfer.t.sol index 7c0ec5e..9c22091 100644 --- a/test/graph/GraphPathTransfer.t.sol +++ b/test/graph/GraphPathTransfer.t.sol @@ -8,7 +8,7 @@ import "../../src/graph/ICircleNode.sol"; import "../../src/circles/TimeCircle.sol"; import "../../src/circles/GroupCircle.sol"; import "../setup/TimeSetup.sol"; -import "./MockHubV1.sol"; +import "./MockHub.sol"; contract GraphPathTransferTest is Test, TimeSetup { // Constant diff --git a/test/graph/MockHubv1.sol b/test/graph/MockHub.sol similarity index 100% rename from test/graph/MockHubv1.sol rename to test/graph/MockHub.sol