Skip to content

Commit

Permalink
basic ethereum (#931)
Browse files Browse the repository at this point in the history
* init basic_ethereum

* hello world

* canister init

* initiate tecdsa key

* derive Ethereum address

* transaction count

* create and sign transaction

* send transaction

* CI

* lint

* basic wallet

* state module

* ecdsa module

* simplify errors

* README

* Apply suggestions from code review

Fix typos and apply minor suggestions

Co-authored-by: Thomas Locher <[email protected]>

* use --ic instead of --network ic

* add Wei alias

* inline keccak

* rename constant

* method estimate_transaction_fees

* improve error message

* improve README address tied to principal

* fix typo

---------

Co-authored-by: Thomas Locher <[email protected]>
  • Loading branch information
gregorydemay and THLO authored Jul 11, 2024
1 parent 88e5741 commit 3a1efa7
Show file tree
Hide file tree
Showing 13 changed files with 4,827 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@

/rust/basic_bitcoin/ @dfinity/execution
/rust/basic_dao/ @dfinity/testing-verification
/rust/basic_ethereum/ @dfinity/cross-chain-team
/rust/canister-info/ @dfinity/testing-verification
/rust/canister_logs/ @dfinity/execution
/rust/composite_query/ @dfinity/execution
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/rust-basic-ethereum-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: rust-basic-ethereum
on:
push:
branches:
- master
pull_request:
paths:
- rust/basic_ethereum/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/provision-pocket-ic-server.sh
- .github/workflows/rust-basic-ethereum-example.yml
- .ic-commit
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
rust-basic-ethereum-darwin:
runs-on: macos-12
steps:
- uses: actions/checkout@v1
- name: Provision Darwin
run: bash .github/workflows/provision-darwin.sh
- name: Provision PocketIC Darwin
run: bash .github/workflows/provision-pocket-ic-server.sh
- name: Build Basic Ethereum Darwin
run: |
pushd rust/basic_ethereum
cargo build --target wasm32-unknown-unknown --release
popd
- name: Lint Basic Ethereum Darwin
run: |
pushd rust/basic_ethereum
cargo fmt --all -- --check && cargo clippy --all-targets --all-features -- -D warnings
popd
- name: Test Basic Ethereum Darwin
run: |
pushd rust/basic_ethereum
cargo test
popd
rust-basic-ethereum-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Provision Linux
run: bash .github/workflows/provision-linux.sh
- name: Provision PocketIC Linux
run: bash .github/workflows/provision-pocket-ic-server.sh
- name: Build Basic Ethereum Linux
run: |
pushd rust/basic_ethereum
cargo build --target wasm32-unknown-unknown --release
popd
- name: Lint Basic Ethereum Linux
run: |
pushd rust/basic_ethereum
cargo fmt --all -- --check && cargo clippy --all-targets --all-features -- -D warnings
popd
- name: Test Basic Ethereum Linux
run: |
pushd rust/basic_ethereum
cargo test
popd
2 changes: 1 addition & 1 deletion rust/basic_bitcoin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords: [advanced, rust, bitcoin, btc, integration, bitcoin integration]
[View this sample's code on GitHub](https://github.com/dfinity/examples/tree/master/rust/basic_bitcoin)

## Overview
This tutorial will walk you through how to deploy a sample [canister smart contract](/docs/current/developer-docs/multi-chain/bitcoin/overview) **that can send and receive Bitcoin** on the Internet Computer.
This tutorial will walk you through how to deploy a sample [canister smart contract](https://internetcomputer.org/docs/current/developer-docs/multi-chain/bitcoin/overview) **that can send and receive Bitcoin** on the Internet Computer.

## Architecture

Expand Down
Loading

0 comments on commit 3a1efa7

Please sign in to comment.