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

runtime-sdk: add RNG #1037

Merged
merged 24 commits into from
Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
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
2 changes: 1 addition & 1 deletion .rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ trailing_comma = "Vertical"
match_block_trailing_comma = false
blank_lines_upper_bound = 1
blank_lines_lower_bound = 0
edition = "2015"
edition = "2021"
version = "One"
merge_derives = true
use_try_shorthand = false
Expand Down
45 changes: 43 additions & 2 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions client-sdk/go/modules/contracts/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ type GasCosts struct {
WASMCryptoX25519DeriveSymmetric uint64 `json:"wasm_crypto_x25519_derive_symmetric"`
WASMCryptoDeoxysIIBase uint64 `json:"wasm_crypto_deoxysii_base"`
WASMCryptoDeoxysIIByte uint64 `json:"wasm_crypto_deoxysii_byte"`
WASMCryptoRandomBytesBase uint64 `json:"wasm_crypto_random_bytes_base"`
WASMCryptoRandomBytesByte uint64 `json:"wasm_crypto_random_bytes_byte"`
}

// Parameters are the parameters for the contracts module.
Expand Down
2 changes: 1 addition & 1 deletion contract-sdk-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "oasis-contract-sdk-macros"
version = "0.1.0"
authors = ["Oasis Protocol Foundation <info@oasisprotocol.org>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"

[lib]
Expand Down
6 changes: 3 additions & 3 deletions contract-sdk-macros/src/error_derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ mod tests {
let expected: syn::Stmt = syn::parse_quote!(
#[doc(hidden)]
const _: () = {
use oasis_contract_sdk as __sdk;
use :: oasis_contract_sdk as __sdk;
#[automatically_derived]
impl __sdk::error::Error for Error {
fn module_name(&self) -> &str {
Expand Down Expand Up @@ -257,7 +257,7 @@ mod tests {
let expected: syn::Stmt = syn::parse_quote!(
#[doc(hidden)]
const _: () = {
use oasis_contract_sdk as __sdk;
use :: oasis_contract_sdk as __sdk;
#[automatically_derived]
impl __sdk::error::Error for Error {
fn module_name(&self) -> &str {
Expand Down Expand Up @@ -286,7 +286,7 @@ mod tests {
let expected: syn::Stmt = syn::parse_quote!(
#[doc(hidden)]
const _: () = {
use oasis_contract_sdk as __sdk;
use :: oasis_contract_sdk as __sdk;
#[automatically_derived]
impl __sdk::error::Error for Error {
fn module_name(&self) -> &str {
Expand Down
4 changes: 2 additions & 2 deletions contract-sdk-macros/src/event_derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ mod tests {
let expected: syn::Stmt = syn::parse_quote!(
#[doc(hidden)]
const _: () = {
use oasis_contract_sdk as __sdk;
use :: oasis_contract_sdk as __sdk;
#[automatically_derived]
impl __sdk::event::Event for MainEvent {
fn module_name(&self) -> &str {
Expand Down Expand Up @@ -195,7 +195,7 @@ mod tests {
let expected: syn::Stmt = syn::parse_quote!(
#[doc(hidden)]
const _: () = {
use oasis_contract_sdk as __sdk;
use :: oasis_contract_sdk as __sdk;
#[automatically_derived]
impl __sdk::event::Event for MainEvent {
fn module_name(&self) -> &str {
Expand Down
4 changes: 3 additions & 1 deletion contract-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "oasis-contract-sdk"
description = "Oasis Contract SDK for use within WebAssembly."
version = "0.1.0"
authors = ["Oasis Protocol Foundation <info@oasisprotocol.org>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"

[dependencies]
Expand All @@ -17,6 +17,8 @@ thiserror = "1.0.30"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
oasis-contract-sdk-crypto = { path = "crypto" }
oasis-runtime-sdk = { path = "../runtime-sdk" }
rand_core = "0.6.4"
rand_xorshift = "0.3.0"

[target.'cfg(target_arch = "wasm32")'.dependencies]
wee_alloc = "0.4.5"
Expand Down
2 changes: 1 addition & 1 deletion contract-sdk/crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name = "oasis-contract-sdk-crypto"
description = "A collection of types and cryptography helpers for the Oasis Contract SDK."
version = "0.1.0"
authors = ["Oasis Protocol Foundation <info@oasisprotocol.org>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"

[dependencies]
Expand Down
Loading