Skip to content

Commit

Permalink
Merge branch 'master' into feat/communication
Browse files Browse the repository at this point in the history
  • Loading branch information
trajan0x committed Mar 1, 2024
2 parents 4f2d08a + 01cb2b2 commit 565233c
Show file tree
Hide file tree
Showing 112 changed files with 3,586 additions and 310 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
[submodule "ethergo/internal/test-data"]
path = ethergo/internal/test-data
url = https://github.com/synapsecns/synapse-contracts
[submodule "services/explorer/external/synapse-contracts"]
path = services/explorer/external/synapse-contracts
url = https://github.com/synapsecns/synapse-contracts.git
[submodule "services/cctp-relayer/external/synapse-contracts"]
path = services/cctp-relayer/external/synapse-contracts
url = https://github.com/synapsecns/synapse-contracts
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,12 @@ root
│ ├── <a href="./packages/coverage-aggregator">coverage-aggregator</a>: Javascript coverage aggregator based on <a href="https://www.npmjs.com/package/nyc">nyc</a>
│ ├── <a href="./packages/docs">docs</a>: Docasaurus documentation. Note: this is not yet in use, and docs are still maintained on gitbook
│ ├── <a href="./packages/explorer-ui">explorer-ui</a>: Explorer UI
│ ├── <a href="./packages/rest-api">rest-api</a>: Rest API
│ ├── <a href="./packages/sdk-router">sdk-router</a>: SDK router
│ ├── <a href="./packages/solidity-devops">solidity-devops</a>: provides a set of tools and scripts to help with the development of Solidity smart contracts
│ ├── <a href="./packages/synapse-constants">synapse constants</a>: Constants used across synapse
│ ├── <a href="./packages/sdk-router">synapse-interface</a>: Synapse frontend code
│ ├── <a href="./packages/widget">widget</a>: Bridge Widget
├── <a href="./services">services</a>
│ ├── <a href="./services/cctp-relayer">CCTP Relayer</a>: CCTP message relayer
│ ├── <a href="./services/explorer">explorer</a>: Bridge/messaging explorer ba
Expand All @@ -80,6 +84,7 @@ root
│ ├── <a href="./tools/abigen">abigen</a>: Used to generate abigen bindings for go
│ ├── <a href="./tools/bundle">bundle</a>: Modified version of <a href="https://pkg.go.dev/golang.org/x/tools@v0.5.0/cmd/bundle"> go bundler </a> with improved shadowing support
│ ├── <a href="./tools/modulecopier">module copier</a>: Used to copy internal modules and export methods for testing
│ ├── <a href="./tools/revertresolver">revertresolver</a>: Converts hexified solidity errors into their underlying errors.
</pre>

