Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFQ #1650

Merged
merged 307 commits into from
Jan 8, 2024
Merged

RFQ #1650

Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
307 commits
Select commit Hold shift + click to select a range
e4c158f
initialize stores
trajan0x Dec 13, 2023
d3d8b34
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
trajan0x Dec 13, 2023
6e4f75f
db tracker
trajan0x Dec 13, 2023
c999be3
Implement EIP191 Authentication and Refactor Server in RFQ Service
aureliusbtc Dec 14, 2023
8c5483f
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
aureliusbtc Dec 14, 2023
838c1f5
Add unsuccessful auth test case
aureliusbtc Dec 14, 2023
b2923b4
fix auth middleware application
aureliusbtc Dec 14, 2023
6c15db2
add basic get quote functions
aureliusbtc Dec 14, 2023
48ea4af
deploy block emtadata
trajan0x Dec 14, 2023
ecbbb43
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
trajan0x Dec 14, 2023
854e457
chainlistener first pass
trajan0x Dec 14, 2023
0b28158
chainlistener first pass
trajan0x Dec 14, 2023
0b8a8f8
backup
trajan0x Dec 14, 2023
6861d79
Refactor ModifyQuote handler and add context-based request validation
aureliusbtc Dec 14, 2023
c2471da
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
aureliusbtc Dec 14, 2023
f282961
more stuff
trajan0x Dec 14, 2023
283a528
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
trajan0x Dec 14, 2023
03591af
rf
trajan0x Dec 14, 2023
f4d9244
rf
trajan0x Dec 14, 2023
2d8d192
ADjust table schema, TODO: Fix PUT requests
aureliusbtc Dec 14, 2023
da11a56
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
aureliusbtc Dec 14, 2023
57404a2
lit
trajan0x Dec 14, 2023
fe91c5b
Adjust PUT requests to use new Quote table variables
aureliusbtc Dec 14, 2023
5689c7b
Add method to get quotes by origin and destination
aureliusbtc Dec 14, 2023
67aad14
fast bridge mock
trajan0x Dec 14, 2023
81e96d0
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
trajan0x Dec 14, 2023
43ca71f
asdf
trajan0x Dec 14, 2023
585b854
f
trajan0x Dec 14, 2023
b9e074e
remove eip-155 considerations from arbitrary data signing (#1634) (#1…
aureliusbtc Dec 14, 2023
1ba8286
Revert "remove eip-155 considerations from arbitrary data signing (#1…
trajan0x Dec 14, 2023
c5c402e
f
trajan0x Dec 14, 2023
895ebdd
finish quoting
trajan0x Dec 14, 2023
f63c205
step 1
trajan0x Dec 14, 2023
5703080
fix api rest tests
aureliusbtc Dec 14, 2023
ec88fd8
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
aureliusbtc Dec 14, 2023
61d03fd
dont use mockerc20
trajan0x Dec 14, 2023
4f2a92e
a
trajan0x Dec 14, 2023
61c1b62
REMOVE 27 FROM SIGNING.
aureliusbtc Dec 14, 2023
3735eee
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
aureliusbtc Dec 14, 2023
496a993
round trip test TestRoundtripBetweenFromQuoteRequestAndToQuoteRequest
aureliusbtc Dec 14, 2023
c3e334b
resolve round trip test by adjusting wei -> ethers, scaling decimals …
aureliusbtc Dec 14, 2023
62132d6
rel test
trajan0x Dec 14, 2023
4863b52
l
trajan0x Dec 14, 2023
b6c016c
lint & resolution
aureliusbtc Dec 14, 2023
1f29c8c
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
aureliusbtc Dec 14, 2023
db1f0f4
m
trajan0x Dec 14, 2023
4fbb524
more cleaniu
trajan0x Dec 14, 2023
e171683
renamE
trajan0x Dec 14, 2023
630f8af
Add method to get quotes by the relayer who submitted it, which is re…
aureliusbtc Dec 14, 2023
1ada38a
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
aureliusbtc Dec 14, 2023
78ff4dd
begin quoter
aureliusbtc Dec 14, 2023
59fc094
begin quoter calling non-existant WIP inventory functions
aureliusbtc Dec 14, 2023
5b61650
commotabascd
trajan0x Dec 14, 2023
ea499d9
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
aureliusbtc Dec 14, 2023
642a851
draft version of quoter logic + quotableTokens config
aureliusbtc Dec 14, 2023
74f5d2e
draft wip quoter
aureliusbtc Dec 14, 2023
a098e15
f
trajan0x Dec 14, 2023
3c90bc9
m
trajan0x Dec 14, 2023
a0fe320
add new test contracts
trajan0x Dec 14, 2023
f0b6622
functionalize quoter, WIP asap to re-structue token matching
aureliusbtc Dec 14, 2023
1ca0414
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
aureliusbtc Dec 14, 2023
a7104ef
moar
trajan0x Dec 14, 2023
a95e05d
fix
trajan0x Dec 14, 2023
c9a27de
todo
aureliusbtc Dec 14, 2023
587afc9
reachgas
trajan0x Dec 15, 2023
a35facb
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
trajan0x Dec 15, 2023
9649cfc
add quoter validarequote comment
aureliusbtc Dec 15, 2023
d70c754
integration test starting point
trajan0x Dec 15, 2023
77bd02c
more quotes
trajan0x Dec 15, 2023
a085c71
fix quoting api
trajan0x Dec 15, 2023
aea830f
fast bridge improvements
trajan0x Dec 15, 2023
af3e50e
ss
trajan0x Dec 15, 2023
34f55ef
rfq
trajan0x Dec 15, 2023
481ac49
finish up
trajan0x Dec 15, 2023
a425180
claim
trajan0x Dec 15, 2023
1d47295
interface views
mikeyrf Dec 15, 2023
bf40058
docker [goreleaser]
trajan0x Dec 15, 2023
2135c03
https://github.com/synapsecns/sanguine/pull/1625/files#diff-678682767…
trajan0x Dec 15, 2023
fdda412
fix [goreleaser]
trajan0x Dec 15, 2023
4540025
rewrites [goreleaser]
trajan0x Dec 15, 2023
3943bb5
tidy up
trajan0x Dec 15, 2023
6fb46f3
generate fix [goreleaser]
trajan0x Dec 15, 2023
0353d4d
contain fix [goreleaser]
trajan0x Dec 15, 2023
e0d0f36
moar [goreleaser]
trajan0x Dec 15, 2023
d5af17d
[goreleaser] https://github.com/synapsecns/sanguine/actions/runs/7225…
trajan0x Dec 15, 2023
2454a2f
[goreleaser] update
trajan0x Dec 15, 2023
21d0a08
approves
trajan0x Dec 15, 2023
1bf7c40
generate fix
trajan0x Dec 15, 2023
5f60d63
build docker images [goreleaser]
trajan0x Dec 15, 2023
493e4af
support multiple docker iamge snapshot push [goreleaser]
trajan0x Dec 15, 2023
51d14a3
try to use posix friendly shell [goreleaser]
trajan0x Dec 15, 2023
01d2773
should process
trajan0x Dec 15, 2023
1bba929
fix message [goreleaser]
trajan0x Dec 15, 2023
bf84424
RFQ
trajan0x Dec 15, 2023
4e58dab
protocol fees, remove ownable
mikeyrf Dec 15, 2023
2ac3bdf
[goreleaser] trigger
bsgrigorov Dec 15, 2023
1c93c6e
[goreleaser] fix relayer uild step
trajan0x Dec 15, 2023
82b02ab
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
trajan0x Dec 15, 2023
46c7692
[goreleaser] binary
trajan0x Dec 15, 2023
c9efd5e
fix deadline handle
trajan0x Dec 15, 2023
77cc59e
more docs
trajan0x Dec 16, 2023
ad81949
rewrite queue [goreleaser]
trajan0x Dec 16, 2023
54c9c8a
gen fix
trajan0x Dec 16, 2023
f8e7318
cleanup
trajan0x Dec 17, 2023
0405cc8
fix lint & tests
trajan0x Dec 17, 2023
68878a1
Update services/rfq/relayer/inventory/manager.go
trajan0x Dec 17, 2023
87c548a
Merge branch 'fix/new-rfq' into fix/min-fee
trajan0x Dec 17, 2023
e928378
update rfq [goreleaser]
trajan0x Dec 17, 2023
40c744e
Merge branch 'fix/new-rfq-w-fees' into fix/new-rfq
trajan0x Dec 17, 2023
957f08a
add resty tracing
trajan0x Dec 17, 2023
7f64e34
tidy up
trajan0x Dec 17, 2023
8528c1f
Update services/rfq/api/client/suite_test.go
trajan0x Dec 17, 2023
660099a
Update services/rfq/relayer/inventory/manager.go
trajan0x Dec 17, 2023
98c0eae
collision fix [goreleaser]
trajan0x Dec 17, 2023
24fcc9e
update [goreleaser]
trajan0x Dec 17, 2023
4691980
27 fix
trajan0x Dec 18, 2023
809977c
Revert "27 fix"
trajan0x Dec 18, 2023
4e44eb5
Feat: remove Price and add FixedFee params to quote schema
dwasse Dec 19, 2023
90d47cc
Fix: quoter build
dwasse Dec 19, 2023
84d0761
Chore: bump go.mod to 1.21
dwasse Dec 19, 2023
2d4f17d
WIP: fee pricer skeleton
dwasse Dec 19, 2023
fd4b6a4
params sendChainGas
mikeyrf Dec 20, 2023
ad735b6
WIP: impl GetOriginFee()
dwasse Dec 20, 2023
a7ef20a
WIP: impl fee calcs
dwasse Dec 20, 2023
ef58bc0
WIP: impl getGasPrice()
dwasse Dec 20, 2023
bafd335
WIP: getTokenPrice() impl
dwasse Dec 20, 2023
c734165
WIP: remove coingecko price fetching for now; add TokenConfig with US…
dwasse Dec 20, 2023
5c2b9b5
WIP: add caching logic for gas price
dwasse Dec 20, 2023
b33204e
WIP: fee_pricer_test setup
dwasse Dec 20, 2023
d1b8c27
WIP: move pricer to its own package, replace omniClient with
dwasse Dec 20, 2023
66fe894
WIP: getNativeToken() impl
dwasse Dec 20, 2023
3d7300d
WIP: getTokenDecimals() impl
dwasse Dec 20, 2023
eb7fc05
Feat: working TestGetOriginFee
dwasse Dec 20, 2023
a486c3f
Feat: working TestGetDestinationFee
dwasse Dec 20, 2023
41dcfe1
Cleanup: move redundant logic into getFee()
dwasse Dec 20, 2023
1b9354d
Feat: add TestGetTotalFee
dwasse Dec 20, 2023
45eda1a
Feat: add TestGetGasPrice
dwasse Dec 20, 2023
b96a771
Cleanup: TTL -> TTLSeconds
dwasse Dec 20, 2023
9e3aa5a
Feat: set FixedFee in GenerateQuotes() func
dwasse Dec 20, 2023
8c076a6
Feat: consider fees in ShouldProcess() logic
dwasse Dec 20, 2023
583da87
Feat: add TestGenerateQuotes
dwasse Dec 20, 2023
23d2838
Feat: add TestShouldProcess
dwasse Dec 20, 2023
8b2be89
Cleanup: usage of TokenID -> TokenName to avoid confusion
dwasse Dec 20, 2023
b3c95fe
Cleanup: typo
dwasse Dec 21, 2023
2dbed75
WIP: attempt to fix e2e test
dwasse Dec 21, 2023
21350c3
Cleanup: add quoting description in readme
dwasse Dec 21, 2023
54e546e
update string literals (from #1687)
trajan0x Dec 21, 2023
701116d
have SubmitAllQuotes respect context (from #1687)
trajan0x Dec 21, 2023
59a5c47
fix e2e (from #1687)
trajan0x Dec 21, 2023
2d03e70
Merge pull request #1684 from synapsecns/fix/new-rfq-fixed-fee-logic
trajan0x Dec 21, 2023
b1b5232
Merge pull request #1679 from synapsecns/fix/new-rfq-api-changes
trajan0x Dec 21, 2023
59426af
merge [goreleaser]
trajan0x Dec 21, 2023
ffc09d1
Update services/rfq/api/db/api_db.go
trajan0x Dec 21, 2023
7d5a0e2
test success bridge with chain gas
mikeyrf Dec 21, 2023
2faa02a
test success relay with chain gas
mikeyrf Dec 21, 2023
d27a67e
chainGasAmount in bridge relayed event
mikeyrf Dec 21, 2023
3fb0b2f
chain gas amount in bridge relay event
mikeyrf Dec 21, 2023
fbcc548
test setChainGasAmount
mikeyrf Dec 21, 2023
b1ac4b7
use rebate local on relay
mikeyrf Dec 21, 2023
d422184
primkey fix [goreleaser]
trajan0x Dec 21, 2023
f1a070a
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
trajan0x Dec 21, 2023
f1d936f
Merge branch 'fix/new-rfq' into fix/new-rfq-w-fixed-gas
trajan0x Dec 21, 2023
4e2f3ba
Merge branch 'master' into fix/new-rfq
trajan0x Dec 21, 2023
c9540c2
Merge branch 'fix/new-rfq' into fix/new-rfq-w-fixed-gas
trajan0x Dec 21, 2023
2347e7c
backup
trajan0x Dec 21, 2023
6562430
deploy tests to op, arb mainnet
mikeyrf Dec 21, 2023
445cfd0
trigger [goreleaser]
bsgrigorov Dec 21, 2023
fe5743a
Merge branch 'fix/new-rfq-w-fixed-gas' of https://github.com/synapsec…
trajan0x Dec 21, 2023
85cc3e0
Revert "backup"
trajan0x Dec 21, 2023
6d6ce20
finish chain gas [goreleaser]
trajan0x Dec 21, 2023
cac0116
re-update [goreleaser]
trajan0x Dec 22, 2023
d3b85fc
Merge pull request #1681 from synapsecns/fix/new-rfq-w-fixed-gas
trajan0x Dec 22, 2023
200541c
trigger [goreleaser]
bsgrigorov Dec 22, 2023
304febf
reduce string literals
trajan0x Dec 22, 2023
c48a827
Merge branch 'master' into fix/new-rfq
trajan0x Dec 28, 2023
3d56398
[goreleaser] pass 1
trajan0x Dec 29, 2023
d08c2c6
[goreleaser] rewrite handler
trajan0x Dec 29, 2023
e96c8f8
[goreleaser] more span
trajan0x Dec 29, 2023
03257c9
[goreleaser] metadata fix
trajan0x Dec 29, 2023
e798495
double span [goreleaser]
trajan0x Dec 29, 2023
6f6704d
Revert "double span [goreleaser]"
trajan0x Dec 29, 2023
03c1036
semconv update [goreleaser]
trajan0x Dec 29, 2023
def7a71
Reapply "double span [goreleaser]"
trajan0x Dec 29, 2023
32d9122
cleanup [goreleaser]
trajan0x Dec 29, 2023
acd5f2a
quotefix [goreleaser]
trajan0x Dec 29, 2023
8823f48
string lit fix [goreleaser]
trajan0x Dec 30, 2023
f5ba8e5
[goreleaser]
trajan0x Dec 30, 2023
cc50cf7
update
trajan0x Dec 30, 2023
b1d87e2
new event
trajan0x Dec 30, 2023
a20bd48
consolidate quote posting [goreleaser]
trajan0x Dec 30, 2023
476b61f
Add `DestTxHash` field and use it in relayer `Prove()` call (#1726)
dwasse Jan 2, 2024
30cf147
Feat: clean up relayer config
dwasse Jan 2, 2024
d0a7dee
Cleanup: move definition of config getters
dwasse Jan 2, 2024
0b63eba
Feat: add IConfig
dwasse Jan 2, 2024
a5eb191
Cleanup: config getter comments
dwasse Jan 2, 2024
bcd8548
Merge pull request #1731 from synapsecns/fix/new-rfq-config
aureliusbtc Jan 5, 2024
269cf28
Bridge params with `params.originSender != msg.sender` (#1725)
mikeyrf Jan 5, 2024
6f1ef6c
Feat: add FastBridgeAddress param to quote response
dwasse Jan 5, 2024
ca9c253
Feat: include both origin and dest addresses in resp
dwasse Jan 5, 2024
9324d90
Merge pull request #1737 from synapsecns/fix/new-rfq-config
aureliusbtc Jan 5, 2024
ac81fb4
fix rfq deploy script when owner == msg.sender
mikeyrf Jan 5, 2024
3477edd
api [goreleaser]
aureliusbtc Jan 5, 2024
b153ff3
relayer [goreleaser]
aureliusbtc Jan 5, 2024
220e84a
deploy to op
mikeyrf Jan 5, 2024
a970d97
Add contract addresses to `Quote` db model (#1743)
dwasse Jan 5, 2024
242153e
WIP: add initial request/response models
dwasse Jan 5, 2024
62b3769
WIP: add util.go for model conversion
dwasse Jan 5, 2024
95fa994
WIP: fix TestPutAndGetQuote
dwasse Jan 5, 2024
eeb1b2b
Fix: return api model from all endpoints, fix client tests
dwasse Jan 5, 2024
bca9547
Fix: server tests
dwasse Jan 5, 2024
8fbdb50
Cleanup: use json snake case for api models
dwasse Jan 5, 2024
199e7cf
Fix: use string instead of float64 for bigint values
dwasse Jan 5, 2024
2da9fd4
Fix: quoter build, e2e tests
dwasse Jan 5, 2024
ffee471
Feat: use int for chainIDs in requests instead of string
dwasse Jan 5, 2024
bc50ae1
fix tracing [goreleaser]
trajan0x Jan 6, 2024
e260dbd
[goreleaser]
trajan0x Jan 6, 2024
f244084
chainid span [goreleaser]
trajan0x Jan 6, 2024
fe09495
[goreleaser] requires new db BREAKING
trajan0x Jan 6, 2024
25420b5
reintroduce dashes [goreleaser]
trajan0x Jan 6, 2024
482b195
remove buig
trajan0x Jan 6, 2024
05930cc
fix marshal bug [goreleaser]
trajan0x Jan 6, 2024
f911b20
Merge pull request #1744 from synapsecns/fix/new-rfq-models
aureliusbtc Jan 6, 2024
6bcfd7c
[goreleaser]
aureliusbtc Jan 6, 2024
cf7c811
Merge pull request #1738 from synapsecns/fix/new-rfq-deploys
aureliusbtc Jan 6, 2024
930b257
fix log name [gorleaser]
trajan0x Jan 6, 2024
6b14561
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
trajan0x Jan 6, 2024
8b23a68
submitter->submitter_config standardize [goreleaser]
trajan0x Jan 6, 2024
5f9fd3c
fix commit pending bug [goreleaser]
trajan0x Jan 6, 2024
bc70cfe
Merge branch 'master' into fix/new-rfq
trajan0x Jan 6, 2024
a44515f
adjust ShouldProcess() return false, if originPairs doesn't match des…
aureliusbtc Jan 6, 2024
c44d8b4
[goreleaser]
aureliusbtc Jan 6, 2024
fff8a80
[goreleaser]
trajan0x Jan 6, 2024
2f189df
[goreleaser]
trajan0x Jan 6, 2024
2b38985
fix [goreleaser]
trajan0x Jan 6, 2024
23dc280
Merge branch 'fix/new-rfq' of https://github.com/synapsecns/sanguine …
trajan0x Jan 6, 2024
16af93c
[goreleaser]
trajan0x Jan 6, 2024
7da0ef5
fix [goreleaser]
trajan0x Jan 6, 2024
2604ae7
[goreleaser] try fix for #1760 and #1761
trajan0x Jan 7, 2024
9e6fce3
reset poll interval [goreleaser]
trajan0x Jan 7, 2024
9f56ae0
Merge branch 'master' into fix/new-rfq
trajan0x Jan 7, 2024
45250bf
generate fix [goreleaser]
trajan0x Jan 7, 2024
c72f3e4
iconfig update [goreleaser]
trajan0x Jan 7, 2024
c94ffb5
test bigtodecimals
trajan0x Jan 7, 2024
ea1dd26
Merge branch 'master' into fix/new-rfq
trajan0x Jan 7, 2024
8d8eb2b
Merge branch 'master' into fix/new-rfq [goreleaser]
trajan0x Jan 7, 2024
cddfb35
interface fix
trajan0x Jan 7, 2024
7c3f602
fix tests [goreleaser] (fixes #1763)
trajan0x Jan 7, 2024
587fa4d
gosum test [goreleaser]
trajan0x Jan 7, 2024
effe28a
fix build [goreleaser]
trajan0x Jan 7, 2024
f0f2149
fix build again [goreleaser]
trajan0x Jan 7, 2024
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
3 changes: 3 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ flags:
cctp-relayer:
paths:
- services/cctp-relayer/
rfq:
paths:
- services/rfq/
explorer:
paths:
- services/explorer/
Expand Down
101 changes: 0 additions & 101 deletions .github/workflows/foundry-tests.yml

This file was deleted.

189 changes: 177 additions & 12 deletions .github/workflows/solidity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,54 @@ on:
pull_request:
paths:
- 'packages/contracts-core/**'
- 'packages/contracts-rfq/**'
- '.github/workflows/solidity.yml'
push:
paths:
- 'packages/contracts-core/**'
- 'packages/contracts-rfq/**'
- '.github/workflows/solidity.yml'

jobs:
changes:
needs: cancel-outdated
runs-on: ubuntu-latest
outputs:
# Expose matched filters as job 'packages' output variable
packages: ${{ steps.filter_solidity.outputs.changes }}
package_count: ${{ steps.length.outputs.FILTER_LENGTH }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# if any of these packages use submodules in the future, please uncomment this line
# submodules: 'recursive'
- uses: dorny/paths-filter@v2
id: filter_solidity
with:
# make sure to update run-goreleaser when adding a new package here
# also add to the get-project-id step
filters: |
contracts-core: 'packages/contracts-core/**'
contracts-rfq: 'packages/contracts-rfq/**'
- id: length
run: |
export FILTER_LENGTH=$(echo $FILTERED_PATHS | jq '. | length')
echo "##[set-output name=FILTER_LENGTH;]$(echo $FILTER_LENGTH)"
env:
FILTERED_PATHS: ${{ steps.filter_solidity.outputs.changes }}

docs:
name: Docs
name: Deploy Docs
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.package_count > 0 }}
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.changes.outputs.packages) }}
env:
WORKING_DIRECTORY: 'packages/contracts-core'
WORKING_DIRECTORY: 'packages/${{matrix.package}}'
VERCEL_TOKEN: '${{ secrets.VERCEL_TOKEN }}'
VERCEL_ORG_ID: '${{ secrets.VERCEL_ORG_ID }}'
NODE_ENV: 'production'
Expand All @@ -33,27 +69,52 @@ jobs:
version: nightly-09fe3e041369a816365a020f715ad6f94dbce9f2
- name: Install Vercel CLI
run: npm install --global vercel@30.1.0
- name: Set Project Env
- name: Get Project ID
id: project_id
# see: https://stackoverflow.com/a/75231888 for details
run: |
echo "VERCEL_PROJECT_ID=${{ secrets.VERCEL_CONTRACT_DOCS_PROJECT_ID }}" >> $GITHUB_ENV
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
PROJECT_IDS=$(cat <<END
{
"contracts-core": "${{ secrets.VERCEL_CONTRACT_DOCS_PROJECT_ID}}",
"contracts-rfq": "${{ secrets.VERCEL_CONTRACT_RFQ_DOCS_PROJECT_ID }}"
}
END
)
TARGET_ID=$(echo $PROJECT_IDS | jq -r 'to_entries[] | select(.key=="${{ matrix.package }}") | .value')
echo "##[set-output name=VERCEL_PROJECT_ID;]$(echo $TARGET_ID)"
# - name: Pull Vercel Environment Information
# run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
# env:
# VERCEL_PROJECT_ID: ${{ steps.project_id.outputs.VERCEL_PROJECT_ID}}
- name: Build Docs
working-directory: packages/contracts-core/
working-directory: "packages/${{matrix.package}}"
# https://github.com/orgs/vercel/discussions/3322#discussioncomment-6480458
# TODO: dedupe vercel.package.json
run: |
forge doc
cp vercel.package.json docs/package.json
- name: Setup upterm session
uses: lhotari/action-upterm@v1
env:
VERCEL_PROJECT_ID: ${{ steps.project_id.outputs.VERCEL_PROJECT_ID}}
- name: Deploy (Prod)
if: ${{ format('refs/heads/{0}', github.event.repository.default_branch) == github.ref }}
working-directory: "packages/${{matrix.package}}/docs"
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:
VERCEL_PROJECT_ID: ${{ steps.project_id.outputs.VERCEL_PROJECT_ID}}
- name: Deploy
working-directory: "packages/${{matrix.package}}/docs"
run: |
pwd
vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
vercel build --token=${{ secrets.VERCEL_TOKEN }}
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}

env:
VERCEL_PROJECT_ID: ${{ steps.project_id.outputs.VERCEL_PROJECT_ID}}


cancel-outdated:
Expand All @@ -67,8 +128,14 @@ jobs:
cancel_others: 'true'
slither:
name: Slither
if: ${{ needs.changes.outputs.package_count > 0 }}
# see https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository
runs-on: ubuntu-latest
needs: changes
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.changes.outputs.packages) }}
permissions:
# always required
security-events: write
Expand All @@ -92,10 +159,10 @@ jobs:

