Skip to content

CSUB-612: Check TX total cost (incl fees) before sending #1982

CSUB-612: Check TX total cost (incl fees) before sending

CSUB-612: Check TX total cost (incl fees) before sending #1982

Workflow file for this run

---
name: Build WASM Runtime
on:
push:
branches: [main, testnet, dev]
pull_request:
branches: [testnet, dev]
workflow_dispatch:
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Srtool build
id: srtool_build
uses: chevdor/[email protected]
with:
chain: "creditcoin"
runtime_dir: runtime
package: creditcoin-node-runtime
workdir: ${{ github.workspace }}
tag: "1.66.1" # FIXME: remove this option (use the latest) once we're building w/ stable rust
- name: Summary
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq . > creditcoin-srtool-digest.json
cat creditcoin-srtool-digest.json
echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}"
- name: Archive Runtime
uses: actions/upload-artifact@v3
with:
name: creditcoin-runtime-${{ github.sha }}
path: |
${{ steps.srtool_build.outputs.wasm_compressed }}
creditcoin-srtool-digest.json
update-wasm-on-devnet:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/dev'
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: creditcoin-runtime-${{ github.sha }}
path: wasm
- name: Install JS Dependencies
uses: actions/setup-node@v3
with:
node-version: 16
- run: |
npm install -g yarn
pushd ./creditcoin-js && yarn install && yarn pack && popd
yarn --cwd ./scripts/js upgrade 'creditcoin-js'
- name: Install Subwasm
uses: actions-rs/cargo@v1
with:
command: install
args: --locked --git https://github.com/chevdor/subwasm --tag v0.17.1
- name: Update WASM
working-directory: scripts/js
env:
CTCQA_URL: ${{ secrets.CTCQA_URL }}
QA_SUDO_KEY: ${{ secrets.QA_SUDO_KEY }}
run: |
yarn runtimeUpgrade "$CTCQA_URL" \
../../wasm/runtime/target/srtool/release/wbuild/creditcoin-node-runtime/creditcoin_node_runtime.compact.compressed.wasm "$QA_SUDO_KEY"