From 17f799013e0383d4ba6a0d88a2bedf5922013ec9 Mon Sep 17 00:00:00 2001 From: Slime <4sliman4@gmail.com> Date: Thu, 26 Dec 2024 13:02:17 +0200 Subject: [PATCH] Clarify usage instructions --- .../components/OracleModal.tsx | 40 +++++++++++++++++-- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/crates/dashboard-frontend/components/OracleModal.tsx b/crates/dashboard-frontend/components/OracleModal.tsx index 6b7cc63..8ca7ca5 100644 --- a/crates/dashboard-frontend/components/OracleModal.tsx +++ b/crates/dashboard-frontend/components/OracleModal.tsx @@ -78,13 +78,45 @@ export const OracleModal = ({ oracle, isOpen, onClose }: OracleModalProps) => { - CLI Usage Example - network-config mainnet sign-with-keychain send`} language="shell" /> - Note: The oracle may refund a portion of the fee if it wants to (some are usage-based, not per-request flat fee). The fee is fully refunded if the oracle fails to respond. + CLI Usage Example + + 1. Install the NEAR CLI + + + + + 2. Register your account as a consumer in order to have a balance + "}' prepaid-gas '100.0 Tgas' attached-deposit '0 NEAR' sign-as network-config mainnet sign-with-keychain send`} + language="bash" + /> + + + + {`3. Deposit some ${oracle.fee.token === 'near' ? 'NEAR' : tokenPrices[oracle.fee.token]?.symbol ?? 'tokens'} to your account for fees`} + network-config mainnet sign-with-keychain send` + : `near contract call-function as-transaction ft_transfer_call json-args '{"receiver_id":"dev-unaudited-v1.oracle.intear.near","amount":"69000000000","msg":"{}"}' prepaid-gas '100.0 Tgas' attached-deposit '1 yoctoNEAR' sign-as network-config mainnet sign-with-keychain send` + } + language="bash" + /> + + + + 4. Request Data from the Oracle + network-config mainnet sign-with-keychain send`} language="shell" /> + Note: The oracle may refund a portion of the fee if it wants to (some are usage-based, not per-request flat fee). The fee is fully refunded if the oracle fails to respond. +
+ Note 2: You may get "408 Request Timeout" error in CLI, but after a few seconds, check Nearblocks and you'll see that it succeeded. +
- Rust Integration Example + Rust Integration Example First, set up your Cargo.toml: