Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
df2c4cd
chore: create a docker image using hardhat-node
levalleux-ludo Jun 9, 2025
14e8650
fix lint
levalleux-ludo Jun 9, 2025
b3f8e05
add pull_request: on GH workflow to ru it from the PR before merging
levalleux-ludo Jun 9, 2025
2678669
change container IMAGE_NAME
levalleux-ludo Jun 9, 2025
0b9c6c3
add github.token property to attest-build-provenance step
levalleux-ludo Jun 10, 2025
bfac625
fix attest-build-provenance step ?
levalleux-ludo Jun 10, 2025
82e9f50
add push container image to Docker Hub
levalleux-ludo Jun 10, 2025
f41cf2d
adapt docker to deploy MockForwarder
levalleux-ludo Jun 10, 2025
1809b0c
add tracking file to let know when the deployment is finished
levalleux-ludo Jun 10, 2025
a93a839
Set hardhat node config to generate the appropriate accounts for the …
levalleux-ludo Jun 11, 2025
1440899
Merge branch 'main' into e2e-tests-env
levalleux-ludo Jun 12, 2025
21f1bd5
ensure the deployment environment is set to "test"
levalleux-ludo Jun 12, 2025
61e71e4
rename the container into fermion-protocol-node
levalleux-ludo Jun 12, 2025
d03054e
fix missing functions in MetaTx AllowedList
levalleux-ludo Jun 12, 2025
4fb1dbc
add deployBosonMetaTransactionFacet and deployForwarderForBosonVouche…
levalleux-ludo Jun 13, 2025
5de1d06
change the workflow trigger to submit the PR
levalleux-ludo Jun 13, 2025
1c8e7bb
pr comments
levalleux-ludo Jun 20, 2025
3e96301
Apply suggestions from code review
levalleux-ludo Jun 20, 2025
ca0e96b
reactivate the workflow on PR to test the last changes (to be reverte…
levalleux-ludo Jun 20, 2025
bc1919b
Merge branch 'e2e-tests-env' of https://github.com/fermionprotocol/co…
levalleux-ludo Jun 20, 2025
955cf32
replace tempo docker account with official fermionprotocol account
levalleux-ludo Jun 24, 2025
13b2a9d
set Boson Protocol flat fee to a non zero value
levalleux-ludo Jun 24, 2025
85f970c
Revert "set Boson Protocol flat fee to a non zero value"
levalleux-ludo Jun 24, 2025
9b839cb
remove publish the container on PR (only used for testing the PR itself)
levalleux-ludo Jun 24, 2025
b9545cb
Merge remote-tracking branch 'origin/main' into e2e-tests-env
levalleux-ludo Jun 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*.log
.github
.vscode
addresses
artifacts
audits
cache
docs
fork-tests
node_modules
test
!test/utils
typechain-types
66 changes: 66 additions & 0 deletions .github/workflows/publish-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Publish Docker image

on:
workflow_dispatch:
push:
branches:
- main

env:
GH_REGISTRY: ghcr.io
GH_IMAGE_NAME: "${{ github.repository }}/fermion-protocol-node"
DH_REGISTRY: docker.io
DH_NAMESPACE: ${{ vars.FRM_DOCKER_LOGIN }}
DH_REPOSITORY: fermion-protocol-node

jobs:
push_to_registries:
name: Push Docker image to multiple registries
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.GH_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ vars.FRM_DOCKER_LOGIN }}
password: ${{ secrets.FRM_DOCKER_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: |
${{ env.GH_REGISTRY }}/${{ env.GH_IMAGE_NAME }}
${{ env.DH_NAMESPACE }}/${{ env.DH_REPOSITORY }}

- name: Build and push Docker images
id: push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: e2e/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
with:
subject-name: ${{ env.GH_REGISTRY }}/${{ env.GH_IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
github-token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
artifacts/**/*.ts
typechain-types/**
submodules/**
submodules/**
e2e/**/*.ts
.github/**/*.yml
28 changes: 28 additions & 0 deletions e2e/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM node:20-alpine3.22
RUN apk update
RUN apk add git supervisor

WORKDIR /app

COPY yarn.lock package.json tsconfig.json ./
RUN mkdir -p ./scripts
RUN mkdir -p ./contracts/external

COPY ./scripts/postinstall.ts ./scripts

RUN yarn install

COPY ./*.* ./
COPY ./contracts ./contracts

RUN npx hardhat compile

COPY . .

COPY ./e2e/supervisord.conf /etc/supervisord.conf

EXPOSE 8545

ENV SUPERVISOR_LOG_LEVEL debug

CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
197 changes: 197 additions & 0 deletions e2e/accounts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
const ACCOUNT_1 = {
address: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
privateKey:
"0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
};

const ACCOUNT_2 = {
address: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
privateKey:
"0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d"
};

const ACCOUNT_3 = {
address: "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
privateKey:
"0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a"
};

const ACCOUNT_4 = {
address: "0x3A78DE5B3b3BdF61339f6D683ee82c5743c7b3EE",
privateKey:
"0x3486daa503dcea7b6a3a9b956d5056f86bdae71323949588a90b2b65b75cd4e9"
};

const ACCOUNT_5 = {
address: "0x130F244980978a5A46C7339DDf43176047d794Ce",
privateKey:
"0xa2e78cd4c87191e50d6a8f1610b1cf160b17216e9090dde7a92960a34c310482"
};

const ACCOUNT_6 = {
address: "0xd0182FBe7E02B95dF76b11f596beB529f18013f9",
privateKey:
"0x2538569f1fa75a09fa2b5ec61995fdc6772b8b8bcbd26c6146e62f87dfc0b3ae"
};

const ACCOUNT_7 = {
address: "0x573d92bFb23Ec56FD991E2f54267e518EFC5A9c1",
privateKey:
"0x213a02a5d190ccc5704ac9ec31a9f8ce7712e7ddba098ae1353c81d6e5046497"
};

const ACCOUNT_8 = {
address: "0x1487756254E93d00a6DCDfc40bAe757c1e99E8c0",
privateKey:
"0x8e7f74d2eac64f4610b0ff0dea351b9f0fa61f31b0d3cc188b1dc8d5f71e7622"
};

const ACCOUNT_9 = {
address: "0x7aDCcBe646B707d0E8c0a339dF5277ee006f172B",
privateKey:
"0x316b234f5fea007dcc40404188b588fb90cb9bb1e33fc163e212eab2f8565293"
};

const ACCOUNT_10 = {
address: "0x5a928D9a61d0c245362f7B41076b674C49FFd492",
privateKey:
"0xbf1bbaeabb036f080dccf9589db26471057f9dc6dcb4bfc87f08dfd2326f648d"
};

const ACCOUNT_11 = {
address: "0x85aa07b513803d30373B2FeCA308b8d1c45Ea893",
privateKey:
"0x6d677479a1304dae02ffd06656ebe408e6aaa014dca8238b3917080213117c25"
};

const ACCOUNT_12 = {
address: "0xf5bBA1aA5f84484137c2eeC6312F1993709E759B",
privateKey: "35253a0b89df66fa7c4fb98e46925f6e8804b55a80e2e1c3f22cb1b90a11567b"
};

const ACCOUNT_13 = {
address: "0xC448891cE3d85d141C43E9D95236B7C735bd74BB",
privateKey:
"0x23b745a17fdcdfcc13a8d5af456898700cd798b25ef5ef3767ae859cc8114df1"
};

const ACCOUNT_14 = {
address: "0xb8a7e554798738Bd0A94c2e2288e73f5bee65295",
privateKey:
"0x1527fa84bbd0be4ca5663856fcea5dabd3c27cd888a02ae98dc4a178326d6f2f"
};

const ACCOUNT_15 = {
address: "0x7c5F377448811512AcCE2ca1F30c1BCd351ee4f9",
privateKey:
"0xf7ac2238f7b83f16d7f584c291c495bf75d6a0abe36d3b430d0beb2a145df4fd"
};

const ACCOUNT_16 = {
address: "0x1A6F3E9397A991d8303EAEb2E0c946cBcD446CeD",
privateKey:
"0xff5845b96ad2374fd06ecd73463f650d8eef8f25d3d55879d5732bbf1442a2fa"
};

const ACCOUNT_17 = {
address: "0x25E849C81265BF725B18e468D57c2972cDc05BC6",
privateKey:
"0xa63c0f0bd32275c1953add9b41257f169d1b7fbc17ec88693e7a625ff551c28c"
};

const ACCOUNT_18 = {
address: "0x4469E247DBc8a7a7b9dA3805202A758f2F772d18",
privateKey:
"0x0492e7d36225b5998466345082a7ae3942b189792c5d348cb551ac4d91d67007"
};

const ACCOUNT_19 = {
address: "0xfCd5941c09BD0B5d33ee7296e6f11F28109746d1",
privateKey:
"0x77ee913bd97d7d31dc67188cc329bc604fe8ddf82c32168a2b5c7e37279d0537"
};

const ACCOUNT_20 = {
address: "0x1BBB3d0Ac397D8Ca62e938c69e059b7A29f44D8D",
privateKey:
"0x70f462ce30bbf0b046cec594e2c17cb7b7850397899caf4b4f1adb2c76142a5f"
};

const ACCOUNT_21 = {
address: "0x599C9b069156f89FC51E392019AeCc34d56f2Cdc",
privateKey:
"0xb360ff0a027b6c9599627235899e58b0809cc29b33b22cc5bdc615ce98f1340d"
};

const ACCOUNT_22 = {
address: "0x731d1d7Dd47602A6e929621f59bbBEb25DC61AA4",
privateKey:
"0xb37ac6d3448fa7feb090f8550036180a409e79df3cc74ac4378c7d4e8ef87414"
};

const ACCOUNT_23 = {
address: "0x985D008b3236DEa71223acA9dD3829862E3F9516",
privateKey:
"0x8430df726da16759cedbc56bfebf7b6e951e3e3e9b1a7f291749a2e211955981"
};

const ACCOUNT_24 = {
address: "0xA7Bd60dE9f1f5d838B4c4Cb97Bbc84E149258F11",
privateKey:
"0x40fec058aab032f7d099a0a476868cb77e47633172634e96f02267249f64bce1"
};

export const ACCOUNTS = [
ACCOUNT_1,
ACCOUNT_2,
ACCOUNT_3,
ACCOUNT_4,
ACCOUNT_5,
ACCOUNT_6,
ACCOUNT_7,
ACCOUNT_8,
ACCOUNT_9,
ACCOUNT_10,
ACCOUNT_11,
ACCOUNT_12,
ACCOUNT_13,
ACCOUNT_14,
ACCOUNT_15,
ACCOUNT_16,
ACCOUNT_17,
ACCOUNT_18,
ACCOUNT_19,
ACCOUNT_20,
ACCOUNT_21,
ACCOUNT_22,
ACCOUNT_23,
ACCOUNT_24
];

module.exports = {
ACCOUNTS,
ACCOUNT_1,
ACCOUNT_2,
ACCOUNT_3,
ACCOUNT_4,
ACCOUNT_5,
ACCOUNT_6,
ACCOUNT_7,
ACCOUNT_8,
ACCOUNT_9,
ACCOUNT_10,
ACCOUNT_11,
ACCOUNT_12,
ACCOUNT_13,
ACCOUNT_14,
ACCOUNT_15,
ACCOUNT_16,
ACCOUNT_17,
ACCOUNT_18,
ACCOUNT_19,
ACCOUNT_20,
ACCOUNT_21,
ACCOUNT_22,
ACCOUNT_23,
ACCOUNT_24
};
22 changes: 22 additions & 0 deletions e2e/hardhat.config-node.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import { ACCOUNTS } from "./accounts";

const config: HardhatUserConfig = {
networks: {
hardhat: {
allowUnlimitedContractSize: true,
chainId: 31337,
accounts: ACCOUNTS.map(({ privateKey }) => ({
privateKey,
balance: "1000000000000000000000000000"
})),
mining: {
auto: true,
interval: 5000
}
}
}
};

export default config;
18 changes: 18 additions & 0 deletions e2e/hardhat.config-others.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";

const config: HardhatUserConfig = {
paths: {
sources: "./other-contracts",
artifacts: "./other-contracts/artifacts"
},
solidity: {
compilers: [
{
version: "0.8.22"
}
]
}
};

export default config;
Loading
Loading