-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fast-transfers
- Loading branch information
Showing
111 changed files
with
13,988 additions
and
4,232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Build Contracts | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
branches: [main] | ||
|
||
|
||
jobs: | ||
build: | ||
name: Build Contracts | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
platform: [evm, near] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
if: matrix.platform == 'evm' | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '22' | ||
cache: 'yarn' | ||
cache-dependency-path: evm/yarn.lock | ||
|
||
- name: Setup Rust toolchain | ||
if: matrix.platform == 'near' || matrix.platform == 'solana' | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: 1.80.0 | ||
target: wasm32-unknown-unknown | ||
|
||
- name: Install NEAR CLI RS | ||
if: matrix.platform == 'near' | ||
run: | | ||
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/download/v0.7.4/near-cli-rs-installer.sh | sh | ||
- name: Install Docker | ||
if: matrix.platform == 'near' | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Install Solana CLI | ||
if: matrix.platform == 'solana' | ||
run: | | ||
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)" | ||
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" | ||
- name: Install Anchor | ||
if: matrix.platform == 'solana' | ||
run: | | ||
cargo install --git https://github.com/coral-xyz/anchor --tag v0.30.1 anchor-cli | ||
- name: Build Contracts | ||
run: | | ||
if [ "${{ matrix.platform }}" == "evm" ]; then | ||
make -C ${{ github.workspace }}/e2e-testing/ evm-build | ||
elif [ "${{ matrix.platform }}" == "near" ]; then | ||
make -C ${{ github.workspace }}/e2e-testing/ near-build | ||
elif [ "${{ matrix.platform }}" == "solana" ]; then | ||
make -C ${{ github.workspace }}/e2e-testing/ solana-build | ||
fi | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.platform }}-artifacts | ||
path: | | ||
${{ github.workspace }}/e2e-testing/${{ matrix.platform }}_artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
on: | ||
push: | ||
branches: [ main, develop ] | ||
pull_request: | ||
|
||
name: Check WASM files | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: Check wasm files | ||
steps: | ||
- name: Clone the repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build NEAR contracts | ||
run: | | ||
cd near | ||
./build.sh | ||
git status | ||
changed_files=$(git status --porcelain --untracked-files=no | wc -l) | ||
if [ $changed_files -gt 0 ]; then | ||
echo 'contract changed, please rebuild contract' | ||
exit 1 | ||
fi | ||
timeout-minutes: 40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: E2E Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
selected_pipelines: | ||
description: "Space-separated list of pipelines to run (e.g. 'bridge_token_near_to_evm another_pipeline')" | ||
required: false | ||
default: "bridge_token_near_to_evm" | ||
|
||
jobs: | ||
e2e-tests: | ||
name: E2E Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
.DS_Store | ||
**/target | ||
**/config.toml | ||
**/.env | ||
.history | ||
node_modules | ||
near/res/mock_token.wasm | ||
near/res/mock_prover.wasm | ||
near/res/omni_tests.wasm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
evm_artifacts/ | ||
near_artifacts/ | ||
solana_artifacts/ | ||
evm_deploy_results/ | ||
near_deploy_results/ | ||
solana_deploy_results/ | ||
bridge-token-near-to-evm/ | ||
|
||
.evm-compile.stamp | ||
.near-token-deployment-prepare.stamp | ||
.solana-build.stamp | ||
*dyn_init_args.json | ||
bridge-sdk-config.json | ||
bridge_token_factory-keypair.json | ||
|
||
|
||
evm_scripts/build/ | ||
evm_scripts/cache/ | ||
evm_scripts/coverage/ | ||
evm_scripts/coverage.json | ||
evm_scripts/.openzeppelin/ | ||
evm_scripts/node_modules/ | ||
evm_scripts/.env | ||
evm_scripts/typechain-types/ | ||
evm_scripts/dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
########################################################## | ||
# Makefile prologue | ||
########################################################## | ||
|
||
MAKEFLAGS += --no-builtin-rules --no-builtin-variables --warn-undefined-variables --silent | ||
unexport MAKEFLAGS | ||
.DELETE_ON_ERROR: | ||
.SUFFIXES: | ||
SHELL := bash | ||
.SHELLFLAGS := -eu -o pipefail -c | ||
.DEFAULT_GOAL := help | ||
|
||
# Master clean target | ||
.PHONY: clean | ||
clean: clean-deploy-results clean-evm clean-near clean-solana clean-bridge-token-near-to-evm | ||
$(call description,Cleaning all build artifacts and deploy results) | ||
|
||
# Include common module | ||
include makefiles/common.mk | ||
|
||
# Include chain-specific modules | ||
include makefiles/evm.mk | ||
include makefiles/near.mk | ||
include makefiles/solana.mk | ||
|
||
# Include test pipelines | ||
include makefiles/pipelines/bridge_token_near_to_evm.mk | ||
|
||
# Help target | ||
.PHONY: help | ||
help: | ||
$(call description,Available targets) | ||
@echo "Build targets:" | ||
@echo " evm-build Build EVM contracts" | ||
@echo " evm-scripts-build Build EVM deployment scripts" | ||
@echo " near-build Build NEAR contracts" | ||
@echo " solana-build Build Solana programs" | ||
@echo | ||
@echo "Clean targets:" | ||
@echo " clean Clean all build artifacts and deploy results" | ||
@echo " clean-deploy-results Clean deploy results directories" | ||
@echo " clean-evm Clean all EVM build artifacts" | ||
@echo " clean-evm-{network} Clean specific network deploy results" | ||
@echo " Available networks: $(evm_networks)" | ||
@echo " clean-near Clean NEAR build artifacts" | ||
@echo " clean-solana Clean Solana build artifacts" | ||
@echo " clean-bridge-token-near-to-evm Clean bridge pipeline artifacts" | ||
@echo | ||
@echo "Account creation:" | ||
@echo " create-near-init-account Create NEAR initialization account" | ||
@echo " create-near-sender Create NEAR sender account" | ||
@echo " create-near-relayer Create NEAR relayer account" | ||
@echo " create-dao-account Create NEAR DAO account" | ||
@echo | ||
@echo "Deployment targets:" | ||
@echo " near-deploy Deploy all NEAR contracts" | ||
@echo " {network}-deploy Deploy all contracts to specific EVM network" | ||
@echo " Available networks: $(evm_networks)" | ||
@echo " {network}-deploy-bridge Deploy bridge contract to specific network" | ||
@echo " {network}-deploy-enear Deploy eNEAR token to specific network" | ||
@echo " {network}-deploy-test-token Deploy test token to specific network" | ||
@echo | ||
@echo "Bridge pipeline:" | ||
@echo " bridge-token-near-to-evm Run complete NEAR to ETH bridge test" | ||
@echo " prepare-token-deployment Prepare token deployment (Step 0)" | ||
@echo " near-log-metadata-call Log token metadata (Step 1)" | ||
@echo " ethereum-deploy-token Deploy token on Ethereum (Step 2)" | ||
@echo " near-bind-token Bind token on NEAR (Step 3)" | ||
|
Oops, something went wrong.