# TODO: find a flag for this
- name: Delete Untested Files
working-directory: ./packages/contracts-core
working-directory: './packages/${{matrix.package}}'
run: |
rm -rf test/
rm -rf script/
rm -rf test/ || true
rm -rf script/ || true

- name: Build Contracts
run: |
Expand All @@ -107,7 +174,7 @@ jobs:
id: slither
with:
node-version: '${{steps.nvmrc.outputs.NVMRC}}'
target: ./packages/contracts-core/
target: './packages/${{matrix.package}}'
ignore-compile: true
sarif: results.sarif
solc-version: 0.8.17
Expand All @@ -117,3 +184,101 @@ jobs:
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ./results.sarif

coverage:
name: Foundry Coverage
runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.package_count > 0 }}
needs: changes
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.changes.outputs.packages) }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Node JS
uses: ./.github/actions/setup-nodejs

- name: Installing dependencies
run: yarn install --immutable

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Run Foundry Tests
working-directory: "/packages/${{matrix.package}}"
run: forge coverage -vvv --report lcov --report summary >> $GITHUB_STEP_SUMMARY

- name: Send Coverage (Codecov)
uses: Wandalen/wretry.action@v1.0.36
with:
action: codecov/codecov-action@v3
current_path: "/packages/${{matrix.package}}"
with: |
token: ${{ secrets.CODECOV }}
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
flags: solidity
attempt_limit: 5
attempt_delay: 30000


