Skip to content

Commit

Permalink
Merge branch 'dev' into feature-trusted-macros
Browse files Browse the repository at this point in the history
  • Loading branch information
hellwolf authored Feb 12, 2024
2 parents 49f677c + 6d74a1c commit 7688d4e
Show file tree
Hide file tree
Showing 198 changed files with 14,028 additions and 8,144 deletions.
16 changes: 9 additions & 7 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-18-bookworm",
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bookworm",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
// If having issues with Nix then consult:
Expand All @@ -21,19 +21,21 @@
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers-contrib/features/act:1": {}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// 1. using nix to create a reproduciable build
// 2. install foundry for people don't want to use nix
// 3. if you want to use nix further, do "nix develop"
"postCreateCommand": "./tasks/fix-devcontainer.sh && nix develop . -c bash <(echo \"yarn install && yarn build\") && curl -L https://foundry.paradigm.xyz | bash & foundryup"

"postCreateCommand": [
"curl -L https://foundry.paradigm.xyz | bash",
"source /home/node/.bashrc && foundryup",
"yarn global add npm-run-all",
"yarn install && yarn build",
"./tasks/fix-devcontainer.sh && nix develop . -c bash <(echo \"yarn install && yarn build\")"
]
// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
}
4 changes: 2 additions & 2 deletions .github/workflows/call.test-ethereum-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
working-directory: ./packages/ethereum-contracts
env:
HARDHAT_TEST_JOBS: 4
HARDHAT_RUN_PARALLEL: true
HARDHAT_RUN_PARALLEL: 1

########################################
## Coverage Test
Expand All @@ -104,7 +104,7 @@ jobs:
NODE_OPTIONS: --max_old_space_size=4096
IS_COVERAGE_TEST: true
HARDHAT_TEST_JOBS: 2
HARDHAT_RUN_PARALLEL: false
HARDHAT_RUN_PARALLEL: 0

- name: Clean up and merge coverage artifacts
if: inputs.run-coverage-tests == true
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/call.test-hot-fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ jobs:
echidna --version
- name: Run Yarn Install
run: yarn install
run: |
yarn install
- name: Run tests
run: |
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/call.test-local-subgraph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ jobs:
npx tsc --version
- name: "Build contracts"
run: yarn build
run: |
yarn lint
yarn build
working-directory: ./packages/ethereum-contracts

- name: "Build"
run: npx ts-node scripts/buildNetworkConfig.ts polygon-mainnet
working-directory: ${{ env.subgraph-working-directory }}
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/call.test-sdk-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ jobs:
run: yarn install --frozen-lockfile

- name: "Build contracts"
run: yarn build
run: |
yarn lint
yarn build
working-directory: ${{ env.ethereum-contracts-working-directory }}

- name: "Start hardhat node"
Expand All @@ -49,7 +51,9 @@ jobs:

- name: "Build SDK-Core"
# build sdk-core because of auto linking to dependency
run: yarn build
run: |
yarn lint
yarn build
working-directory: ${{ env.sdk-core-working-directory }}

