Skip to content

Commit

Permalink
Merge 887c855 into a362a16
Browse files Browse the repository at this point in the history
  • Loading branch information
trajan0x authored Jul 2, 2024
2 parents a362a16 + 887c855 commit f9e12fb
Show file tree
Hide file tree
Showing 23 changed files with 1,158 additions and 33 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
11 changes: 9 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,7 +50,7 @@ jobs:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
submodules: 'recursive'

- name: Setup NodeJS
Expand Down Expand Up @@ -97,3 +98,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
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.
202 changes: 202 additions & 0 deletions docs/bridge/docs/rfq/API/relay-ack.api.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
---
id: relay-ack
title: "Relay ack"
description: "cache an ack request to synchronize relayer actions."
sidebar_label: "Relay ack"
hide_title: true
hide_table_of_contents: true
api: eJydVMGOm0AM/RU057SJesyxVU89tFrtntIVcsCB2cDM1GO2oYh/rw3shpYsqgoSmvE822/8bDqTY8zIBrbemb3JICsxAZdAdk4IfzQYOWGfxNZlJXlnf6GYK2iRBKJO8b3ZmAn50eet2Xcm847RsS4hhMpmoMjtU9QcnYmSowZdBfIBiS1G3QkVTqH2zejKbUChFJmsK0y/Gc+zEqxLbT5DWMlWIL1CTiCfI9m8wBTynDDGt+OxP6MbYDcxJ3vBPD0h3jyt4ZJ6soUwWuE9IdaZT6B/5T7BV9kLbLL44xNmLJbx1jPBRTdqkwAEdZyEtITCkanBXg0xiMijQB92u0mnWYSvX8ZMUAjmYKRxzKNUBrn0EsaEhiVuAC5ls9XTjdFGuLu2zOcL1KHCRQu8XGSh/G5N6L+85hW6Hs1kvRpvqHk9XIi4W9ds4XmLiNTNupN/mRmZKFlqMS1rPYx4PyPFsdCKDj5yDcMUOagVcqfTmIx1/UOY2Rj+71hP3cN44W2o5OJKoaFqGN1B0Ve9SyGm2647QsQHqvpezUN7iV2Wz0AWjnqtw6OEKRFy6fz9oTNnFIj5NLJ9d69JFV41mnzxA+nn3fXt4V6wx+m/U/tcXQh+aivLd2++y6saDEUZmniwd6YCVzRQKH4Mq89v8jPG1Q==
sidebar_class_name: "put api-method"
custom_edit_url: null
---

import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Markdown from "@theme/Markdown";
import Heading from "@theme/Heading";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";

<Heading
as={"h1"}
className={"openapi__heading"}
children={"Relay ack"}
>
</Heading>

<MethodEndpoint
method={"put"}
path={"/ack"}
>

</MethodEndpoint>



cache an ack request to synchronize relayer actions.

<Heading
id={"request"}
as={"h2"}
className={"openapi-tabs__heading"}
children={"Request"}
>
</Heading>

<MimeTabs
className={"openapi-tabs__mime"}
>
<TabItem
label={"application/json"}
value={"application/json-schema"}
>
<details
style={{}}
className={"openapi-markdown__details mime"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-mime"}
>
<h3
className={"openapi-markdown__details-summary-header-body"}
>
Body
</h3><strong
className={"openapi-schema__required"}
>
required
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
<div
style={{"marginTop":"1rem","marginBottom":"1rem"}}
>


query params


</div>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"dest_amount"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>

</SchemaItem><SchemaItem
collapsible={false}
name={"dest_chain_id"}
required={false}
schemaName={"integer"}
qualifierMessage={undefined}
schema={{"type":"integer"}}
>

</SchemaItem><SchemaItem
collapsible={false}
name={"dest_fast_bridge_address"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>

</SchemaItem><SchemaItem
collapsible={false}
name={"dest_token_addr"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>

</SchemaItem><SchemaItem
collapsible={false}
name={"fixed_fee"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>

</SchemaItem><SchemaItem
collapsible={false}
name={"max_origin_amount"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>

</SchemaItem><SchemaItem
collapsible={false}
name={"origin_chain_id"}
required={false}
schemaName={"integer"}
qualifierMessage={undefined}
schema={{"type":"integer"}}
>

</SchemaItem><SchemaItem
collapsible={false}
name={"origin_fast_bridge_address"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>

</SchemaItem><SchemaItem
collapsible={false}
name={"origin_token_addr"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>

</SchemaItem>
</ul>
</details>
</TabItem>
</MimeTabs><div>
<div>
<ApiTabs
label={undefined}
id={undefined}
>
<TabItem
label={"200"}
value={"200"}
>
<div>


OK


</div><div>

</div>
</TabItem>
</ApiTabs>
</div>
</div>

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
1 change: 1 addition & 0 deletions docs/bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions packages/contracts-rfq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"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
Loading

0 comments on commit f9e12fb

Please sign in to comment.