Skip to content

Commit

Permalink
Add timestamp to enhanced transaction. closes #17
Browse files Browse the repository at this point in the history
  • Loading branch information
dougEfresh committed Mar 2, 2024
1 parent 020f316 commit 5d58800
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 14 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish to Crates.io

on:
push:
tags:
- 'v*'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Login to Crates.io
uses: actions-rs/cargo@v1
with:
command: login
args: ${{ secrets.CARGO_REGISTRY_TOKEN }}

- name: Publish to Crates.io
run: cargo publish
28 changes: 14 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "selene-helius-sdk"
version = "0.2.1"
version = "0.2.2"
edition = "2021"
authors = ["dougefresh <dchimento@gmail.com>"]
description = "Rust implementation of the Helius API & RPC"
Expand All @@ -12,14 +12,14 @@ license = "MIT"
keywords = ["solana", "helius"]
categories = ["cryptography::cryptocurrencies"]
exclude = [
"assets/*",
".github",
"CONTRIBUTING.md",
"*.log",
"Dockerfile",
".env*",
".dockerignore",
"codecov.yml"
"assets/*",
".github",
"CONTRIBUTING.md",
"*.log",
"Dockerfile",
".env*",
".dockerignore",
"codecov.yml"
]


Expand All @@ -42,9 +42,9 @@ missing_const_for_fn = "allow"


[dependencies]
solana-client = { version = ">= 1.16" }
solana-client = { version = ">= 1.16" }
solana-sdk = { version = ">= 1.16" }
reqwest = {version = "0.11", features = [ "json"] }
reqwest = { version = "0.11", features = ["json"] }
serde-enum-str = "0.4"
serde_json = "1"
serde = { version = "1", features = ["derive"] }
Expand All @@ -53,11 +53,11 @@ tokio = { version = "> 1.24", features = ["full"] }
color-eyre = { version = "0.6" }
thiserror = "1"
url = "2"
tracing = { version = "0.1" }
tracing-log = {version = "0.2" }
tracing = { version = "0.1" }
tracing-log = { version = "0.2" }
tracing-error = { version = "0.2" }
tracing-subscriber = { version = "0.3", features = ["env-filter", "serde"] }
bigdecimal = { version = "^0.3", features = ["serde"] }
bigdecimal = { version = "^0.3", features = ["serde"] }

[dev-dependencies]
dotenvy = "0.15"
Expand Down
1 change: 1 addition & 0 deletions src/api/types/enhanced.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pub struct EnhancedTransaction {
pub transaction_error: Option<TransactionError>,
pub instructions: Vec<Instruction>,
pub events: TransactionEvent,
pub timestamp: u64,
}

#[derive(Deserialize, Serialize, Debug)]
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ mod tests {
let sigs = ParseTransactionsRequest::from_slice(&sigs);
let res = client.parse_transaction(&sigs[0]).await?;
assert!(!res.is_empty());
assert!(res[0].timestamp > 0);
Ok(())
}

Expand Down

0 comments on commit 5d58800

Please sign in to comment.