## Setup
Expand Down
13 changes: 12 additions & 1 deletion contrib/promexporter/internal/gql/dfk/models.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"**/typechain",
"**/@typechain/*",
"**/@openzeppelin/contracts-upgradeable",
"**/@openzeppelin/contracts"
"**/@openzeppelin/contracts",
"**/ds-test",
"**/forge-std"
]
},
"repository": {
Expand Down
6 changes: 6 additions & 0 deletions packages/explorer-ui/components/ChainChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,12 @@ export const OverviewChart: React.FC<OverviewChartProps> = ({
stackId="a"
fill={loading ? 'rgba(255, 255, 255, 0.1)' : '#011082'}
/>
<Bar
isAnimationActive={false}
dataKey="blast"
stackId="a"
fill={loading ? 'rgba(255, 255, 255, 0.1)' : '#edf500'}
/>
</>
)}
</BarChart>
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.54](https://github.com/synapsecns/sanguine/compare/@synapsecns/rest-api@1.0.53...@synapsecns/rest-api@1.0.54) (2024-03-01)

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





## [1.0.53](https://github.com/synapsecns/sanguine/compare/@synapsecns/rest-api@1.0.52...@synapsecns/rest-api@1.0.53) (2024-02-22)

**Note:** Version bump only for package @synapsecns/rest-api
Expand Down
4 changes: 2 additions & 2 deletions packages/rest-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@synapsecns/rest-api",
"version": "1.0.53",
"version": "1.0.54",
"private": "true",
"engines": {
"node": ">=16.0.0"
Expand All @@ -23,7 +23,7 @@
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@ethersproject/units": "5.7.0",
"@synapsecns/sdk-router": "^0.3.25",
"@synapsecns/sdk-router": "^0.3.26",
"bignumber": "^1.1.0",
"ethers": "5.7.2",
"express": "^4.18.2",
Expand Down
8 changes: 8 additions & 0 deletions packages/sdk-router/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.3.26](https://github.com/synapsecns/sanguine/compare/@synapsecns/sdk-router@0.3.25...@synapsecns/sdk-router@0.3.26) (2024-03-01)

**Note:** Version bump only for package @synapsecns/sdk-router





## [0.3.25](https://github.com/synapsecns/sanguine/compare/@synapsecns/sdk-router@0.3.24...@synapsecns/sdk-router@0.3.25) (2024-02-22)

**Note:** Version bump only for package @synapsecns/sdk-router
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-router/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@synapsecns/sdk-router",
"description": "An SDK for interacting with the Synapse Protocol",
"version": "0.3.25",
"version": "0.3.26",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions packages/sdk-router/src/constants/chainIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export enum SupportedChainId {
DFK = 53935,
AURORA = 1313161554,
HARMONY = 1666600000,
BLAST = 81457,
}

/**
Expand Down
1 change: 1 addition & 0 deletions packages/sdk-router/src/constants/medianTime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const MEDIAN_TIME_BRIDGE = {
[SupportedChainId.DFK]: 30,
[SupportedChainId.AURORA]: 30,
[SupportedChainId.HARMONY]: 30,
[SupportedChainId.BLAST]: 1230,
}

/**
Expand Down
46 changes: 46 additions & 0 deletions packages/solidity-devops/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Use the structure from this file in the .env of the package that is using solidity-devops

# Wallets
# Define as many wallets as needed. For every wallet following env vars are needed:
# - WALLET_ADDR: the address of the account to use for signing
# - WALLET_TYPE: the wallet type: "keystore", "ledger","trezor" or "pk".
# Any other value triggers the interactive prompt to enter the private key.
# - keystore: use the encrypted keystore file.
# - WALLET_JSON: the keystore file path
# - ledger, trezor: use HW wallet for signing
# TODO: find out if ledger/trezor specific options are needed
# - pk: use the plaintext private key. STRONGLY DISCOURAGED for production usage, meant for local devnet purposes.
# - WALLET_PK: the private key to the wallet in 0x format.

# This will make wallet with name "deployer" available to run the scripts:
DEPLOYER_ADDR=0x1234567890123456789012345678901234567890
DEPLOYER_TYPE=keystore
DEPLOYER_JSON=path/to/keystore.json

# Chains
# For every chain following env vars are needed:
# - CHAIN_RPC: the RPC endpoint
# - CHAIN_VERIFIER: verifier for the smart contracts. Possible values are: etherscan, blockscout, sourcify
# - CHAIN_VERIFIER_URL: the Verifier API endpoint (required if verifier is not sourcify)
# - CHAIN_VERIFIER_KEY: the Verifier API key (required if verifier is not sourcify)
# NOTE: Blockcout URL needs to end with "api?" for the verification to work
# NOTE: Use any non-empty string for Blockscout API key: it is not required per se, but foundry will complain if it's empty

# MAINNET CHAINS
# Arbitrum
ARBITRUM_RPC=https://arb1.arbitrum.io/rpc
ARBITRUM_VERIFIER=etherscan
ARBITRUM_VERIFIER_URL=https://api.arbiscan.io/api
ARBITRUM_VERIFIER_KEY=PasteYourOwnKeyPlease
# Aurora
AURORA_RPC=https://mainnet.aurora.dev
AURORA_VERIFIER=blockscout
AURORA_VERIFIER_URL=https://explorer.aurora.dev/api?
AURORA_VERIFIER_KEY=NoKeyRequired
# DFK
DFK_RPC=https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc
DFK_VERIFIER=sourcify
# And the list goes on

# TESTNET CHAINS
# TODO: add testnet chains
3 changes: 3 additions & 0 deletions packages/solidity-devops/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: '../../.eslintrc.js',
}
2 changes: 2 additions & 0 deletions packages/solidity-devops/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.deployments
broadcast
3 changes: 3 additions & 0 deletions packages/solidity-devops/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
...require('../../.prettierrc.js'),
};
24 changes: 24 additions & 0 deletions packages/solidity-devops/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.1.3](https://github.com/synapsecns/sanguine/compare/@synapsecns/solidity-devops@0.1.2...@synapsecns/solidity-devops@0.1.3) (2024-03-01)

**Note:** Version bump only for package @synapsecns/solidity-devops





## [0.1.2](https://github.com/synapsecns/sanguine/compare/@synapsecns/solidity-devops@0.1.1...@synapsecns/solidity-devops@0.1.2) (2024-02-29)

**Note:** Version bump only for package @synapsecns/solidity-devops





## 0.1.1 (2024-02-29)

**Note:** Version bump only for package @synapsecns/solidity-devops
11 changes: 11 additions & 0 deletions packages/solidity-devops/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Solidity Development Operations

This package provides a set of tools and scripts to help with the development of Solidity smart contracts:

- Utilities to simplify the testing of smart contracts using Foundry.
- Utilities to simplify the deployment of smart contracts using Foundry.
- Utilities to manage the existing deployments of smart contracts.

## Disclaimer

This package is still under development and should be used with caution. It is not recommended to use it in a production environment.
1 change: 1 addition & 0 deletions packages/solidity-devops/deployments/arbitrum/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
42161
1 change: 1 addition & 0 deletions packages/solidity-devops/deployments/aurora/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1313161554
1 change: 1 addition & 0 deletions packages/solidity-devops/deployments/dfk/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
53935
23 changes: 23 additions & 0 deletions packages/solidity-devops/devops.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"chains": {
"arbitrum": "--with-gas-price 100000000",
"aurora": "--legacy --slow",
"base": "--with-gas-price 100000000",
"boba": "--legacy --skip-simulation --slow",
"canto": "--legacy --slow",
"cronos": "--slow",
"dfk": "--slow",
"dogechain": "--legacy --slow",
"harmony": "--legacy --slow",
"klaytn": "--skip-simulation",
"metis": "--legacy",
"moonbeam": "--skip-simulation --slow",
"moonriver": "--skip-simulation --slow",
"optimism": "--with-gas-price 100000000",
"polygon": "--slow"
},
"deployConfigs": "configs",
"deployments": "deployments",
"forgeArtifacts": "artifacts",
"freshDeployments": ".deployments"
}
31 changes: 31 additions & 0 deletions packages/solidity-devops/foundry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[profile.default]
auto_detect_solc = true
# 2024-01-01
block_timestamp = 1_704_067_200
evm_version = "paris"
# No need for optimizer as nothing from this package is deployed
optimizer = false
out = "artifacts"
src = "src"
ffi = true
fs_permissions = [
{ access = "read", path = "./" },
{ access = "read-write", path = "./.deployments" }
]

[fmt]
line_length = 120
multiline_func_header = 'all'
number_underscore = 'thousands'

# Use this structure in foundry.toml of the package that is using solidity-devops
[rpc_endpoints]
arbitrum = "${ARBITRUM_RPC}"
aurora = "${AURORA_RPC}"
dfk = "${DFK_RPC}"

# And the list goes on
[etherscan]
arbitrum = { key = "${ARBITRUM_VERIFIER_KEY}", url = "${ARBITRUM_VERIFIER_URL}" }
aurora = { key = "${AURORA_VERIFIER_KEY}", url = "${AURORA_VERIFIER_URL}" }
# DFK is using Sourcify for verification
Loading

0 comments on commit 565233c

Please sign in to comment.