Skip to content
Open
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c264a07
feat: ci publishes chainservice and dependent packages
just-a-node Jan 23, 2025
250fbb6
fix: extra comma
just-a-node Jan 23, 2025
0c4dee7
fix: use publish name
just-a-node Jan 23, 2025
b14c628
feat: update publish steps
just-a-node Jan 23, 2025
88df089
fix: monorepo workspace
just-a-node Jan 23, 2025
9251a9a
feat: publish to @chimera-monorepo
just-a-node Jan 24, 2025
e0c18a4
feat: rm dependency on defi-wonderland/isolmate
just-a-node Jan 24, 2025
4242a67
Merge branch 'dev' into publish-chainservice
just-a-node Feb 12, 2025
35d660c
fix: dependency order for chainservice package
just-a-node Feb 13, 2025
bbfecc2
feat: update packages to published versions
just-a-node Feb 13, 2025
cec5150
feat: publish 0.0.1-alpha.4 chainservice on testing branch
just-a-node Feb 13, 2025
c56397f
Merge branch 'dev' into publish-chainservice
just-a-node Feb 13, 2025
d4a078e
chore: update yarn lock
just-a-node Feb 13, 2025
1589288
fix: revert dep versions of workspace packages
just-a-node Feb 13, 2025
d46cbe9
chore: update yarn lock
just-a-node Feb 13, 2025
4c66cbe
feat: bump versions and retest publishing
just-a-node Feb 13, 2025
5205c26
chore: rm testing branch in ci
just-a-node Feb 13, 2025
4bc073c
Merge branch 'dev' into feat/publish-chainservice
just-a-node Feb 24, 2025
91508fd
feat: publish chainservice with unichain, zksync
just-a-node Feb 24, 2025
18e38b6
feat: update for new chain release
just-a-node May 3, 2025
0510887
feat: bump again for build and publish
just-a-node May 3, 2025
e775b7b
Merge remote-tracking branch 'origin/dev' into fix/publish-chainservi…
harrier-lcc Jun 26, 2025
3000fd4
feat: bump chainservice, contracts, utils version to 0.0.1-alpha.9
harrier-lcc Jun 26, 2025
f1b766d
Merge pull request #209 from everclearorg/fix/publish-chainservice-de…
just-a-node Jun 26, 2025
d121f80
feat: bump versions
just-a-node Jun 26, 2025
d053275
Merge branch 'dev' into fix/publish-chainservice-with-updated-tron-pr…
otsybizov Jul 25, 2025
67dc25f
feat: bump version 11
otsybizov Jul 25, 2025
ff65e24
Merge branch 'dev' into fix/publish-chainservice-with-updated-tron-pr…
otsybizov Jul 26, 2025
9fdb47d
Merge pull request #240 from everclearorg/fix/publish-chainservice-wi…
otsybizov Jul 26, 2025
46a3763
Merge branch 'dev' into feat/publish-chainservice-dev-merge
otsybizov Aug 7, 2025
a3f993f
feat: bump version 12
otsybizov Aug 7, 2025
160d827
Merge pull request #278 from everclearorg/feat/publish-chainservice-d…
otsybizov Aug 7, 2025
d2c2373
Merge remote-tracking branch 'origin/dev' into feat/publish-chainservice
harrier-lcc Sep 22, 2025
8f294cf
feat: bump chainservice version 13
harrier-lcc Sep 22, 2025
dc220e3
feat: unlink chainservice and utils version, chainservice v14
harrier-lcc Sep 22, 2025
271d986
Merge branch 'dev' into feat/publish-chainservice-merge-dev
otsybizov Nov 28, 2025
a0bd979
feat: bump chainservice and utils versions
otsybizov Nov 28, 2025
ec86af0
Merge pull request #396 from everclearorg/feat/publish-chainservice-m…
harrier-lcc Nov 28, 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
141 changes: 141 additions & 0 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,147 @@ jobs:

- name: Install jq
run: sudo apt-get install -y jq

- name: Extract version, determine tag, and publish contracts package
if: ${{ github.ref == 'refs/heads/mainnet-prod' }}
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
workspaces=(
"packages/contracts:@chimera-monorepo/contracts"
)

for entry in "${workspaces[@]}"; do
IFS=":"; read -ra split_entry <<< "$entry"
directory="${split_entry[0]}"
workspace="${split_entry[1]}"
subpackage_version=$(cat $directory/package.json | jq -r '.version')

tag=""
if [[ "$subpackage_version" == *"-alpha"* ]]; then
tag="alpha"
elif [[ "$subpackage_version" == *"-beta"* ]]; then
tag="beta"
fi

echo "Checking $workspace for existing version..."
npm_package_info=$(npm view $workspace versions --json)

