Skip to content

Commit

Permalink
Merge pull request #37 from internet-computer-protocol/ryan/readme
Browse files Browse the repository at this point in the history
Update quick start instructions in readme
  • Loading branch information
rvanasa authored Sep 16, 2023
2 parents e311ade + f1dfddc commit 43eef17
Showing 1 changed file with 18 additions and 19 deletions.
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.

0 comments on commit 43eef17

Please sign in to comment.