snapshot:
runs-on: ubuntu-latest
name: Foundry Gas Snapshot
if: ${{ needs.changes.outputs.package_count > 0 }}
needs: changes
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.changes.outputs.packages) }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Node JS
uses: ./.github/actions/setup-nodejs

- name: Installing dependencies
run: yarn install --immutable

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run snapshot
working-directory: './packages/${{matrix.package}}'
run: forge snapshot >> $GITHUB_STEP_SUMMARY
size-check:
name: Foundry Size Check
runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.package_count > 0 }}
needs: changes
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.changes.outputs.packages) }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Node JS
uses: ./.github/actions/setup-nodejs

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

# This will run https://book.getfoundry.sh/reference/forge/forge-build#build-options
- name: Run forge build --sizes
run: |
forge build --sizes
working-directory: packages/contracts-core
Copy link
Contributor

Choose a reason for hiding this comment

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

The working-directory for the size-check job is hardcoded to 'packages/contracts-core', which is inconsistent with the matrix strategy used in other jobs. This should be updated to use the matrix strategy for consistency.

- working-directory: packages/contracts-core
+ working-directory: './packages/${{ matrix.package }}'

Committable suggestion

IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
working-directory: packages/contracts-core
working-directory: './packages/${{ matrix.package }}'

Copy link
Contributor