if [[ -z "$tag" ]]; then
# "stable" is not explicitly in the version name for stable releases
last_version=$(echo "$npm_package_info" | jq -r ".[] | select(test(\"-\") | not)" | tail -1)
else
# pre-release versions have the tag in the version name
base_version=$(echo "$subpackage_version" | sed 's/-.*//')
last_version=$(echo "$npm_package_info" | jq -r ".[] | select(test(\"^${base_version}-${tag}\"))" | tail -1)
fi

echo "Compare version in NPM ($last_version) against local version ($subpackage_version)"
if [[ "$last_version" != "$subpackage_version" ]]; then
echo "Publishing $workspace with version $subpackage_version"
if [[ ! -z "$tag" ]]; then
yarn workspace $workspace npm publish --access public --tag $tag
else
yarn workspace $workspace npm publish --access public
fi
else
echo "Skipping $workspace as version $subpackage_version already exists"
fi
done

- name: Extract version, determine tag, and publish utils package
if: ${{ github.ref == 'refs/heads/mainnet-prod' }}
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
workspaces=(
"packages/utils:@chimera-monorepo/utils"
)

for entry in "${workspaces[@]}"; do
IFS=":"; read -ra split_entry <<< "$entry"
directory="${split_entry[0]}"
workspace="${split_entry[1]}"
subpackage_version=$(cat $directory/package.json | jq -r '.version')

tag=""
if [[ "$subpackage_version" == *"-alpha"* ]]; then
tag="alpha"
elif [[ "$subpackage_version" == *"-beta"* ]]; then
tag="beta"
fi

echo "Checking $workspace for existing version..."
npm_package_info=$(npm view $workspace versions --json)

if [[ -z "$tag" ]]; then
# "stable" is not explicitly in the version name for stable releases
last_version=$(echo "$npm_package_info" | jq -r ".[] | select(test(\"-\") | not)" | tail -1)
else
# pre-release versions have the tag in the version name
base_version=$(echo "$subpackage_version" | sed 's/-.*//')
last_version=$(echo "$npm_package_info" | jq -r ".[] | select(test(\"^${base_version}-${tag}\"))" | tail -1)
fi

echo "Compare version in NPM ($last_version) against local version ($subpackage_version)"
if [[ "$last_version" != "$subpackage_version" ]]; then
echo "Publishing $workspace with version $subpackage_version"
if [[ ! -z "$tag" ]]; then
yarn workspace $workspace npm publish --access public --tag $tag
else
yarn workspace $workspace npm publish --access public
fi
else
echo "Skipping $workspace as version $subpackage_version already exists"
fi
done

- name: Extract version, determine tag, and publish chainservice package
if: ${{ github.ref == 'refs/heads/mainnet-prod' }}
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
workspaces=(
"packages/adapters/chainservice:@chimera-monorepo/chainservice"
)

for entry in "${workspaces[@]}"; do
IFS=":"; read -ra split_entry <<< "$entry"
directory="${split_entry[0]}"
workspace="${split_entry[1]}"
subpackage_version=$(cat $directory/package.json | jq -r '.version')

tag=""
if [[ "$subpackage_version" == *"-alpha"* ]]; then
tag="alpha"
elif [[ "$subpackage_version" == *"-beta"* ]]; then
tag="beta"
fi

echo "Checking $workspace for existing version..."
npm_package_info=$(npm view $workspace versions --json)

if [[ -z "$tag" ]]; then
# "stable" is not explicitly in the version name for stable releases
last_version=$(echo "$npm_package_info" | jq -r ".[] | select(test(\"-\") | not)" | tail -1)
else
# pre-release versions have the tag in the version name
base_version=$(echo "$subpackage_version" | sed 's/-.*//')
last_version=$(echo "$npm_package_info" | jq -r ".[] | select(test(\"^${base_version}-${tag}\"))" | tail -1)
fi

echo "Compare version in NPM ($last_version) against local version ($subpackage_version)"
if [[ "$last_version" != "$subpackage_version" ]]; then
echo "Publishing $workspace with version $subpackage_version"
if [[ ! -z "$tag" ]]; then
yarn workspace $workspace npm publish --access public --tag $tag
else
yarn workspace $workspace npm publish --access public
fi
else
echo "Skipping $workspace as version $subpackage_version already exists"
fi
done

build-and-push-relayer-image:
if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/testnet-staging' || github.ref == 'refs/heads/mainnet-staging' || github.ref == 'refs/heads/testnet-prod' || github.ref == 'refs/heads/mainnet-prod'
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,12 @@ Solidity smart contracts for the on-chain logic of the protocol. These are categ

### Utils

### Chainservice

Service for on-chain transaction submissions, reading on-chain state, and managing domains/providers.

This package is automatically deployed by the CI pipeline when its `package.json` version is updated. Because it depends on the following workspace packages, make sure their `package.json` versions are synchronized to the updated version.
- /contracts
- /utils

