Skip to content

Commit

Permalink
Add first iteration of the new Key-Value store contract
Browse files Browse the repository at this point in the history
  • Loading branch information
earrietadev committed Oct 10, 2024
1 parent c414f9b commit ac33556
Show file tree
Hide file tree
Showing 8 changed files with 305 additions and 42 deletions.
108 changes: 70 additions & 38 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ codegen-units = 1
lto = true

[workspace.dependencies.soroban-sdk]
version = "20.4.0"
version = "21.1.1"
13 changes: 13 additions & 0 deletions contracts/key-value-db/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "key-value-db"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib"]

[dependencies]
soroban-sdk = { workspace = true }

[dev_dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }
10 changes: 10 additions & 0 deletions contracts/key-value-db/src/errors.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use soroban_sdk::contracterror;

#[contracterror]
#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
pub enum ContractErrors {
UnexpectedError = 0,
FailedToGetRecord = 1,
FeePaymentFailed = 2,
KeyWasInvalidated = 3,
}
Loading

0 comments on commit ac33556

Please sign in to comment.