Skip to content

Commit

Permalink
Fix CI step order
Browse files Browse the repository at this point in the history
  • Loading branch information
Sliman4 committed Dec 13, 2024
1 parent efb2f17 commit 526688a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ jobs:
- name: Check formatting
run: cargo fmt --all -- --check

- name: Build NEAR contracts
run: |
cd crates/oracle-contract && cargo near build --no-docker
cd ../reclaim-gpt-contract && cargo near build --no-docker
- name: Check with clippy
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Run tests
run: cargo test --all

- name: Build all crates
run: cargo build --all-features

- name: Build NEAR contracts
run: |
cd crates/oracle-contract && cargo near build --no-docker
cd ../reclaim-gpt-contract && cargo near build --no-docker
- name: Run tests
run: cargo test --all -- --test-threads=1
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,14 @@ It utilizes [Yielded execution](https://github.com/near/NEPs/pull/519) and [inin

> Try it out!
1. Register yourself:
`near contract call-function as-transaction dev-unaudited-v0.oracle.intear.near register_consumer json-args '{"account_id":"<account.near>"}' prepaid-gas '100.0 Tgas' attached-deposit '0 NEAR' sign-as <account.near> network-config mainnet sign-with-keychain send`
2. Deposit 0.01N to your fee balance (can deposit 0.1N for 10 requests):
`near contract call-function as-transaction dev-unaudited-v0.oracle.intear.near register_consumer json-args '{"account_id":"<account.near>"}' prepaid-gas '100.0 Tgas' attached-deposit '0 NEAR' sign-as <account.near> network-config mainnet sign-with-keychain send`
2. Request
`near contract call-function as-transaction dev-unaudited-v0.oracle.intear.near request json-args '{"producer_id":"gpt4o.oracle.intear.near","request_data":"Hello, GPT-4o!"}' prepaid-gas '100.0 Tgas' attached-deposit '0 NEAR' sign-as <account.near> network-config mainnet sign-with-keychain send`
`near contract call-function as-transaction dev-unaudited-v0.oracle.intear.near request json-args '{"producer_id":"gpt4o.oracle.intear.near","request_data":"Hello, GPT-4o!"}' prepaid-gas '100.0 Tgas' attached-deposit '0.01 NEAR' sign-as <account.near> network-config mainnet sign-with-keychain send`

## Contract

### Setting up

- To set up a producer that submits data on chain, use `add_producer(account_id: AccountId)` method.
- To set up a consumer that requests data from producers, use `register_consumer(account_id: AccountId)` method, as well as `set_fee`.
- To set up a producer that submits data on chain, use `add_producer(account_id: AccountId)` method, as well as `set_fee`.
- To set up a consumer that requests data from producers, use `register_consumer(account_id: AccountId)` method and deposit the fee, or supply it directly in each `request` method.

Don't forget about storage deposits.

Expand Down

0 comments on commit 526688a

Please sign in to comment.