Skip to content

Commit d413e91

Browse files
authored
feat: Switchboard oracle for USD requests payment in NEAR (#18)
1 parent b652d0e commit d413e91

12 files changed

+535
-186
lines changed

Cargo.lock

Lines changed: 15 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ near-sdk = "3.1.0"
1010
serde = "1.0.118"
1111
# near-sdk = "4.0.0-pre.4"
1212
hex = "0.4"
13+
bs58 = "0.5.0"
1314

1415
[dev-dependencies]
1516
near-sdk-sim = "3.2.0"
@@ -28,4 +29,4 @@ panic = "abort"
2829
overflow-checks = true
2930

3031
[workspace]
31-
members = ["conversion_proxy", "fungible_conversion_proxy", "fungible_proxy", "mocks"]
32+
members = ["conversion_proxy", "fungible_conversion_proxy", "fungible_proxy", "mocks"]

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,26 @@ Smart contracts on NEAR used by the
2424
Run all contracts unit tests like this:
2525

2626
```
27-
cd near-contracts/conversion_proxy
28-
cargo test
29-
cd near-contracts/fungible_conversion_proxy
30-
cargo test
31-
cd near-contracts/fungible_proxy
32-
cargo test
33-
cd near-contracts/mocks
34-
cargo test
27+
cargo test -p conversion_proxy
28+
cargo test -p fungible_conversion_proxy
29+
cargo test -p fungible_proxy
3530
```
3631

37-
## Integration tests
32+
## Integration tests (on a simulated VM with mocked 3rd party contracts)
33+
34+
Integration tests are located in [tests/sim](tests/sim).
3835

3936
```
40-
# To test everything
37+
# To test everything (unit tests, sanity checks, simulated tests)
38+
# Requires building contracts (release) and mocks (debug) for simulated tests.
4139
./test.sh
4240
43-
# To test contracts one by one:
41+
# To run integration tests on contracts one by one:
4442
cargo test conversion_proxy
4543
cargo test fungible_conversionproxy
4644
cargo test fungible_proxy
4745
48-
# To run integration tests one by one (examples with main transfers):
46+
# To run any tests one by one (examples with main transfers on simulated VM):
4947
cargo test conversion_proxy::test_transfer -- --exact
5048
cargo test fungible_conversionproxy::test_transfer -- --exact
5149
cargo test fungible_proxy::test_transfer -- --exact

0 commit comments

Comments
 (0)