Skip to content

Commit

Permalink
Merge branch 'master' into fix/rfq-refunder [goreleaser]
Browse files Browse the repository at this point in the history
  • Loading branch information
trajan0x committed Jul 5, 2024
2 parents b62cb02 + 9916a14 commit 97b4106
Show file tree
Hide file tree
Showing 35 changed files with 297 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
- name: Install Go
if: ${{ matrix.language == 'go' }}
uses: actions/setup-go@v4
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
submodules: 'recursive'

- name: Go modules cache
Expand Down Expand Up @@ -259,7 +259,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
- name: Install Go
uses: actions/setup-go@v4
with:
Expand Down Expand Up @@ -379,7 +379,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
submodules: 'recursive'

- name: Setup NodeJS
Expand Down Expand Up @@ -474,7 +474,7 @@ jobs:
- uses: actions/checkout@v4
if: ${{ contains(fromJson(needs.pr_metadata.outputs.labels), format('needs-go-generate-{0}', matrix.package)) }}
with:
fetch-depth: 1
fetch-depth: 2
- name: Remove Label
if: ${{ contains(fromJson(needs.pr_metadata.outputs.labels), format('needs-go-generate-{0}', matrix.package)) }}
uses: ./.github/actions/remove-label
Expand All @@ -496,7 +496,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
submodules: 'recursive'

- name: Setup NodeJS
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lerna.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
- name: 'Version and publish' # Interesting step
env:
GH_TOKEN: ${{ secrets.LERNA_FGPAT }}
CODECOV_TOKEN: ${{ secrets.CODECOV }}
GH_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}

# branch is protected so this must be an admin token, this will expire on 03/01/2024
# replacement should be done by a service account with a fine-grained personal access token
run: |
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
submodules: 'recursive'

- name: Setup NodeJS
Expand All @@ -40,6 +40,7 @@ jobs:

- name: Run tests # Run tests of all packages
run: npx lerna exec npm run ci:lint --parallel

test:
runs-on: ubuntu-latest
env:
Expand All @@ -49,12 +50,18 @@ jobs:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
submodules: 'recursive'

- name: Setup NodeJS
uses: ./.github/actions/setup-nodejs

# Foundry is required for build
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Verify Changed files
uses: tj-actions/[email protected]
id: verify-yarn-lock
Expand Down Expand Up @@ -97,3 +104,9 @@ jobs:
files: lcov.info
attempt_limit: 5
attempt_delay: 30000

- name: Run build # Run tests of all packages
run: npx lerna exec npm run build --parallel || true # only for codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV }}
GH_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
2 changes: 1 addition & 1 deletion .github/workflows/solidity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
if: ${{ matrix.package != 'solidity-devops' }}
uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
submodules: 'recursive'

- name: Setup NodeJS
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ui-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,18 @@ jobs:
export DEPLOY_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})
echo "DEPLOY_URL=$DEPLOY_URL" >> $GITHUB_ENV
echo "::set-output name=url::$DEPLOY_URL"
env:
CODECOV_TOKEN: ${{ secrets.CODECOV }}
GH_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
- name: Deploy to Vercel (Output Prod)
if: ${{ format('refs/heads/{0}', github.event.repository.default_branch) == github.ref }}
run: |
vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
vercel build --token=${{ secrets.VERCEL_TOKEN }} --prod
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} --prod
env:
CODECOV_TOKEN: ${{ secrets.CODECOV }}
GH_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}

- name: Update PR Description
if: ${{ github.event_name == 'pull_request' && format('refs/heads/{0}', github.event.repository.default_branch) != github.ref }}
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,3 +285,7 @@ func TestEventDBSuite(t *testing.T) {
}

```

## Github Actions

If you want to do a shallow clone, use `fetch-depth: 2` rather than `fetch-depth: 1`. This allows [some actions](https://docs.codecov.com/docs/environment-specific-requirements) (though not all of them) to determine the correct sha.
8 changes: 8 additions & 0 deletions docs/bridge/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.1.5](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-07-03)

**Note:** Version bump only for package @synapsecns/bridge-docs





## [0.1.4](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-06-27)

**Note:** Version bump only for package @synapsecns/bridge-docs
Expand Down
17 changes: 16 additions & 1 deletion docs/bridge/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {themes as prismThemes} from 'prism-react-renderer';
import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import * as path from "path";
import {codecovWebpackPlugin} from "@codecov/webpack-plugin";

const config: Config = {
title: 'Synapse Bridge Docs',
Expand Down Expand Up @@ -129,7 +130,7 @@ const config: Config = {
config: {
rfqapi: { // the <id> referenced when running CLI commands
specPath: "../../services/rfq/api/docs/swagger.yaml", // path to OpenAPI spec, URLs supported
baseUrl: "https://https://rfq-api.omnirpc.io/",
baseUrl: "https://rfq-api.omnirpc.io/",
outputDir: "docs/rfq/API", // output directory for generated files
sidebarOptions: { // optional, instructs plugin to generate sidebar.js
groupPathsBy: "tag", // group sidebar items by operation "tag"
Expand All @@ -152,6 +153,20 @@ const config: Config = {
};
},
}),
() => ({
name: 'bundle-analyzer',
configureWebpack() {
return {
plugins: [
codecovWebpackPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: "docs-bridge",
uploadToken: process.env.CODECOV_TOKEN,
}),
]
};
}
}),
],
};

Expand Down
3 changes: 2 additions & 1 deletion docs/bridge/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@synapsecns/bridge-docs",
"version": "0.1.4",
"version": "0.1.5",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand All @@ -19,6 +19,7 @@
"typecheck": "tsc"
},
"dependencies": {
"@codecov/webpack-plugin": "^0.0.1-beta.10",
"@docusaurus/core": "3.1.1",
"@docusaurus/logger": "3.1.1",
"@docusaurus/plugin-content-docs": "3.1.1",
Expand Down
8 changes: 8 additions & 0 deletions packages/contracts-rfq/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.2.10](https://github.com/synapsecns/sanguine/compare/[email protected]@0.2.10) (2024-07-03)

**Note:** Version bump only for package FastBridge





## [0.2.9](https://github.com/synapsecns/sanguine/compare/[email protected]@0.2.9) (2024-06-09)


Expand Down
5 changes: 3 additions & 2 deletions packages/contracts-rfq/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "FastBridge",
"license": "UNLICENSED",
"version": "0.2.9",
"version": "0.2.10",
"description": "FastBridge contracts.",
"private": true,
"files": [
Expand All @@ -11,12 +11,13 @@
"@openzeppelin/contracts": "5.0.1"
},
"devDependencies": {
"@synapsecns/solidity-devops": "^0.4.2",
"@synapsecns/solidity-devops": "^0.4.3",
"prettier": "^2.5.1",
"prettier-plugin-solidity": "^1.0.0-beta.19",
"solhint": "^3.3.6"
},
"scripts": {
"build": " ",
"build:contracts": "forge build",
"build:slither": "forge build --out=out --build-info --force",
"test:coverage": "echo 'Please use foundry'",
Expand Down
8 changes: 8 additions & 0 deletions packages/explorer-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.1.47](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-07-03)

**Note:** Version bump only for package @synapsecns/explorer-ui





## [0.1.46](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-06-28)

**Note:** Version bump only for package @synapsecns/explorer-ui
Expand Down
40 changes: 21 additions & 19 deletions packages/explorer-ui/components/misc/ChainInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { QuestionMarkCircleIcon } from '@heroicons/react/outline'
import { getChainUrl, getExplorerTxUrl } from '@urls'
import Image from 'next/image'
import { CHAINS } from 'synapse-constants'
import Link from 'next/link'

const CHAINS_BY_ID = CHAINS.CHAINS_BY_ID

Expand Down Expand Up @@ -38,27 +39,28 @@ export function ChainInfo({
}

if (chain) {
const content = (
<>
<Image
className={`inline rounded-full ${imgClassName}`}
src={chain?.chainImg}
alt={chain?.name}
/>
<p className={textClassName}>{chain.name}</p>
</>
)
return (
<div className="relative w-full">
<div className="flex items-center justify-start">
<Image
className={`inline rounded-full ${imgClassName}`}
src={chain?.chainImg}
alt={chain?.name}
/>
<p className={textClassName}>{chain.name}</p>
{/* we should just add this link to the text */}
{/* {noLink ? null : (
<a
type="link"
target="_blank"
href={link}
className={linkClassName}
>
</a>
)} */}
</div>
<Link href={link} passHref legacyBehavior>
<div className="flex items-center justify-start cursor-pointer group">
<Image
className={`inline rounded-full ${imgClassName}`}
src={chain?.chainImg}
alt={chain?.name}
/>
<p className={`${textClassName} group-hover:text-[#8FEBFF] transition-colors duration-200`}>{chain.name}</p>
</div>
</Link>
</div>
)
} else {
Expand Down
12 changes: 12 additions & 0 deletions packages/explorer-ui/next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { codecovWebpackPlugin } = require('@codecov/webpack-plugin')

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
Expand All @@ -18,6 +20,16 @@ const nextConfig = {
test: /\.tsx?$/,
use: 'ts-loader',
})
config.plugins.push(
codecovWebpackPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: 'explorer-ui',
uploadToken: process.env.CODECOV_TOKEN,
uploadOverrides: {
sha: process.env.GH_COMMIT_SHA,
},
})
)
return config
},
eslint: {
Expand Down
5 changes: 3 additions & 2 deletions packages/explorer-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@synapsecns/explorer-ui",
"version": "0.1.46",
"version": "0.1.47",
"private": true,
"engines": {
"node": ">=18.17.0"
Expand Down Expand Up @@ -38,7 +38,7 @@
"recharts": "^2.3.2",
"sharp": "^0.31.3",
"swr": "^1.3.0",
"synapse-constants": "^1.3.18",
"synapse-constants": "^1.3.19",
"tailwind-merge": "^1.3.0",
"tiny-warning": "^1.0.3",
"web-vitals": "^2.1.4"
Expand Down Expand Up @@ -71,6 +71,7 @@
},
"devDependencies": {
"@babel/core": "^7.20.7",
"@codecov/webpack-plugin": "^0.0.1-beta.10",
"@storybook/addon-actions": "^6.5.15",
"@storybook/addon-essentials": "^6.5.15",
"@storybook/addon-interactions": "^6.5.15",
Expand Down
8 changes: 8 additions & 0 deletions packages/rest-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.0.66](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-07-03)

**Note:** Version bump only for package @synapsecns/rest-api





## [1.0.65](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-06-27)

**Note:** Version bump only for package @synapsecns/rest-api
Expand Down
Loading

0 comments on commit 97b4106

Please sign in to comment.