- name: "Deploy Framework and Tokens"
Expand Down
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
flake-utils.lib.eachDefaultSystem (system:
let
minDevSolcVer = "solc_0_8_11"; # minimum solidity version used for external development
solcVer = "solc_0_8_19";
solcVer = "solc_0_8_23";
ghcVer92 = "ghc928";
ghcVer94 = "ghc945";
ghcVer94 = "ghc948";

pkgs = import nixpkgs {
inherit system;
Expand Down Expand Up @@ -85,7 +85,7 @@
hlint
stylish-haskell
# sage math
# sage # TODO: https://github.com/NixOS/nixpkgs/issues/282383#issuecomment-1902660815
sage
# testing tooling
gnuplot
# yellowpaper pipeline tooling
Expand Down
45 changes: 22 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@
"npmClient": "yarn",
"license": "MIT",
"scripts": {
"prepare": "yarn git:submodule:init",
"git:submodule:init": "git submodule update --init --recursive",
"git:submodule:update": "git submodule update --recursive",
"git:submodule:sync": "git submodule update --remote --recursive;git submodule sync --recursive",
"git:submodule:deinit": "git submodule deinit --all --force",
"postinstall": "yarn git-submodule:init && husky install",
"lint": "run-s lint:*",
"lint:shellcheck": "tasks/shellcheck-all-tasks.sh",
"lint:workspaces": "yarn workspaces run lint",
Expand All @@ -23,17 +19,20 @@
"build-for-contracts-dev": "set -ex;for i in metadata ethereum-contracts js-sdk;do yarn workspace @superfluid-finance/$i build;done",
"clean": "rm -rf node_modules; rm -rf packages/*/node_modules; yarn workspace @superfluid-finance/ethereum-contracts clean",
"test": "set -ex;for i in ethereum-contracts;do yarn workspace @superfluid-finance/$i test;done",
"manage-versions": "lerna version --exact --no-git-tag-version --preid rc",
"check-updates": "run-s check-updates:*",
"check-updates:root": "ncu --target minor --dep dev -u",
"check-updates:workspaces": "yarn workspaces run check-updates -u",
"show-versions": "lerna ls --long",
"postinstall": "husky install",
"pre-commit": "yarn lint:shellcheck && yarn workspaces run pre-commit",
"git-submodule:init": "git submodule update --init --recursive",
"git-submodule:update": "git submodule update --recursive",
"git-submodule:sync": "git submodule update --remote --recursive;git submodule sync --recursive",
"git-submodule:deinit": "git submodule deinit --all --force",
"check-updates": "run-s check-updates:*",
"check-updates:root": "ncu --target minor --dep dev",
"check-updates:workspaces": "yarn workspaces run check-updates",
"shell": "nix develop",
"shell:spec": "nix develop .#spec",
"shell:whitehat": "nix develop .#whitehat",
"shell:full": "nix develop .#full"
"shell:full": "nix develop .#full",
"manage-versions": "lerna version --exact --no-git-tag-version --preid rc"
},
"devDependencies": {
"@nomicfoundation/hardhat-chai-matchers": "^1.0.6",
Expand All @@ -46,34 +45,34 @@
"@typechain/hardhat": "^8.0.3",
"@types/lodash": "^4.14.202",
"@types/mocha": "^10.0.6",
"@typescript-eslint/eslint-plugin": "^6.18.1",
"@typescript-eslint/parser": "^6.18.1",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"cloc": "^2.11.0",
"copyfiles": "^2.4.1",
"dotenv": "^16.3.1",
"dotenv": "^16.4.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.2",
"hardhat": "^2.19.4",
"hardhat-deploy": "^0.11.37",
"eslint-plugin-prettier": "^5.1.3",
"hardhat": "^2.19.5",
"hardhat-deploy": "^0.11.45",
"husky": "^8.0.3",
"lerna": "^7.3.0",
"node-jq": "^4.2.2",
"nodemon": "^3.0.2",
"lerna": "^7.4.2",
"node-jq": "^4.3.0",
"nodemon": "^3.0.3",
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
"prettier": "^3.1.1",
"prettier": "^3.2.5",
"prettier-eslint": "^15.0.1",
"solhint": "3.6.2",
"syncpack": "^10.9.3",
"truffle": "^5.11.5",
"ts-node": "^10.9.2",
"typechain": "^8.3.2",
"typedoc": "^0.25.6",
"typedoc": "^0.25.7",
"typescript": "^5.3.3",
"web3": "^1.10.2"
"web3": "^1.10.4"
},
"resolutions": {
"mocha": "^10.2.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/automation-contracts/autowrap/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
root = '../../../'
libs = ['lib']
src = 'packages/automation-contracts/autowrap'
solc_version = "0.8.19"
solc_version = "0.8.23"
remappings = [
'@superfluid-finance/solidity-semantic-money/src/=packages/solidity-semantic-money/src/',
'@superfluid-finance/ethereum-contracts/=packages/ethereum-contracts/',
Expand Down
2 changes: 1 addition & 1 deletion packages/automation-contracts/autowrap/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require("./script/addStrategy");
*/
module.exports = {
solidity: {
version: "0.8.19",
version: "0.8.23",
settings: {
optimizer: {
enabled: true,
Expand Down
4 changes: 2 additions & 2 deletions packages/automation-contracts/autowrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"check-updates": "ncu --target minor"
},
"dependencies": {
"@openzeppelin/contracts": "4.9.3",
"@openzeppelin/contracts": "4.9.5",
"@superfluid-finance/ethereum-contracts": "1.9.0",
"@superfluid-finance/metadata": "1.1.23"
"@superfluid-finance/metadata": "1.1.27"
}
}
2 changes: 1 addition & 1 deletion packages/automation-contracts/scheduler/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
root = '../../../'
libs = ['lib']
src = 'packages/automation-contracts/scheduler'
solc_version = "0.8.19"
solc_version = "0.8.23"
remappings = [
'@superfluid-finance/solidity-semantic-money/src/=packages/solidity-semantic-money/src/',
'@superfluid-finance/ethereum-contracts/=packages/ethereum-contracts/',
Expand Down
2 changes: 1 addition & 1 deletion packages/automation-contracts/scheduler/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require("hardhat/config");
*/
module.exports = {
solidity: {
version: "0.8.19",
version: "0.8.23",
settings: {
optimizer: {
enabled: true,
Expand Down
4 changes: 2 additions & 2 deletions packages/automation-contracts/scheduler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"check-updates": "ncu --target minor"
},
"dependencies": {
"@openzeppelin/contracts": "4.9.3",
"@openzeppelin/contracts": "4.9.5",
"@superfluid-finance/ethereum-contracts": "1.9.0",
"@superfluid-finance/metadata": "1.1.23"
"@superfluid-finance/metadata": "1.1.27"
}
}
6 changes: 6 additions & 0 deletions packages/ethereum-contracts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

- New utility: TrustedMacrosVanilla trusted forwarder.

### Changed

- bump solc to 0.8.23


## [v1.9.0] - 2024-01-09

### Breaking
Expand Down Expand Up @@ -45,6 +50,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

### Fixes
- [`dev-scripts/deploy-test-framework.js`](dev-scripts/deploy-test-framework.js) compatible with both ethers-v5 and ethers-v6 now
- `distribute` and `distributeWithCtx` API made consistent

## [v1.8.1] - 2023-08-28

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,19 @@ Use `git diff 4ece1a3f4aff8b5a9cbf37118d261023960c0f0f.. packages/ethereum-contr
- `PoolConnectionUpdated` event only emitted if the connection was changed

### SuperfluidPool
The method for obtaining timestamps and checking member connections is updated to use Superfluid framework methods instead of Ethereum's native functionalities.
The method for obtaining timestamps and checking member connections is updated to use Superfluid framework methods instead of Ethereum's native functionalities.

### SuperfluidPoolPlaceholder
- A contract to be used on the first deployment (upgrade case) of the GDA to prevent circular dependency between GDA and SuperfluidPool

### SuperfluidGovernanceBase
- `updatePoolBeaconLogic` added for updating the pool beacon logic

### Superfluid
- `updatePoolBeaconLogic` added for updating the pool beacon logic (to be called via Governance)

### SafeGasLibrary
- `gasleft() <= gasLeftBefore / 63` => `gasleft() <= gasLeftBefore / 64` per the recommendation from the audit

### NFT Contracts
- Agreements passed to the constructor due to issues that we ran into during the deployment process
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: AGPLv3
pragma solidity 0.8.19;
pragma solidity 0.8.23;

import { UUPSProxiable } from "../upgradability/UUPSProxiable.sol";
import { ISuperAgreement } from "../interfaces/superfluid/ISuperAgreement.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: AGPLv3
pragma solidity 0.8.19;
pragma solidity 0.8.23;

import {
ISuperfluid,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: AGPLv3
pragma solidity 0.8.19;
pragma solidity 0.8.23;

import {
ISuperfluid,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: AGPLv3
pragma solidity 0.8.19;
pragma solidity 0.8.23;

import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol";

Expand Down
Loading

0 comments on commit 7688d4e

Please sign in to comment.