Dependency order: /contracts -> /utils -> /chainservice
7 changes: 6 additions & 1 deletion packages/adapters/chainservice/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chimera-monorepo/chainservice",
"version": "0.0.1",
"version": "0.0.1-alpha.5",
"description": "Chain service codebase for Everclear",
"main": "dist/index.js",
"author": "Everclear",
Expand Down Expand Up @@ -40,5 +40,10 @@
"ethers": "5.7.2",
"interval-promise": "1.4.0",
"p-queue": "6.6.2"
},
"publishConfig": {
"registry": "https://registry.npmjs.org",
"access": "public",
"name": "@chimera-monorepo/chainservice"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity >=0.8.4 <0.9.0;
import {XERC20} from '../contracts/XERC20.sol';
import {IXERC20Factory} from '../interfaces/IXERC20Factory.sol';
import {XERC20Lockbox} from '../contracts/XERC20Lockbox.sol';
import {CREATE3} from 'isolmate/utils/CREATE3.sol';
import {CREATE3} from 'solmate/src/utils/CREATE3.sol';
import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet.sol';

contract XERC20Factory is IXERC20Factory {
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/lib/xerc20/solidity/test/e2e/Common.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4 <0.9.0;

import {IERC20} from 'isolmate/interfaces/tokens/IERC20.sol';
import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
Copy link

Copilot AI Jul 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The import is switching from isolmate to OpenZeppelin, but other files are switching to solmate. Consider using a consistent library choice across the codebase for better maintainability.

Copilot uses AI. Check for mistakes.
import {Test} from 'forge-std/Test.sol';
import {XERC20} from '../../contracts/XERC20.sol';
import {XERC20Lockbox} from '../../contracts/XERC20Lockbox.sol';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {XERC20} from '../../contracts/XERC20.sol';
import {XERC20Factory} from '../../contracts/XERC20Factory.sol';
import {XERC20Lockbox} from '../../contracts/XERC20Lockbox.sol';
import {IXERC20Factory} from '../../interfaces/IXERC20Factory.sol';
import {CREATE3} from 'isolmate/utils/CREATE3.sol';
import {CREATE3} from 'solmate/src/utils/CREATE3.sol';

contract XERC20FactoryForTest is XERC20Factory {
function getDeployed(bytes32 _salt) public view returns (address _precomputedAddress) {
Expand Down
9 changes: 7 additions & 2 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chimera-monorepo/contracts",
"version": "0.0.1",
"version": "0.0.1-alpha.5",
"description": "Smart contracts for Everclear",
"homepage": "https://github.com/defi-wonderland/chimera-monorepo/packages/contracts",
"repository": {
Expand Down Expand Up @@ -81,7 +81,7 @@
"@openzeppelin/contracts": "5.0.2",
"@openzeppelin/contracts-upgradeable": "5.0.2",
"dotenv": "^16.4.5",
"isolmate": "github:defi-wonderland/isolmate#59e18043c2450fef550f1744b3705ce9ebcaf1c8",
"solmate": "^6.8.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have any idea what the difference is between the two packages?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, only used for the XERC20 contracts.

Main diff is that DW version has interfaces, the regular solmate package does not.

DW version has a package-lock.json that conflicts with CI: STDERR warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. - that's the reason it was switched out.

"ts-node": "^10.9.2",
"viem": "^2.19.8"
},
Expand All @@ -96,5 +96,10 @@
"solhint": "github:solhint-community/solhint-community#v4.0.0-rc01",
"sort-package-json": "1.53.1",
"typescript": "^5.5.4"
},
"publishConfig": {
"registry": "https://registry.npmjs.org",
"access": "public",
"name": "@chimera-monorepo/contracts"
}
}
2 changes: 1 addition & 1 deletion packages/contracts/script/deploy/Token.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity 0.8.25;

import {Script} from 'forge-std/Script.sol';
import {console} from 'forge-std/console.sol';
import {ERC20} from 'isolmate/tokens/ERC20.sol';
import {ERC20} from 'solmate/src/tokens/ERC20.sol';

interface IXERC20Factory {
function deployXERC20(
Expand Down
7 changes: 6 additions & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chimera-monorepo/utils",
"version": "0.0.1",
"version": "0.0.1-alpha.5",
"description": "Common utilities for use",
"main": "dist/index.js",
"author": "Everclear",
Expand Down Expand Up @@ -50,5 +50,10 @@
"hyperid": "3.2.0",
"secp256k1": "4.0.3",
"sinon-chai": "3.7.0"
},
"publishConfig": {
"registry": "https://registry.npmjs.org",
"access": "public",
"name": "@chimera-monorepo/utils"
}
}
Loading
Loading