Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/1019 tests #12

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
06e31f4
test: separate_number_and_test and test_timestamp_to_date_string
Tguntenaar Dec 7, 2024
895a13a
proposals_with_latest_snapshot
Tguntenaar Dec 7, 2024
a71be94
@petersalomonsen
Tguntenaar Dec 8, 2024
665b841
test: compare with RPC
Tguntenaar Dec 8, 2024
a45fa9e
fix: test in github action uses local result
Tguntenaar Dec 11, 2024
0e02b0d
remove unused files
Tguntenaar Dec 11, 2024
f4b7caa
remove unused file
Tguntenaar Dec 11, 2024
aefba45
add ENV to ci.yml
Tguntenaar Dec 11, 2024
471b1c3
fix clippy warnings
Tguntenaar Dec 11, 2024
a0bf3b5
test: check for 600 transactions
Tguntenaar Dec 16, 2024
b9769c7
test: test_all_proposals_are_indexed
Tguntenaar Dec 16, 2024
760506b
wip start test process / update_nearblocks
Tguntenaar Dec 16, 2024
47c6d4a
wip
Tguntenaar Dec 17, 2024
c705a2c
Merge branch 'main' of github.com:NEAR-DevHub/neardevhub-api-rs into …
Tguntenaar Dec 17, 2024
72fe18e
sqlx prepare
Tguntenaar Dec 17, 2024
53e7cd8
fix test
Tguntenaar Dec 29, 2024
0fe9f1b
changes comments
Tguntenaar Dec 29, 2024
bdd1a79
Merge branch 'feature/1018-tests' of github.com:NEAR-DevHub/neardevhu…
Tguntenaar Dec 29, 2024
c96bc3e
fix cors test
Tguntenaar Dec 29, 2024
575bbeb
Merge branch 'main' of github.com:NEAR-DevHub/neardevhub-api-rs into …
Tguntenaar Dec 29, 2024
1fb641c
feat: Try to index in a github action with curl
Tguntenaar Jan 6, 2025
bf93649
remove unused deploy script
Tguntenaar Jan 6, 2025
5e300c2
Merge branch 'main' of github.com:NEAR-DevHub/neardevhub-api-rs into …
Tguntenaar Jan 6, 2025
010039f
index in the ci
Tguntenaar Jan 6, 2025
8474a93
test: added test indexing last 10
Tguntenaar Jan 7, 2025
de28d47
remove comments and print statement
Tguntenaar Jan 7, 2025
e03faf0
test: fix data block_height bug
Tguntenaar Jan 7, 2025
cc5da37
test: remove unfinished test
Tguntenaar Jan 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .github/workflows/fly-deploy.yml

This file was deleted.

96 changes: 48 additions & 48 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
near-workspaces = { version = "0.15.0", optional = true }
near-workspaces = { version = "0.16.0", optional = true }
near-account-id = "1.0.0"
near-sdk = "5.3.0"
rocket = { version = "0.5.0", features = ['json'] }
Expand All @@ -28,8 +28,8 @@ anyhow = "1.0.76"
rocket_cors = "0.6.0"
utoipa-swagger-ui = { version = "7.1", features = ["rocket"] }
reqwest = "0.12.8"
near-api = "0.3.0"
near-jsonrpc-client = "0.14.0"
near-api = "0.4.0"
near-jsonrpc-client = "0.15.1"
regex = "1.11.1"
base64 = "0.22.1"
futures = "0.3.31"
Expand Down
12 changes: 10 additions & 2 deletions src/rpc_service.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use devhub_shared::proposal::VersionedProposal;
use devhub_shared::rfp::VersionedRFP;
use near_account_id::AccountId;
use near_api::{prelude::*, types::reference::Reference, types::Data};
use near_api::{types::reference::Reference, types::Data};
use near_api::{Contract, NetworkConfig, RPCEndpoint};
use near_jsonrpc_client::methods::query::RpcQueryRequest;
use rocket::http::Status;
use rocket::serde::json::json;
Expand Down Expand Up @@ -42,8 +43,15 @@ impl Default for RpcService {

impl RpcService {
pub fn new(id: &AccountId) -> Self {
let mut network = NetworkConfig::mainnet();

// FASTNEAR RPC provider as back up when our tests hit a toomanyrequests error.
network.rpc_endpoints.push(RPCEndpoint::new(
"https://free.rpc.fastnear.com".parse().unwrap(),
));

Self {
network: NetworkConfig::mainnet(),
network,
contract: Contract(id.clone()),
}
}
Expand Down
Loading
Loading