Choose a reason for hiding this comment

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

The size-check job is correctly set up with a matrix strategy and conditional checks. The Run forge build --sizes step is a good addition to check the contract sizes, which is important for Solidity development. However, the working directory for this step is hardcoded to packages/contracts-core, which might be an oversight. It should be consistent with the matrix package like in other jobs.

- working-directory: packages/contracts-core
+ working-directory: './packages/${{matrix.package}}'

Committable suggestion

IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
name: Foundry Size Check
runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.package_count > 0 }}
needs: changes
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.changes.outputs.packages) }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Node JS
uses: ./.github/actions/setup-nodejs
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
# This will run https://book.getfoundry.sh/reference/forge/forge-build#build-options
- name: Run forge build --sizes
run: |
forge build --sizes
working-directory: packages/contracts-core
name: Foundry Size Check
runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.package_count > 0 }}
needs: changes
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.changes.outputs.packages) }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Node JS
uses: ./.github/actions/setup-nodejs
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
# This will run https://book.getfoundry.sh/reference/forge/forge-build#build-options
- name: Run forge build --sizes
run: |
forge build --sizes
working-directory: './packages/${{matrix.package}}'

1 change: 0 additions & 1 deletion .github/workflows/ui-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
run: |
export FILTER_LENGTH=$(echo $FILTERED_PATHS | jq '. | length')
echo "FILTER_LENGTH=$FILTER_LENGTH" >> "$GITHUB_OUTPUT"

