Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update quick start instructions in readme #37

Merged
merged 1 commit into from
Sep 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@

---

## Canisters

* Low-cost testing: [6yxaq-riaaa-aaaap-abkpa-cai](https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.ic0.app/?id=6yxaq-riaaa-aaaap-abkpa-cai)

## Overview

**Ethereum RPC** is an Internet Computer canister smart contract for communicating with [Ethereum](https://ethereum.org/en/) and other [EVM blockchains](https://chainlist.org/?testnets=true) using an [on-chain API](./API.md).
Expand All @@ -18,15 +14,13 @@ This canister facilitates API requests to JSON-RPC services such as [Infura](htt

Beyond the Ethereum blockchain, this canister also supports Polygon, Avalanche, and other popular EVM networks. Check out [this webpage](https://chainlist.org/?testnets=true) for a list of all supported networks and RPC providers.

## Learn More
## Canisters

* [How this canister works behind the scenes](https://github.com/internet-computer-protocol/ic-eth-rpc/blob/main/DeepDive.md)
* [Candid interface](https://github.com/internet-computer-protocol/ic-eth-rpc/blob/main/candid/ic_eth.did)
* [Detailed API documentation](https://github.com/internet-computer-protocol/ic-eth-rpc/blob/main/API.md)
* Low-cost testing: [6yxaq-riaaa-aaaap-abkpa-cai](https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.ic0.app/?id=6yxaq-riaaa-aaaap-abkpa-cai)

## Quick Start

Add the following to your `dfx.json` config file:
Add the following to your `dfx.json` config file (replace `remote.id.ic` with any option from the list of available canisters above):

```json
{
Expand All @@ -39,8 +33,7 @@ Add the following to your `dfx.json` config file:
"id": {
"ic": "6yxaq-riaaa-aaaap-abkpa-cai"
}
},
"frontend": {}
}
}
}
}
Expand Down Expand Up @@ -78,6 +71,15 @@ dfx canister --network ic call ic_eth --wallet $(dfx identity --network ic get-w
dfx canister --network ic call ic_eth --wallet $(dfx identity --network ic get-wallet) --with-cycles 600000000 request '("https://ethereum.publicnode.com","{\"jsonrpc\":\"2.0\",\"method\":\"eth_gasPrice\",\"params\":[],\"id\":1}",1000)'
```

### Authorization (local replica)

```bash
PRINCIPAL=$(dfx identity get-principal)
dfx canister call ic_eth authorize "(principal \"$PRINCIPAL\", variant { RegisterProvider })"
dfx canister call ic_eth get_authorized '(variant { RegisterProvider })'
dfx canister call ic_eth deauthorize "(principal \"$PRINCIPAL\", variant { RegisterProvider })"
```

## Contributing

Contributions are welcome! Please check out the [contributor guidelines](https://github.com/internet-computer-protocol/ic-eth-rpc/blob/main/.github/CONTRIBUTING.md) for more information.
Expand All @@ -94,16 +96,13 @@ dfx start --background
dfx deploy
```

### Authorization (local replica)
## Learn More

```bash
PRINCIPAL=$(dfx identity get-principal)
dfx canister call ic_eth authorize "(principal \"$PRINCIPAL\", variant { RegisterProvider })"
dfx canister call ic_eth get_authorized '(variant { RegisterProvider })'
dfx canister call ic_eth deauthorize "(principal \"$PRINCIPAL\", variant { RegisterProvider })"
```
* [How this canister works behind the scenes](https://github.com/internet-computer-protocol/ic-eth-rpc/blob/main/DeepDive.md)
* [Candid interface](https://github.com/internet-computer-protocol/ic-eth-rpc/blob/main/candid/ic_eth.did)
* [Detailed API documentation](https://github.com/internet-computer-protocol/ic-eth-rpc/blob/main/API.md)

## Related Projects

* [IC 🔗 ETH](https://github.com/dfinity/ic-eth-starter): a full-stack starter project for calling Ethereum smart contracts from an IC dApp.
* [Bitcoin canister](https://github.com/dfinity/bitcoin-canister): interact with the Bitcoin blockchain from the Internet Computer.
* [Bitcoin canister](https://github.com/dfinity/bitcoin-canister): interact with the Bitcoin blockchain from the Internet Computer.
Loading