Skip to content

Ethereum contract

Ethereum contract #154

name: Deploy Dev Smart Contract
on:
workflow_dispatch:
pull_request:
types: [closed]
branches:
- develop
jobs:
deploy-contract:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: add JSON contract
run: mkdir -p ~/.near-credentials/testnet && echo '${{ secrets.DEV_CONTRACT_JSON }}' > ~/.near-credentials/testnet/v1.signer-dev.testnet.json
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
- name: Install near-cli
run: 'npm install -g near-cli'
- name: Install Rust
run: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y"
- name: debug
run: cat ~/.near-credentials/testnet/v1.signer-dev.testnet.json
- name: Build & Deploy Dev Contract
run: |
source $HOME/.cargo/env && cd chain-signatures ; rustup target add wasm32-unknown-unknown && cargo build -p mpc-contract --target wasm32-unknown-unknown --release && \
cd .. && (yes || true) | near deploy v1.signer-dev.testnet target/wasm32-unknown-unknown/release/mpc_contract.wasm