env:
FILTERED_PATHS: ${{ steps.filter_ui.outputs.changes }}
# for details on how to use, please see ui-preview.md
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@
[submodule "packages/contracts-core/lib/create3-factory"]
path = packages/contracts-core/lib/create3-factory
url = https://github.com/zeframlou/create3-factory
[submodule "packages/contracts-rfq/lib/forge-std"]
path = packages/contracts-rfq/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "packages/contracts-rfq/lib/openzeppelin-contracts"]
path = packages/contracts-rfq/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
2 changes: 1 addition & 1 deletion agents/contracts/gasoracle/generate.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gasoracle

//go:generate go run github.com/synapsecns/sanguine/tools/abigen generate --sol ../../../packages/contracts-core/flattened/GasOracle.sol --pkg gasoracle --sol-version 0.8.17 --filename gasoracle
//go:generate go run github.com/synapsecns/sanguine/tools/abigen generate --sol ../../../packages/contracts-rfq/flattened/GasOracle.sol --pkg gasoracle --sol-version 0.8.17 --filename gasoracle

// here we generate some interfaces we use in for our mocks. TODO this should be automated in abigen for all contracts + be condensed
//go:generate go run github.com/vburenin/ifacemaker -f gasoracle.abigen.go -s GasOracleCaller -i IGasOracleCaller -p gasoracle -o icaller_generated.go -c "autogenerated file"
Expand Down
Loading
Loading