Skip to content

Commit

Permalink
Merge branch 'main' into fast-transfers
Browse files Browse the repository at this point in the history
  • Loading branch information
kiseln committed Jan 29, 2025
2 parents 88a9781 + 578e78c commit 04dd5d8
Show file tree
Hide file tree
Showing 111 changed files with 13,988 additions and 4,232 deletions.
2 changes: 2 additions & 0 deletions .catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ spec:
- ./near/omni-prover/wormhole-omni-prover-proxy/.catalog-info.yaml
- ./near/omni-types/.catalog-info.yaml
- ./near/omni-bridge/.catalog-info.yaml
- ./near/omni-token/.catalog-info.yaml
- ./evm/bridge-token-factory/.catalog-info.yaml
- ./omni-relayer/.catalog-info.yaml
- ./solana/bridge_token_factory/.catalog-info.yaml
72 changes: 72 additions & 0 deletions .github/workflows/build-contracts.yaml
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
25 changes: 25 additions & 0 deletions .github/workflows/check-wasm.yaml
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
17 changes: 17 additions & 0 deletions .github/workflows/e2e-test.yml
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
4 changes: 2 additions & 2 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.79.0
toolchain: 1.80.0
components: clippy, rustfmt
target: wasm32-unknown-unknown

Expand All @@ -52,7 +52,7 @@ jobs:
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.79.0
toolchain: 1.80.0
target: wasm32-unknown-unknown

- name: Cache Rust dependencies
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/security-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ on:
- develop
pull_request:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"

jobs:
contract_analysis:
name: "Shared"
uses: aurora-is-near/.github/.github/workflows/security_analysis.yml@master
secrets: inherit
secrets:
DD_API_KEY: ${{secrets.DD_API_KEY}}
5 changes: 5 additions & 0 deletions .gitignore
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUSTFLAGS = -C link-arg=-s
NEAR_MANIFEST = ./near/Cargo.toml
OMNI_RELAYER_MANIFEST = ./omni-relayer/Cargo.toml

clippy: clippy-near #clippy-relayer
clippy: clippy-near clippy-omni-relayer

clippy-near: rust-build-token
cargo clippy --manifest-path $(NEAR_MANIFEST) -- $(LINT_OPTIONS)
Expand Down
25 changes: 25 additions & 0 deletions e2e-testing/.gitignore
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/
69 changes: 69 additions & 0 deletions e2e-testing/Makefile
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)"

Loading

0 comments on commit 04dd5d8

Please sign in to comment.