Skip to content

Commit

Permalink
fix: update sdk types so U128 pattern doesn't use extra note string
Browse files Browse the repository at this point in the history
  • Loading branch information
willemneal committed Mar 21, 2022
1 parent 3353797 commit 13c87f5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions crates/near-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ repository = "https://github.com/ahalabs/witme"
version = "0.1.0"

[dev-dependencies]
near-sdk = { git = "https://github.com/ahalabs/near-sdk-rs", tag = "v4.0.0-3" }
near-contract-standards = { git = "https://github.com/ahalabs/near-sdk-rs", tag = "v4.0.0-3" }
near-sdk = { git = "https://github.com/ahalabs/near-sdk-rs", tag = "v4.0.0-4" }
near-contract-standards = { git = "https://github.com/ahalabs/near-sdk-rs", tag = "v4.0.0-4" }
2 changes: 1 addition & 1 deletion examples/counter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ edition = "2018"
crate-type = ["cdylib"]

[dependencies]
near-sdk = { git = "https://github.com/ahalabs/near-sdk-rs", tag = "v4.0.0-3" }
near-sdk = { git = "https://github.com/ahalabs/near-sdk-rs", tag = "v4.0.0-4" }
2 changes: 1 addition & 1 deletion examples/rust-status-message/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ edition = "2018"
crate-type = ["cdylib"]

[dependencies]
near-sdk = { git = "https://github.com/ahalabs/near-sdk-rs", tag = "v4.0.0-3" }
near-sdk = { git = "https://github.com/ahalabs/near-sdk-rs", tag = "v4.0.0-4" }

11 changes: 5 additions & 6 deletions src/near-sdk/sdk.wit
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
// This is a generated file by witgen (https://github.com/bnjjj/witgen), please do not edit yourself, you can generate a new one thanks to cargo witgen generate command. (witme v0.1.0)
// This is a generated file by witgen (https://github.com/bnjjj/witgen), please do not edit yourself, you can generate a new one thanks to cargo witgen generate command. (witme v0.2.0)

/// StorageUsage is used to count the amount of storage used by a contract.
type storage-usage = u64

/// Balance is a type for storing amounts of tokens, specified in yoctoNEAR.
type balance = u128

/// String representation of a u128-bit integer
/// @pattern ^[0-9]+$
/// Note: largest u128 is "340282366920938463463374607431768211455"
type u128 = string

/// Represents the amount of NEAR tokens in "gas units" which are used to fund transactions.
type gas = u64

Expand All @@ -25,6 +20,10 @@ type duration = u64
/// @pattern ^(([a-z\d]+[-_])*[a-z\d]+\.)*([a-z\d]+[-_])*[a-z\d]+$
type account-id = string

/// String representation of a u128-bit integer
/// @pattern ^[0-9]+$
type u128 = string

/// Public key in a binary format with base58 string serialization with human-readable curve.
/// The key types currently supported are `secp256k1` and `ed25519`.
///
Expand Down

0 comments on commit 13c87f5

Please sign in to comment.