Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.1 KB

README.md

File metadata and controls

34 lines (23 loc) · 1.1 KB

Exchange Rate Canister

This sample code illustrates how to interact with the exchange rate canister on the Internet Computer.

Installation

Note that dfx and npm need to be installed first.

Clone the repository, get the node dependencies, and build the canisters.

git clone [email protected]:THLO/xrc_demo.git
cd xrc_demo/
npm install
dfx build --network ic

Deployment

If you want to test the demo locally, you can use the following commands:

# Starts the replica, running in the background.
dfx start --background

# Deploys the canisters to the replica and generates the candid interface.
dfx deploy

Note that the replica is defined as running as part of a system subnet in dfx.json, which is required because the exchange rate canister itself must run on a system subnet as it does not attach cycles to HTTPS outcalls.

Open the link for the xrc_demo to get to the Candid interface.