diff --git a/lockup-factory/res/lockup_factory.wasm b/lockup-factory/res/lockup_factory.wasm index 558b6727..5d1b4b8f 100755 Binary files a/lockup-factory/res/lockup_factory.wasm and b/lockup-factory/res/lockup_factory.wasm differ diff --git a/lockup/res/lockup_contract.wasm b/lockup/res/lockup_contract.wasm index d86131da..7b5c7800 100755 Binary files a/lockup/res/lockup_contract.wasm and b/lockup/res/lockup_contract.wasm differ diff --git a/multisig-factory/Cargo.lock b/multisig-factory/Cargo.lock new file mode 100644 index 00000000..ce83938f --- /dev/null +++ b/multisig-factory/Cargo.lock @@ -0,0 +1,476 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" + +[[package]] +name = "autocfg" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" + +[[package]] +name = "base64" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" + +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding", + "byte-tools", + "byteorder", + "generic-array", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", +] + +[[package]] +name = "borsh" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30f3fd65922359a7c6e791bc9b2bba1b977ea0c0b96a528ac48007f535fb4184" +dependencies = [ + "borsh-derive", +] + +[[package]] +name = "borsh-derive" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2d74755d937d261d5e9bdef87e0addfbc1ace0214f7776f21532d6e97325356" +dependencies = [ + "borsh-derive-internal", + "borsh-schema-derive-internal", + "syn", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c9f966cb7a42c8ed83546ef481bc1d1dec888fe5f84a4737d5c2094a483e41e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5df2543b56ebc2b4493e70d024ebde2cbb48d97bf7b1a16318eff30bd02669b8" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "bs58" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" + +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + +[[package]] +name = "byteorder" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + +[[package]] +name = "generic-array" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +dependencies = [ + "typenum", +] + +[[package]] +name = "hashbrown" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" + +[[package]] +name = "indexmap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "itoa" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" + +[[package]] +name = "keccak" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" + +[[package]] +name = "libc" +version = "0.2.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb" + +[[package]] +name = "memory_units" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" + +[[package]] +name = "multisig-factory" +version = "0.1.0" +dependencies = [ + "near-sdk", +] + +[[package]] +name = "near-rpc-error-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffa8dbf8437a28ac40fcb85859ab0d0b8385013935b000c7a51ae79631dd74d9" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn", +] + +[[package]] +name = "near-rpc-error-macro" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c6111d713e90c7c551dee937f4a06cb9ea2672243455a4454cc7566387ba2d9" +dependencies = [ + "near-rpc-error-core", + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn", +] + +[[package]] +name = "near-runtime-fees" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8732466a66a346685e00eed22355d10e54741dd66253ca7b89b7ffdcb17202e" +dependencies = [ + "num-rational", + "serde", +] + +[[package]] +name = "near-runtime-utils" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bd4d93a20f7ac0472731fdf00726d1292c25ae96ea784edfa05d61ac77b7448" + +[[package]] +name = "near-sdk" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "963610ae7ce6729de19c8fe0da230f878bf3a04de022aa2045ff7c5fa2b13095" +dependencies = [ + "base64", + "borsh", + "bs58", + "near-runtime-fees", + "near-sdk-macros", + "near-vm-logic", + "serde", + "serde_json", + "wee_alloc", +] + +[[package]] +name = "near-sdk-core" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1552953310b5d7a6caaba67b0d65799c773c90fe5a06443fc55b0ace77e96eb5" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "near-sdk-macros" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c36b52b39323ee871f222243e20c7bbeb3dfe677d397baa32853e91229cd88bd" +dependencies = [ + "near-sdk-core", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "near-vm-errors" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f19df432b87ae827e1b9dbe557c51cfee24fbc992e72dc5b23d61bbe44c43133" +dependencies = [ + "borsh", + "near-rpc-error-macro", + "serde", +] + +[[package]] +name = "near-vm-logic" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3700022c10e0a6cceb6c380952a4e94a582b83da91392eb37ed15c8a20e06304" +dependencies = [ + "base64", + "bs58", + "byteorder", + "near-runtime-fees", + "near-runtime-utils", + "near-vm-errors", + "serde", + "sha2", + "sha3", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", + "serde", +] + +[[package]] +name = "num-traits" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +dependencies = [ + "autocfg", +] + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "proc-macro2" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "quote" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + +[[package]] +name = "serde" +version = "1.0.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1500e84d27fe482ed1dc791a56eddc2f230046a040fa908c08bda1d9fb615779" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +dependencies = [ + "block-buffer", + "digest", + "fake-simd", + "opaque-debug", +] + +[[package]] +name = "sha3" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" +dependencies = [ + "block-buffer", + "byte-tools", + "digest", + "keccak", + "opaque-debug", +] + +[[package]] +name = "syn" +version = "1.0.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2af957a63d6bd42255c359c93d9bfdb97076bd3b820897ce55ffbfbf107f44" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "typenum" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" + +[[package]] +name = "unicode-xid" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" + +[[package]] +name = "wee_alloc" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" +dependencies = [ + "cfg-if", + "libc", + "memory_units", + "winapi", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/multisig-factory/Cargo.toml b/multisig-factory/Cargo.toml new file mode 100644 index 00000000..5a35afe0 --- /dev/null +++ b/multisig-factory/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "multisig-factory" +version = "0.1.0" +authors = ["Near Inc "] +edition = "2018" +publish = false + +[lib] +crate-type = ["cdylib"] + +[profile.release] +codegen-units = 1 +# Tell `rustc` to optimize for small code size. +opt-level = "z" +lto = true +debug = false +panic = "abort" +overflow-checks = true + +[dependencies] +near-sdk = "2.0.0" diff --git a/multisig-factory/README.md b/multisig-factory/README.md new file mode 100644 index 00000000..659cd6a6 --- /dev/null +++ b/multisig-factory/README.md @@ -0,0 +1,30 @@ +# Multisig Factory + +Allows to create new [Multisig contracts](../multisig) just by sending a transactions with the required configuration and funds. +E.g. Removes need for using `near repl` and having wasm file available. + +# Deployment & Usage + +## TestNet + +Deploy to new developer account on TestNet: + +``` +near dev-deploy --wasmFile=res/multisig_factory.wasm +``` + +Setup variable for the contract to use commands below easier: + +``` +# bash +CONTRACT_ID="dev-1608694678554-8567049" + +# fish +set CONTRACT_ID "dev-1608694678554-8567049" +``` + +Create a new multisig with the given parameters and attached amount (50N) passed to multisig contract: + +``` +near call $CONTRACT_ID create '{"name": "test", "members": [{"account_id": "illia"}, {"account_id": "testmewell.testnet"}, {"public_key": "ed25519:Eg2jtsiMrprn7zgKKUk79qM1hWhANsFyE6JSX4txLEuy"}], "num_confirmations": 1}' --accountId $CONTRACT_ID --amount 50 --gas 100000000000000 +``` diff --git a/multisig-factory/build.sh b/multisig-factory/build.sh new file mode 100755 index 00000000..2c28b081 --- /dev/null +++ b/multisig-factory/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +RUSTFLAGS='-C link-arg=-s' cargo +stable build --target wasm32-unknown-unknown --release +cp target/wasm32-unknown-unknown/release/multisig_factory.wasm ./res/ diff --git a/multisig-factory/res/multisig_factory.wasm b/multisig-factory/res/multisig_factory.wasm new file mode 100755 index 00000000..8c95ec9e Binary files /dev/null and b/multisig-factory/res/multisig_factory.wasm differ diff --git a/multisig-factory/src/lib.rs b/multisig-factory/src/lib.rs new file mode 100644 index 00000000..9fe444fb --- /dev/null +++ b/multisig-factory/src/lib.rs @@ -0,0 +1,50 @@ +use near_sdk::borsh::{self, BorshDeserialize, BorshSerialize}; +use near_sdk::json_types::Base58PublicKey; +use near_sdk::serde::{Deserialize, Serialize}; +use near_sdk::serde_json::json; +use near_sdk::{env, near_bindgen, AccountId, Promise}; + +#[global_allocator] +static ALLOC: near_sdk::wee_alloc::WeeAlloc<'_> = near_sdk::wee_alloc::WeeAlloc::INIT; + +const CODE: &[u8] = include_bytes!("../../multisig2/res/multisig2.wasm"); + +/// This gas spent on the call & account creation, the rest goes to the `new` call. +const CREATE_CALL_GAS: u64 = 50_000_000_000_000; + +#[derive(Serialize, Deserialize)] +#[serde(crate = "near_sdk::serde", untagged)] +pub enum MultisigMember { + AccessKey { public_key: Base58PublicKey }, + Account { account_id: AccountId }, +} + +#[near_bindgen] +#[derive(BorshSerialize, BorshDeserialize, Default)] +pub struct MultisigFactory {} + +#[near_bindgen] +impl MultisigFactory { + #[payable] + pub fn create( + &mut self, + name: AccountId, + members: Vec, + num_confirmations: u64, + ) -> Promise { + let account_id = format!("{}.{}", name, env::current_account_id()); + Promise::new(account_id) + .create_account() + .deploy_contract(CODE.to_vec()) + .transfer(env::attached_deposit()) + .function_call( + b"new".to_vec(), + json!({ "members": members, "num_confirmations": num_confirmations }) + .to_string() + .as_bytes() + .to_vec(), + 0, + env::prepaid_gas() - CREATE_CALL_GAS, + ) + } +} diff --git a/multisig/src/lib.rs b/multisig/src/lib.rs index 24e54193..510bc2cb 100644 --- a/multisig/src/lib.rs +++ b/multisig/src/lib.rs @@ -4,8 +4,8 @@ use std::convert::TryFrom; use near_sdk::borsh::{self, BorshDeserialize, BorshSerialize}; use near_sdk::collections::UnorderedMap; use near_sdk::json_types::{Base58PublicKey, Base64VecU8, U128, U64}; -use near_sdk::{env, near_bindgen, AccountId, Promise, PromiseOrValue, PublicKey}; use near_sdk::serde::{Deserialize, Serialize}; +use near_sdk::{env, near_bindgen, AccountId, Promise, PromiseOrValue, PublicKey}; /// Unlimited allowance for multisig keys. const DEFAULT_ALLOWANCE: u128 = 0; @@ -153,7 +153,7 @@ impl MultiSigContract { } /// Remove given request and associated confirmations. - pub fn delete_request(&mut self, request_id: RequestId) { + pub fn delete_request(&mut self, request_id: RequestId) -> MultiSigRequest { self.assert_valid_request(request_id); let request_with_signer = self.requests.get(&request_id).expect("No such request"); // can't delete requests before 15min @@ -161,7 +161,7 @@ impl MultiSigContract { env::block_timestamp() > request_with_signer.added_timestamp + REQUEST_COOLDOWN, "Request cannot be deleted immediately after creation." ); - self.remove_request(request_id); + self.remove_request(request_id) } fn execute_request(&mut self, request: MultiSigRequest) -> PromiseOrValue { diff --git a/multisig2/Cargo.lock b/multisig2/Cargo.lock new file mode 100644 index 00000000..7c38cf2f --- /dev/null +++ b/multisig2/Cargo.lock @@ -0,0 +1,3446 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" + +[[package]] +name = "addr2line" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a" +dependencies = [ + "gimli 0.24.0", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" + +[[package]] +name = "aho-corasick" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +dependencies = [ + "memchr", +] + +[[package]] +name = "anyhow" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1" + +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "arrayvec" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd" + +[[package]] +name = "async-mutex" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-trait" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d3a45e77e34375a7923b1e8febb049bb011f064714a8e17a1a616fef01da13d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "autocfg" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" + +[[package]] +name = "backtrace" +version = "0.3.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4717cfcbfaa661a0fd48f8453951837ae7e8f81e481fbb136e3202d72805a744" +dependencies = [ + "addr2line", + "cc", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object 0.24.0", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bindgen" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "453c49e5950bb0eb63bb3df640e31618846c89d5b7faa54040d76e98e0134375" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "peeking_take_while", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitvec" +version = "0.19.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321" +dependencies = [ + "funty", + "radium 0.5.3", + "tap", + "wyz", +] + +[[package]] +name = "bitvec" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" +dependencies = [ + "funty", + "radium 0.6.2", + "tap", + "wyz", +] + +[[package]] +name = "blake2" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" +dependencies = [ + "crypto-mac", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "blake3" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "cc", + "cfg-if 0.1.10", + "constant_time_eq", + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "block-padding", + "generic-array 0.14.4", +] + +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[package]] +name = "borsh" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09a7111f797cc721407885a323fb071636aee57f750b1a4ddc27397eba168a74" +dependencies = [ + "borsh-derive", + "hashbrown 0.9.1", +] + +[[package]] +name = "borsh-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307f3740906bac2c118a8122fe22681232b244f1369273e45f1156b45c43d2dd" +dependencies = [ + "borsh-derive-internal", + "borsh-schema-derive-internal", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2104c73179359431cc98e016998f2f23bc7a05bc53e79741bcba705f30047bc" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae29eb8418fcd46f723f8691a2ac06857d31179d33d2f2d91eb13967de97c728" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "byte-slice-cast" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d30c751592b77c499e7bce34d99d67c2c11bdc0574e9a488ddade14150a4698" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytes" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" + +[[package]] +name = "c2-chacha" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15f1a1e56adbcfb7a96c51ec42e37a22ee5cda66c0eae80f9b94ff68a71d4759" +dependencies = [ + "cipher", + "ppv-lite86", +] + +[[package]] +name = "cached" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2afe73808fbaac302e39c9754bfc3c4b4d0f99c9c240b9f4e4efc841ad1b74" +dependencies = [ + "async-mutex", + "async-trait", + "cached_proc_macro", + "cached_proc_macro_types", + "futures", + "hashbrown 0.9.1", + "once_cell", +] + +[[package]] +name = "cached_proc_macro" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a685ba39b57a91a53d149dcbef854f50fbe204d1ff6081ea0bec3529a0c456" +dependencies = [ + "async-mutex", + "cached_proc_macro_types", + "darling 0.10.2", + "quote", + "syn", +] + +[[package]] +name = "cached_proc_macro_types" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a4f925191b4367301851c6d99b09890311d74b0d43f274c0b34c86d308a3663" + +[[package]] +name = "cc" +version = "1.0.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd" +dependencies = [ + "jobserver", +] + +[[package]] +name = "cexpr" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db507a7679252d2276ed0dd8113c6875ec56d3089f9225b2b42c30cc1f8e5c89" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +dependencies = [ + "libc", + "num-integer", + "num-traits", + "serde", + "time", + "winapi", +] + +[[package]] +name = "cipher" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +dependencies = [ + "generic-array 0.14.4", +] + +[[package]] +name = "clang-sys" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10612c0ec0e0a1ff0e97980647cb058a6e7aedb913d01d009c406b8b7d0b26ee" +dependencies = [ + "glob", + "libc", + "libloading 0.7.1", +] + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "cpufeatures" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +dependencies = [ + "libc", +] + +[[package]] +name = "cranelift-bforest" +version = "0.67.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f065f6889758f817f61a230220d1811ba99a9762af2fb69ae23048314f75ff2" +dependencies = [ + "cranelift-entity 0.67.0", +] + +[[package]] +name = "cranelift-bforest" +version = "0.68.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9221545c0507dc08a62b2d8b5ffe8e17ac580b0a74d1813b496b8d70b070fbd0" +dependencies = [ + "cranelift-entity 0.68.0", +] + +[[package]] +name = "cranelift-codegen" +version = "0.67.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "510aa2ab4307644100682b94e449940a0ea15c5887f1d4b9678b8dd5ef31e736" +dependencies = [ + "byteorder", + "cranelift-bforest 0.67.0", + "cranelift-codegen-meta 0.67.0", + "cranelift-codegen-shared 0.67.0", + "cranelift-entity 0.67.0", + "gimli 0.21.0", + "log", + "regalloc 0.0.30", + "serde", + "smallvec", + "target-lexicon 0.11.2", + "thiserror", +] + +[[package]] +name = "cranelift-codegen" +version = "0.68.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e9936ea608b6cd176f107037f6adbb4deac933466fc7231154f96598b2d3ab1" +dependencies = [ + "byteorder", + "cranelift-bforest 0.68.0", + "cranelift-codegen-meta 0.68.0", + "cranelift-codegen-shared 0.68.0", + "cranelift-entity 0.68.0", + "gimli 0.22.0", + "log", + "regalloc 0.0.31", + "smallvec", + "target-lexicon 0.11.2", + "thiserror", +] + +[[package]] +name = "cranelift-codegen-meta" +version = "0.67.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4cb0c7e87c60d63b35f9670c15479ee4a5e557dd127efab88b2f9b2ca83c9a0" +dependencies = [ + "cranelift-codegen-shared 0.67.0", + "cranelift-entity 0.67.0", +] + +[[package]] +name = "cranelift-codegen-meta" +version = "0.68.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ef2b2768568306540f4c8db3acce9105534d34c4a1e440529c1e702d7f8c8d7" +dependencies = [ + "cranelift-codegen-shared 0.68.0", + "cranelift-entity 0.68.0", +] + +[[package]] +name = "cranelift-codegen-shared" +version = "0.67.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60636227098693e06de8d6d88beea2a7d32ecf8a8030dacdb57c68e06f381826" + +[[package]] +name = "cranelift-codegen-shared" +version = "0.68.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6759012d6d19c4caec95793f052613e9d4113e925e7f14154defbac0f1d4c938" + +[[package]] +name = "cranelift-entity" +version = "0.67.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6156db73e0c9f65f80c512988d63ec736be0dee3dd66bf951e3e28aed9dc02d3" +dependencies = [ + "serde", +] + +[[package]] +name = "cranelift-entity" +version = "0.68.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86badbce14e15f52a45b666b38abe47b204969dd7f8fb7488cb55dd46b361fa6" +dependencies = [ + "serde", +] + +[[package]] +name = "cranelift-frontend" +version = "0.67.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e09cd158c9a820a4cc14a34076811da225cce1d31dc6d03c5ef85b91aef560b9" +dependencies = [ + "cranelift-codegen 0.67.0", + "log", + "smallvec", + "target-lexicon 0.11.2", +] + +[[package]] +name = "cranelift-frontend" +version = "0.68.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b608bb7656c554d0a4cf8f50c7a10b857e80306f6ff829ad6d468a7e2323c8d8" +dependencies = [ + "cranelift-codegen 0.68.0", + "log", + "smallvec", + "target-lexicon 0.11.2", +] + +[[package]] +name = "cranelift-native" +version = "0.67.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7054533ae1fc2048c1a6110bdf8f4314b77c60329ec6a7df79d2cfb84e3dcc1c" +dependencies = [ + "cranelift-codegen 0.67.0", + "raw-cpuid", + "target-lexicon 0.11.2", +] + +[[package]] +name = "cranelift-wasm" +version = "0.67.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aee0e0b68eba99f99a4923212d97aca9e44655ca8246f07fffe11236109b0d0" +dependencies = [ + "cranelift-codegen 0.67.0", + "cranelift-entity 0.67.0", + "cranelift-frontend 0.67.0", + "log", + "serde", + "thiserror", + "wasmparser 0.59.0", +] + +[[package]] +name = "crc32fast" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils", + "lazy_static", + "memoffset 0.6.4", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +dependencies = [ + "cfg-if 1.0.0", + "lazy_static", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array 0.14.4", + "subtle", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + +[[package]] +name = "darling" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" +dependencies = [ + "darling_core 0.10.2", + "darling_macro 0.10.2", +] + +[[package]] +name = "darling" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f2c43f534ea4b0b049015d00269734195e6d3f0f6635cb692251aca6f9f8b3c" +dependencies = [ + "darling_core 0.12.4", + "darling_macro 0.12.4", +] + +[[package]] +name = "darling_core" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.9.3", + "syn", +] + +[[package]] +name = "darling_core" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e91455b86830a1c21799d94524df0845183fa55bafd9aa137b01c7d1065fa36" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" +dependencies = [ + "darling_core 0.10.2", + "quote", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29b5acf0dea37a7f66f7b25d2c5e93fd46f8f6968b1a5d7a3e02e97768afc95a" +dependencies = [ + "darling_core 0.12.4", + "quote", + "syn", +] + +[[package]] +name = "derive_more" +version = "0.99.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40eebddd2156ce1bb37b20bbe5151340a31828b1f2d22ba4141f3531710e38df" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version 0.3.3", + "syn", +] + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array 0.12.4", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array 0.14.4", +] + +[[package]] +name = "dynasm" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdc2d9a5e44da60059bd38db2d05cbb478619541b8c79890547861ec1e3194f0" +dependencies = [ + "bitflags", + "byteorder", + "lazy_static", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dynasmrt" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42276e3f205fe63887cca255aa9a65a63fb72764c30b9a6252a7c7e46994f689" +dependencies = [ + "byteorder", + "dynasm", + "memmap2", +] + +[[package]] +name = "easy-ext" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53aff6fdc1b181225acdcb5b14c47106726fd8e486707315b1b138baed68ee31" + +[[package]] +name = "ed25519" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4620d40f6d2601794401d6dd95a5cf69b6c157852539470eeda433a99b3c0efc" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2", + "zeroize", +] + +[[package]] +name = "either" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" + +[[package]] +name = "elastic-array" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d63720ea2bc2e1b79f7aa044d9dc0b825f9ccb6930b32120f8fb9e873aa84bc" +dependencies = [ + "heapsize", +] + +[[package]] +name = "enumset" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbd795df6708a599abf1ee10eacc72efd052b7a5f70fdf0715e4d5151a6db9c3" +dependencies = [ + "enumset_derive", +] + +[[package]] +name = "enumset_derive" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e19c52f9ec503c8a68dc04daf71a04b07e690c32ab1a8b68e33897f255269d47" +dependencies = [ + "darling 0.12.4", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "errno" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa68f2fb9cae9d37c9b2b3584aba698a2e97f72d7aef7b9f7aa71d8b54ce46fe" +dependencies = [ + "errno-dragonfly", + "libc", + "winapi", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "ethbloom" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" +dependencies = [ + "crunchy", + "fixed-hash", + "impl-rlp", + "impl-serde", + "tiny-keccak", +] + +[[package]] +name = "ethereum-types" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f64b5df66a228d85e4b17e5d6c6aa43b0310898ffe8a85988c4c032357aaabfd" +dependencies = [ + "ethbloom", + "fixed-hash", + "impl-rlp", + "impl-serde", + "primitive-types", + "uint", +] + +[[package]] +name = "event-listener" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59" + +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + +[[package]] +name = "fixed-hash" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" +dependencies = [ + "byteorder", + "rand 0.8.4", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +dependencies = [ + "matches", + "percent-encoding", +] + +[[package]] +name = "fs_extra" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" + +[[package]] +name = "funty" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" + +[[package]] +name = "futures" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" + +[[package]] +name = "futures-executor" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" + +[[package]] +name = "futures-macro" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" +dependencies = [ + "autocfg", + "proc-macro-hack", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" + +[[package]] +name = "futures-task" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" + +[[package]] +name = "futures-util" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" +dependencies = [ + "autocfg", + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "proc-macro-hack", + "proc-macro-nested", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-array" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.10.2+wasi-snapshot-preview1", +] + +[[package]] +name = "gimli" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c" +dependencies = [ + "fallible-iterator", + "indexmap", + "stable_deref_trait", +] + +[[package]] +name = "gimli" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" +dependencies = [ + "fallible-iterator", + "indexmap", + "stable_deref_trait", +] + +[[package]] +name = "gimli" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" + +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" + +[[package]] +name = "hashbrown" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" + +[[package]] +name = "heapsize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" +dependencies = [ + "winapi", +] + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "impl-codec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp", +] + +[[package]] +name = "impl-serde" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b47ca4d2b6931707a55fce5cf66aff80e2178c8b63bbb4ecb5695cbc870ddf6f" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "indexmap" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" +dependencies = [ + "autocfg", + "hashbrown 0.11.2", + "serde", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "itoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + +[[package]] +name = "jemalloc-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d3b9f3f5c9b31aa0f5ed3260385ac205db665baa41d49bb8338008ae94ede45" +dependencies = [ + "cc", + "fs_extra", + "libc", +] + +[[package]] +name = "jemallocator" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43ae63fcfc45e99ab3d1b29a46782ad679e98436c3169d15a167a1108a724b69" +dependencies = [ + "jemalloc-sys", + "libc", +] + +[[package]] +name = "jobserver" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" +dependencies = [ + "libc", +] + +[[package]] +name = "keccak" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" + +[[package]] +name = "lazy-static-include" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6002fe04202bdaf9e8d82929a7c9ebfcf47d027d87f671818e8cf9ccb4029908" +dependencies = [ + "lazy_static", + "manifest-dir-macros", + "syn", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "leb128" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" + +[[package]] +name = "libc" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b2f96d100e1cf1929e7719b7edb3b90ab5298072638fccd77be9ce942ecdfce" + +[[package]] +name = "libloading" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883" +dependencies = [ + "cfg-if 1.0.0", + "winapi", +] + +[[package]] +name = "libloading" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0cf036d15402bea3c5d4de17b3fce76b3e4a56ebc1f577be0e7a72f7c607cf0" +dependencies = [ + "cfg-if 1.0.0", + "winapi", +] + +[[package]] +name = "librocksdb-sys" +version = "6.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c309a9d2470844aceb9a4a098cf5286154d20596868b75a6b36357d2bb9ca25d" +dependencies = [ + "bindgen", + "cc", + "glob", + "libc", +] + +[[package]] +name = "lock_api" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "lock_api" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "mach" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +dependencies = [ + "libc", +] + +[[package]] +name = "manifest-dir-macros" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca7bbc41d799583acd24ed05a9c3db3c9275c93491b4e7cde0e609bb9598f2f0" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "matches" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" + +[[package]] +name = "memchr" +version = "2.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" + +[[package]] +name = "memmap" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "memmap2" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "723e3ebdcdc5c023db1df315364573789f8857c11b631a2fdfad7c00f5c046b4" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memory_units" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" + +[[package]] +name = "miniz_oxide" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +dependencies = [ + "adler", + "autocfg", +] + +[[package]] +name = "more-asserts" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" + +[[package]] +name = "multisig2" +version = "0.4.0" +dependencies = [ + "near-primitives-core", + "near-sdk 4.0.0-pre.4", + "near-sdk-sim", +] + +[[package]] +name = "near-crypto" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb14bec070cfd808438712cda5d54703001b9cf1196c8afaeadc9514e06d00a3" +dependencies = [ + "arrayref", + "blake2", + "borsh", + "bs58", + "c2-chacha", + "curve25519-dalek", + "derive_more", + "ed25519-dalek", + "lazy_static", + "libc", + "parity-secp256k1", + "rand 0.7.3", + "rand_core 0.5.1", + "serde", + "serde_json", + "subtle", + "thiserror", +] + +[[package]] +name = "near-metrics" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7b9dcbc960db15fcec85bcb29a78b57e4005b7b1a0afc70a26a97453862528e" +dependencies = [ + "lazy_static", + "log", + "prometheus", +] + +[[package]] +name = "near-pool" +version = "0.1.0-pre.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bde79472f7cfc0675733b65f79f9e50c20bfbb9806298ab2872916869a45dccd" +dependencies = [ + "borsh", + "near-crypto", + "near-primitives", + "rand 0.7.3", +] + +[[package]] +name = "near-primitives" +version = "0.1.0-pre.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75ed2263518ca67a3c158c144813832fd96f48ab239494bb9d7793d315f31417" +dependencies = [ + "base64", + "borsh", + "bs58", + "byteorder", + "chrono", + "derive_more", + "easy-ext", + "hex", + "jemallocator", + "lazy_static", + "near-crypto", + "near-primitives-core", + "near-rpc-error-macro", + "near-vm-errors", + "num-rational", + "primitive-types", + "rand 0.7.3", + "reed-solomon-erasure", + "regex", + "serde", + "serde_json", + "sha2", + "smart-default", + "validator", +] + +[[package]] +name = "near-primitives-core" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2b3fb5acf3a494aed4e848446ef2d6ebb47dbe91c681105d4d1786c2ee63e52" +dependencies = [ + "base64", + "borsh", + "bs58", + "derive_more", + "hex", + "lazy_static", + "num-rational", + "serde", + "serde_json", + "sha2", +] + +[[package]] +name = "near-rpc-error-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffa8dbf8437a28ac40fcb85859ab0d0b8385013935b000c7a51ae79631dd74d9" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn", +] + +[[package]] +name = "near-rpc-error-macro" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c6111d713e90c7c551dee937f4a06cb9ea2672243455a4454cc7566387ba2d9" +dependencies = [ + "near-rpc-error-core", + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn", +] + +[[package]] +name = "near-runtime" +version = "4.0.0-pre.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e4c0a4cd2ee5ccbc1fd5d492180ebf33ac1159d721b2e0c58c11953131fb449" +dependencies = [ + "borsh", + "byteorder", + "ethereum-types", + "hex", + "lazy_static", + "log", + "near-crypto", + "near-metrics", + "near-primitives", + "near-runtime-utils", + "near-store", + "near-vm-errors", + "near-vm-logic", + "near-vm-runner", + "num-bigint", + "num-rational", + "num-traits", + "rand 0.7.3", + "serde", + "serde_json", +] + +[[package]] +name = "near-runtime-utils" +version = "4.0.0-pre.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a48d80c4ca1d4cf99bc16490e1e3d49826c150dfc4410ac498918e45c7d98e07" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "near-sdk" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7383e242d3e07bf0951e8589d6eebd7f18bb1c1fc5fbec3fad796041a6aebd1" +dependencies = [ + "base64", + "borsh", + "bs58", + "near-primitives-core", + "near-sdk-macros 3.1.0", + "near-vm-logic", + "serde", + "serde_json", + "wee_alloc", +] + +[[package]] +name = "near-sdk" +version = "4.0.0-pre.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f570e260eae9169dd5ffe0764728b872c2df79b8786dfb5e57183bd383908e" +dependencies = [ + "base64", + "borsh", + "bs58", + "near-primitives-core", + "near-sdk-macros 4.0.0-pre.4", + "near-sys", + "near-vm-logic", + "serde", + "serde_json", + "wee_alloc", +] + +[[package]] +name = "near-sdk-core" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284a78d9eb8eda58330462fa0023a6d7014c941df1f0387095e7dfd1dc0f2bce" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "near-sdk-macros" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2037337438f97d1ce5f7c896cf229dc56dacd5c01142d1ef95a7d778cde6ce7d" +dependencies = [ + "near-sdk-core", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "near-sdk-macros" +version = "4.0.0-pre.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65ddca18086f1ab14ce8541e0c23f503a322d45914f2fe08f571844045d32bde" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "near-sdk-sim" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f9be539455733f5cff63febaee07dcdc48c0a9940856257a1989e84a5552d7a" +dependencies = [ + "funty", + "lazy-static-include", + "near-crypto", + "near-pool", + "near-primitives", + "near-runtime", + "near-sdk 3.1.0", + "near-store", + "near-vm-logic", +] + +[[package]] +name = "near-store" +version = "0.1.0-pre.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e880d1d9a4ca5a1ca1ea0366fd80e295465f90cd0c1209f45d6d0b7a443ed4" +dependencies = [ + "borsh", + "byteorder", + "cached", + "derive_more", + "elastic-array", + "lazy_static", + "near-crypto", + "near-primitives", + "num_cpus", + "rand 0.7.3", + "rocksdb", + "serde", + "serde_json", + "strum", +] + +[[package]] +name = "near-sys" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6a7aa3f46fac44416d8a93d14f30a562c4d730a1c6bf14bffafab5f475c244a" + +[[package]] +name = "near-vm-errors" +version = "4.0.0-pre.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e281d8730ed8cb0e3e69fb689acee6b93cdb43824cd69a8ffd7e1bfcbd1177d7" +dependencies = [ + "borsh", + "hex", + "near-rpc-error-macro", + "serde", +] + +[[package]] +name = "near-vm-logic" +version = "4.0.0-pre.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e11cb28a2d07f37680efdaf860f4c9802828c44fc50c08009e7884de75d982c5" +dependencies = [ + "base64", + "borsh", + "bs58", + "byteorder", + "near-primitives-core", + "near-runtime-utils", + "near-vm-errors", + "serde", + "sha2", + "sha3", +] + +[[package]] +name = "near-vm-runner" +version = "4.0.0-pre.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93a66e94e12ec66a29674cc4efa975c280415aa0c944d7294cedbdb0c3858b48" +dependencies = [ + "anyhow", + "borsh", + "cached", + "log", + "near-primitives", + "near-vm-errors", + "near-vm-logic", + "parity-wasm", + "pwasm-utils", + "tracing", + "wasmer", + "wasmer-compiler-singlepass", + "wasmer-runtime-core-near", + "wasmer-runtime-near", + "wasmer-types", + "wasmtime", +] + +[[package]] +name = "nix" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2e0b4f3320ed72aaedb9a5ac838690a8047c7b275da22711fddff4f8a14229" +dependencies = [ + "bitflags", + "cc", + "cfg-if 0.1.10", + "libc", + "void", +] + +[[package]] +name = "nom" +version = "6.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c5c51b9083a3c620fa67a2a635d1ce7d95b897e957d6b28ff9a5da960a103a6" +dependencies = [ + "bitvec 0.19.5", + "funty", + "memchr", + "version_check", +] + +[[package]] +name = "num-bigint" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", + "serde", +] + +[[package]] +name = "num-traits" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37fd5004feb2ce328a52b0b3d01dbf4ffff72583493900ed15f22d4111c51693" +dependencies = [ + "crc32fast", + "indexmap", + "wasmparser 0.57.0", +] + +[[package]] +name = "object" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397" +dependencies = [ + "crc32fast", + "indexmap", +] + +[[package]] +name = "object" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170" + +[[package]] +name = "once_cell" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "page_size" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eebde548fbbf1ea81a99b128872779c437752fb99f217c45245e1a61dcd9edcd" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "parity-scale-codec" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" +dependencies = [ + "arrayvec 0.7.1", + "bitvec 0.20.4", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" +dependencies = [ + "proc-macro-crate 1.1.0", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "parity-secp256k1" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fca4f82fccae37e8bbdaeb949a4a218a1bbc485d11598f193d2a908042e5fc1" +dependencies = [ + "arrayvec 0.5.2", + "cc", + "cfg-if 0.1.10", + "rand 0.7.3", +] + +[[package]] +name = "parity-wasm" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" + +[[package]] +name = "parking_lot" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" +dependencies = [ + "lock_api 0.3.4", + "parking_lot_core 0.7.2", +] + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api 0.4.5", + "parking_lot_core 0.8.5", +] + +[[package]] +name = "parking_lot_core" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +dependencies = [ + "cfg-if 0.1.10", + "cloudabi", + "libc", + "redox_syscall 0.1.57", + "smallvec", + "winapi", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +dependencies = [ + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall 0.2.10", + "smallvec", + "winapi", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "percent-encoding" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" + +[[package]] +name = "pest" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +dependencies = [ + "ucd-trie", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "ppv-lite86" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ca011bd0129ff4ae15cd04c4eef202cadf6c51c21e47aba319b4e0501db741" + +[[package]] +name = "primitive-types" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06345ee39fbccfb06ab45f3a1a5798d9dafa04cb8921a76d227040003a234b0e" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-crate" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" +dependencies = [ + "thiserror", + "toml", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-hack" +version = "0.5.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" + +[[package]] +name = "proc-macro-nested" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" + +[[package]] +name = "proc-macro2" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc3358ebc67bc8b7fa0c007f945b0b18226f78437d61bec735a9eb96b61ee70" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "prometheus" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8425533e7122f0c3cc7a37e6244b16ad3a2cc32ae7ac6276e2a75da0d9c200d" +dependencies = [ + "cfg-if 1.0.0", + "fnv", + "lazy_static", + "parking_lot 0.11.2", + "protobuf", + "regex", + "thiserror", +] + +[[package]] +name = "protobuf" +version = "2.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23129d50f2c9355ced935fce8a08bd706ee2e7ce2b3b33bf61dace0e379ac63a" + +[[package]] +name = "pwasm-utils" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f7a12f176deee919f4ba55326ee17491c8b707d0987aed822682c821b660192" +dependencies = [ + "byteorder", + "log", + "parity-wasm", +] + +[[package]] +name = "quote" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" + +[[package]] +name = "radium" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", +] + +[[package]] +name = "rand" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.3", + "rand_hc 0.3.1", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.3", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +dependencies = [ + "getrandom 0.2.3", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_hc" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" +dependencies = [ + "rand_core 0.6.3", +] + +[[package]] +name = "raw-cpuid" +version = "7.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "beb71f708fe39b2c5e98076204c3cc094ee5a4c12c4cdb119a2b72dc34164f41" +dependencies = [ + "bitflags", + "cc", + "rustc_version 0.2.3", +] + +[[package]] +name = "rayon" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" +dependencies = [ + "autocfg", + "crossbeam-deque", + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "lazy_static", + "num_cpus", +] + +[[package]] +name = "redox_syscall" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" + +[[package]] +name = "redox_syscall" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +dependencies = [ + "bitflags", +] + +[[package]] +name = "reed-solomon-erasure" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a415a013dd7c5d4221382329a5a3482566da675737494935cbbbcdec04662f9d" +dependencies = [ + "smallvec", +] + +[[package]] +name = "regalloc" +version = "0.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2041c2d34f6ff346d6f428974f03d8bf12679b0c816bb640dc5eb1d48848d8d1" +dependencies = [ + "log", + "rustc-hash", + "smallvec", +] + +[[package]] +name = "regalloc" +version = "0.0.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" +dependencies = [ + "log", + "rustc-hash", + "smallvec", +] + +[[package]] +name = "regex" +version = "1.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a26af418b574bd56588335b3a3659a65725d4e636eb1016c2f9e3b38c7cc759" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" + +[[package]] +name = "region" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877e54ea2adcd70d80e9179344c97f93ef0dffd6b03e1f4529e6e83ab2fa9ae0" +dependencies = [ + "bitflags", + "libc", + "mach", + "winapi", +] + +[[package]] +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +dependencies = [ + "winapi", +] + +[[package]] +name = "rlp" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "999508abb0ae792aabed2460c45b89106d97fe4adac593bdaef433c2605847b5" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[package]] +name = "rocksdb" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d83c02c429044d58474eaf5ae31e062d0de894e21125b47437ec0edc1397e6" +dependencies = [ + "libc", + "librocksdb-sys", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver 0.9.0", +] + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser 0.7.0", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser 0.10.2", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-bench" +version = "0.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d733da87e79faaac25616e33d26299a41143fd4cd42746cbb0e91d8feea243fd" +dependencies = [ + "byteorder", + "serde", +] + +[[package]] +name = "serde_bytes" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" +dependencies = [ + "block-buffer", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer", + "digest 0.9.0", + "keccak", + "opaque-debug", +] + +[[package]] +name = "shlex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" + +[[package]] +name = "signature" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" + +[[package]] +name = "slab" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" + +[[package]] +name = "smallvec" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" + +[[package]] +name = "smart-default" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "133659a15339456eeeb07572eb02a91c91e9815e9cbc89566944d2c8d3efdbf6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strum" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7318c509b5ba57f18533982607f24070a55d353e90d4cae30c467cdb2ad5ac5c" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee8bc6b87a5112aeeab1f4a9f7ab634fe6cbefc4850006df31267f4cfb9e3149" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "syn" +version = "1.0.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4211ce9909eb971f111059df92c45640aad50a619cf55cd76476be803c4c68e6" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "unicode-xid", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "target-lexicon" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d" + +[[package]] +name = "target-lexicon" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "422045212ea98508ae3d28025bc5aaa2bd4a9cdaecd442a08da2ee620ee9ea95" + +[[package]] +name = "tempfile" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "rand 0.8.4", + "redox_syscall 0.2.10", + "remove_dir_all", + "winapi", +] + +[[package]] +name = "thiserror" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "time" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83b2a3d4d9091d0abd7eba4dc2710b1718583bd4d8992e2190720ea38f391f7" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + +[[package]] +name = "toml" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +dependencies = [ + "serde", +] + +[[package]] +name = "tracing" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" +dependencies = [ + "cfg-if 1.0.0", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "typenum" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" + +[[package]] +name = "ucd-trie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" + +[[package]] +name = "uint" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6470ab50f482bde894a037a57064480a246dbfdd5960bd65a44824693f08da5f" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" + +[[package]] +name = "unicode-normalization" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" + +[[package]] +name = "unicode-xid" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" + +[[package]] +name = "url" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +dependencies = [ + "form_urlencoded", + "idna", + "matches", + "percent-encoding", +] + +[[package]] +name = "validator" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d6937c33ec6039d8071bcf72933146b5bbe378d645d8fa59bdadabfc2a249" +dependencies = [ + "idna", + "lazy_static", + "regex", + "serde", + "serde_derive", + "serde_json", + "url", + "validator_types", +] + +[[package]] +name = "validator_types" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad9680608df133af2c1ddd5eaf1ddce91d60d61b6bc51494ef326458365a470a" + +[[package]] +name = "version_check" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" + +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" + +[[package]] +name = "wasmer" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a70cfae554988d904d64ca17ab0e7cd652ee5c8a0807094819c1ea93eb9d6866" +dependencies = [ + "cfg-if 0.1.10", + "indexmap", + "more-asserts", + "target-lexicon 0.11.2", + "thiserror", + "wasmer-compiler", + "wasmer-compiler-cranelift", + "wasmer-derive", + "wasmer-engine", + "wasmer-engine-jit", + "wasmer-engine-native", + "wasmer-types", + "wasmer-vm", + "wat", + "winapi", +] + +[[package]] +name = "wasmer-compiler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b7732a9cab472bd921d5a0c422f45b3d03f62fa2c40a89e0770cef6d47e383e" +dependencies = [ + "enumset", + "serde", + "serde_bytes", + "smallvec", + "target-lexicon 0.11.2", + "thiserror", + "wasmer-types", + "wasmer-vm", + "wasmparser 0.65.0", +] + +[[package]] +name = "wasmer-compiler-cranelift" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48cb9395f094e1d81534f4c5e330ed4cdb424e8df870d29ad585620284f5fddb" +dependencies = [ + "cranelift-codegen 0.68.0", + "cranelift-frontend 0.68.0", + "gimli 0.22.0", + "more-asserts", + "rayon", + "serde", + "smallvec", + "tracing", + "wasmer-compiler", + "wasmer-types", + "wasmer-vm", +] + +[[package]] +name = "wasmer-compiler-singlepass" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "426ae6ef0f606ca815510f3e2ef6f520e217514bfb7a664defe180b9a9e75d07" +dependencies = [ + "byteorder", + "dynasm", + "dynasmrt", + "lazy_static", + "more-asserts", + "rayon", + "serde", + "smallvec", + "wasmer-compiler", + "wasmer-types", + "wasmer-vm", +] + +[[package]] +name = "wasmer-derive" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b86dcd2c3efdb8390728a2b56f762db07789aaa5aa872a9dc776ba3a7912ed" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "wasmer-engine" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efe4667d6bd888f26ae8062a63a9379fa697415b4b4e380f33832e8418fd71b5" +dependencies = [ + "backtrace", + "bincode", + "lazy_static", + "memmap2", + "more-asserts", + "rustc-demangle", + "serde", + "serde_bytes", + "target-lexicon 0.11.2", + "thiserror", + "wasmer-compiler", + "wasmer-types", + "wasmer-vm", +] + +[[package]] +name = "wasmer-engine-jit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26770be802888011b4a3072f2a282fc2faa68aa48c71b3db6252a3937a85f3da" +dependencies = [ + "bincode", + "cfg-if 0.1.10", + "region", + "serde", + "serde_bytes", + "wasmer-compiler", + "wasmer-engine", + "wasmer-types", + "wasmer-vm", + "winapi", +] + +[[package]] +name = "wasmer-engine-native" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bb4083a6c69f2cd4b000b82a80717f37c6cc2e536aee3a8ffe9af3edc276a8b" +dependencies = [ + "bincode", + "cfg-if 0.1.10", + "leb128", + "libloading 0.6.7", + "serde", + "tempfile", + "tracing", + "wasmer-compiler", + "wasmer-engine", + "wasmer-object", + "wasmer-types", + "wasmer-vm", + "which", +] + +[[package]] +name = "wasmer-object" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf8e0c12b82ff81ebecd30d7e118be5fec871d6de885a90eeb105df0a769a7b" +dependencies = [ + "object 0.22.0", + "thiserror", + "wasmer-compiler", + "wasmer-types", +] + +[[package]] +name = "wasmer-runtime-core-near" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08ff9059d479dbff357e1953edbde198453d5421274119230c50754e61e8ec9f" +dependencies = [ + "bincode", + "blake3", + "cc", + "digest 0.8.1", + "errno", + "hex", + "indexmap", + "lazy_static", + "libc", + "nix", + "page_size", + "parking_lot 0.10.2", + "rustc_version 0.2.3", + "serde", + "serde-bench", + "serde_bytes", + "serde_derive", + "smallvec", + "target-lexicon 0.10.0", + "wasmparser 0.51.4", + "winapi", +] + +[[package]] +name = "wasmer-runtime-near" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6660e86bc7697fa29bab902214d5b33d394a990826c401b10816bcd285f938f" +dependencies = [ + "lazy_static", + "memmap", + "serde", + "serde_derive", + "wasmer-runtime-core-near", + "wasmer-singlepass-backend-near", +] + +[[package]] +name = "wasmer-singlepass-backend-near" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3f23543ef8f59667be4945c22eb4b1a50a79ff340555f6f23354223d2695541" +dependencies = [ + "bincode", + "byteorder", + "dynasm", + "dynasmrt", + "lazy_static", + "libc", + "nix", + "serde", + "serde_derive", + "smallvec", + "wasmer-runtime-core-near", +] + +[[package]] +name = "wasmer-types" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f4ac28c2951cd792c18332f03da523ed06b170f5cf6bb5b1bdd7e36c2a8218" +dependencies = [ + "cranelift-entity 0.68.0", + "serde", + "thiserror", +] + +[[package]] +name = "wasmer-vm" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7635ba0b6d2fd325f588d69a950ad9fa04dddbf6ad08b6b2a183146319bf6ae" +dependencies = [ + "backtrace", + "cc", + "cfg-if 0.1.10", + "indexmap", + "libc", + "memoffset 0.6.4", + "more-asserts", + "region", + "serde", + "thiserror", + "wasmer-types", + "winapi", +] + +[[package]] +name = "wasmparser" +version = "0.51.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeb1956b19469d1c5e63e459d29e7b5aa0f558d9f16fcef09736f8a265e6c10a" + +[[package]] +name = "wasmparser" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32fddd575d477c6e9702484139cf9f23dcd554b06d185ed0f56c857dd3a47aa6" + +[[package]] +name = "wasmparser" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a950e6a618f62147fd514ff445b2a0b53120d382751960797f85f058c7eda9b9" + +[[package]] +name = "wasmparser" +version = "0.65.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc2fe6350834b4e528ba0901e7aa405d78b89dc1fa3145359eb4de0e323fcf" + +[[package]] +name = "wasmtime" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373b87ebd6721f4121e28eeaaa41943548c48bcca04ac9bb063004207e5e7d70" +dependencies = [ + "anyhow", + "backtrace", + "bincode", + "cfg-if 0.1.10", + "lazy_static", + "libc", + "log", + "region", + "rustc-demangle", + "serde", + "smallvec", + "target-lexicon 0.11.2", + "wasmparser 0.59.0", + "wasmtime-environ", + "wasmtime-jit", + "wasmtime-profiling", + "wasmtime-runtime", + "winapi", +] + +[[package]] +name = "wasmtime-cranelift" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c01df908e54d40bed80326ade122825d464888991beafd950d186f1be309c2" +dependencies = [ + "cranelift-codegen 0.67.0", + "cranelift-entity 0.67.0", + "cranelift-frontend 0.67.0", + "cranelift-wasm", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-debug" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28962772f96fadb79dc7be5ade135ca55d2b0017a012f4869e2476a03abbe733" +dependencies = [ + "anyhow", + "gimli 0.21.0", + "more-asserts", + "object 0.21.1", + "target-lexicon 0.11.2", + "thiserror", + "wasmparser 0.59.0", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-environ" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c0d7401bf253b7b1f426afd70d285bb23ea9a1c7605d6af788c95db5084edf5" +dependencies = [ + "anyhow", + "cfg-if 0.1.10", + "cranelift-codegen 0.67.0", + "cranelift-entity 0.67.0", + "cranelift-wasm", + "gimli 0.21.0", + "indexmap", + "log", + "more-asserts", + "serde", + "thiserror", + "wasmparser 0.59.0", +] + +[[package]] +name = "wasmtime-jit" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c838a108318e7c5a2201addb3d3b27a6ef3d142f0eb0addc815b9c2541e5db5" +dependencies = [ + "anyhow", + "cfg-if 0.1.10", + "cranelift-codegen 0.67.0", + "cranelift-entity 0.67.0", + "cranelift-frontend 0.67.0", + "cranelift-native", + "cranelift-wasm", + "gimli 0.21.0", + "log", + "more-asserts", + "object 0.21.1", + "region", + "serde", + "target-lexicon 0.11.2", + "thiserror", + "wasmparser 0.59.0", + "wasmtime-cranelift", + "wasmtime-debug", + "wasmtime-environ", + "wasmtime-obj", + "wasmtime-profiling", + "wasmtime-runtime", + "winapi", +] + +[[package]] +name = "wasmtime-obj" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc8422b0acce519b74c3ae5db59167c611ea92220e5c334ad406e977277e0f23" +dependencies = [ + "anyhow", + "more-asserts", + "object 0.21.1", + "target-lexicon 0.11.2", + "wasmtime-debug", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-profiling" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33f2689bf523f843555e57e24d59abf0c5013007366b866081d73a15e510b4b2" +dependencies = [ + "anyhow", + "cfg-if 0.1.10", + "lazy_static", + "libc", + "serde", + "target-lexicon 0.11.2", + "wasmtime-environ", + "wasmtime-runtime", +] + +[[package]] +name = "wasmtime-runtime" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7353f5e79390048128e44b5ceda7255723b2066de4026df9a168b0b2593df71" +dependencies = [ + "backtrace", + "cc", + "cfg-if 0.1.10", + "indexmap", + "lazy_static", + "libc", + "log", + "memoffset 0.5.6", + "more-asserts", + "region", + "thiserror", + "wasmtime-environ", + "winapi", +] + +[[package]] +name = "wast" +version = "38.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae0d7b256bef26c898fa7344a2d627e8499f5a749432ce0a05eae1a64ff0c271" +dependencies = [ + "leb128", +] + +[[package]] +name = "wat" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adcfaeb27e2578d2c6271a45609f4a055e6d7ba3a12eff35b1fd5ba147bdf046" +dependencies = [ + "wast", +] + +[[package]] +name = "wee_alloc" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" +dependencies = [ + "cfg-if 0.1.10", + "libc", + "memory_units", + "winapi", +] + +[[package]] +name = "which" +version = "4.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea187a8ef279bc014ec368c27a920da2024d2a711109bfbe3440585d5cf27ad9" +dependencies = [ + "either", + "lazy_static", + "libc", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "wyz" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" + +[[package]] +name = "zeroize" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf68b08513768deaa790264a7fac27a58cbf2705cfcdc9448362229217d7e970" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdff2024a851a322b08f179173ae2ba620445aef1e838f0c196820eade4ae0c7" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] diff --git a/multisig2/Cargo.toml b/multisig2/Cargo.toml new file mode 100644 index 00000000..ed959496 --- /dev/null +++ b/multisig2/Cargo.toml @@ -0,0 +1,28 @@ +[package] +name = "multisig2" +version = "0.4.0" +authors = ["Near Inc "] +edition = "2018" +publish = false + +[lib] +# Below is used for production +# crate-type = ["cdylib"] +# Below used when running simulation tests +crate-type = ["cdylib", "rlib"] + +[profile.release] +codegen-units = 1 +# Tell `rustc` to optimize for small code size. +opt-level = "s" +lto = true +debug = false +panic = "abort" +overflow-checks = true + +[dependencies] +near-sdk = "4.0.0-pre.4" + +[dev-dependencies] +near-sdk-sim = "3.2.0" +near-primitives-core = "0.4.0" diff --git a/multisig2/README.md b/multisig2/README.md new file mode 100644 index 00000000..6608ab26 --- /dev/null +++ b/multisig2/README.md @@ -0,0 +1,271 @@ +# Multisig contract + +*Please do your own due diligence before using this contract. There is no guarantee that this contract doesn't have issues.* + +This contract provides: + - Set K out of N multi sig scheme + - Request to sign transfers, function calls, adding and removing keys. + - Any of the access keys or set of specified accounts can confirm, until the required number of confirmation achieved. + +## Multisig implementation details + +Multisig uses set of `FunctionCall` `AccessKey`s and account ids as a set of allowed N members. +When contract is being setup, it should be initialized with set of members that will be initially managing this account. +All operations going forward will require `K` members to call `confirm` to be executed. + +### Initialization + +### Request + +There are number of different request types that multisig can confirm and execute: +```rust +/// Lowest level action that can be performed by the multisig contract. +pub enum MultiSigRequestAction { + /// Transfers given amount to receiver. + Transfer { + amount: U128, + }, + /// Create a new account. + CreateAccount, + /// Deploys contract to receiver's account. Can upgrade given contract as well. + DeployContract { code: Base64VecU8 }, + /// Adds new member to multisig, either public key or account. + AddMember { + member: MultisigMember, + }, + /// Delete existing member from multisig, either public key or account. + DeleteMember { + member: MultisigMember, + }, + /// Adds key, either new key for multisig or full access key to another account. + AddKey { + public_key: Base58PublicKey, + #[serde(skip_serializing_if = "Option::is_none")] + permission: Option, + }, + /// Call function on behalf of this contract. + FunctionCall { + method_name: String, + args: Base64VecU8, + deposit: U128, + gas: U64, + }, + /// Sets number of confirmations required to authorize requests. + /// Can not be bundled with any other actions or transactions. + SetNumConfirmations { + num_confirmations: u32, + }, + /// Sets number of active requests (unconfirmed requests) per access key + /// Default is 12 unconfirmed requests at a time + /// The REQUEST_COOLDOWN for requests is 15min + /// Worst gas attack a malicious keyholder could do is 12 requests every 15min + SetActiveRequestsLimit { + active_requests_limit: u32, + }, +} + +/// Permission for an access key, scoped to receiving account and method names with allowance to add when key is added to accoount +pub struct FunctionCallPermission { + allowance: Option, + receiver_id: AccountId, + method_names: Vec, +} + +/// The request the user makes specifying the receiving account and actions they want to execute (1 tx) +pub struct MultiSigRequest { + receiver_id: AccountId, + actions: Vec, +} + +/// An internal request wrapped with the signer_pk and added timestamp to determine num_requests_pk and prevent against malicious key holder gas attacks +pub struct MultiSigRequestWithSigner { + request: MultiSigRequest, + member: MultisigMember, + added_timestamp: u64, +} + +/// Represents member of the multsig: either account or access key to given account. +pub enum MultisigMember { + AccessKey { public_key: Base58PublicKey }, + Account { account_id: AccountId }, +} +``` + +### Methods + +```rust +/// Add request for multisig. +pub fn add_request(&mut self, request: MultiSigRequest) -> RequestId { + +/// Add request for multisig and confirm right away with the key that is adding the request. +pub fn add_request_and_confirm(&mut self, request: MultiSigRequest) -> RequestId { + +/// Remove given request and associated confirmations. +pub fn delete_request(&mut self, request_id: RequestId) { + +/// Confirm given request with given signing key. +/// If with this, there has been enough confirmation, a promise with request will be scheduled. +pub fn confirm(&mut self, request_id: RequestId) -> PromiseOrValue { +``` + +### View Methods +```rust +pub fn get_request(&self, request_id: RequestId) -> MultiSigRequest +pub fn get_num_requests_per_member(&self, member: MultisigMember) -> u32 +pub fn list_request_ids(&self) -> Vec +pub fn get_confirmations(&self, request_id: RequestId) -> Vec +pub fn get_num_confirmations(&self) -> u32 +pub fn get_request_nonce(&self) -> u32 +``` + +### State machine + +Per each request, multisig maintains next state machine: + - `add_request` adds new request with empty list of confirmations. + - `add_request_and_confirm` adds new request with 1 confirmation from the adding key. + - `delete_request` deletes request and ends state machine. + - `confirm` either adds new confirmation to list of confirmations or if there is more than `num_confirmations` confirmations with given call - switches to execution of request. `confirm` fails if request is already has been confirmed and already is executing which is determined if `confirmations` contain given `request_id`. + - each step of execution, schedules a promise of given set of actions on `receiver_id` and puts a callback. + - when callback executes, it checks if promise executed successfully: if no - stops executing the request and return failure. If yes - execute next transaction in the request if present. + - when all transactions are executed, remove request from `requests` and with that finish the execution of the request. + +## Pre-requisites + +To develop Rust contracts you would need to: +* Install [Rustup](https://rustup.rs/): +```bash +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +``` +* Add wasm target to your toolchain: +```bash +rustup target add wasm32-unknown-unknown +``` + +## Building the contract + +```bash +./build.sh +``` + +## Usage + +Before deploying the contract, you need to collect all public keys that it will be initialized with. + +Commands to deploy and initialize a 2 out of 3 multisig contract via `near repl`: + +```javascript +const fs = require('fs'); +const account = await near.account("illia"); +const contractName = "multisig.illia"; +const methodNames = ["add_request","delete_request","confirm"]; +const newArgs = {"num_confirmations": 2, "members": [ + { "public_key": "ed25519:Eg2jtsiMrprn7zgKKUk79qM1hWhANsFyE6JSX4txLEuy" }, + { "public_key": "ed25519:HghiythFFPjVXwc9BLNi8uqFmfQc1DWFrJQ4nE6ANo7R" }, + { "public_key": "ed25519:2EfbwnQHPBWQKbNczLiVznFghh9qs716QT71zN6L1D95" }, + { "account_id": "illia" }, + ]}; +const result = account.signAndSendTransaction( + contractName, + [ + nearAPI.transactions.createAccount(), + nearAPI.transactions.transfer("100000000000000000000000000"), + nearAPI.transactions.deployContract(fs.readFileSync("res/multisig.wasm")), + nearAPI.transactions.functionCall("new", Buffer.from(JSON.stringify(newArgs)), 10000000000000, "0"), + ]); +``` + +### Create request + +To create request for transfer funds: +```bash +near call multisig.illia add_request '{"request": {"receiver_id": "illia", "actions": [{"type": "Transfer", "amount": "1000000000000000000000"}]}}' --accountId multisig.illia +``` + +Add another key to multisig: +```bash +near call multisig.illia add_request '{"request": {"receiver_id": "multisig.illia", "actions": [{"type": "AddMember", "member": {"public_key": "ed25519:"}}]}}' --accountId multisig.illia +``` + +Change number of confirmations required to approve multisig: +```bash +near call multisig.illia add_request '{"request": {"receiver_id": "multisig.illia", "actions": [{"type": "SetNumConfirmations", "num_confirmations": 2}]}}' --accountId multisig.illia +``` + +Returns the `request_id` of this request that can be used to confirm or see details. + +As a side note, for this to work one of the keys from multisig should be available in your `~/.near-credentials//.json` or use `--useLedgerKey` to sign with Ledger. + +You can also create a way more complex call that chains calling multiple different contracts: + +### Confirm request + +To confirm a specific request: +```bash +near call multisig.illia confirm '{"request_id": 0}' --accountId multisig.illia +``` + +### View requests + +To list all requests ids: +```bash +near view multisig.illia list_request_ids +``` + +To see information about specific request: +```bash +near view multisig.illia get_request '{"request_id": 0}' +``` + +To see confirmations for specific request: +```bash +near view multisig.illia get_confirmations '{"request_id": 0}' +``` + +Total confirmations required for any request: +``` +near view multisig.illia get_num_confirmations +``` + +### Upgrade given multisig with new code + +Create a request that deploys new contract code on the given account. +Be careful about data and requiring migrations (contract updates should include data migrations going forward). + +```javascript +const fs = require('fs'); +const account = await near.account("multisig.illia"); +const contractName = "multisig.illia"; +const requestArgs = {"request": [ + {"receiver_id": "multisig.illia", "actions": [{"type": "DeployContract", "code": fs.readFileSync("res/multisig.wasm")}]} +]}; +const result = account.signAndSendTransaction( + contractName, + [ + nearAPI.transactions.functionCall("add_request", Buffer.from(JSON.stringify(requestArgs)), 10000000000000, "0"), + ]); +``` + +After this, still will need to confirm this with `num_confirmations` you have setup for given contract. + +### Common commands for multisig + +__Create an account__ + +``` +near call illia.near add_request '{"request": {"receiver_id": "new_account.near", "actions": [{"type", "CreateAccount"}, {"type": "Transfer", "amount": "1000000000000000000000"}, {"type": "AddKey", "public_key": ""}]}}' --accountId illia.near +near call illia.near confirm '{"request_id": }' +``` + +## Deploying and building + +This repository has simulation tests, which can offer more advanced testing functionality than unit tests. However, this means the manifest (`Cargo.toml`) should be modified to reduce the contract size when building for production. + +Remove the `rlib` like shown here: + +```diff +[lib] +# Below is used for production ++crate-type = ["cdylib"] +# Below used when running simulation tests ++# crate-type = ["cdylib", "rlib"] +``` \ No newline at end of file diff --git a/multisig2/build.sh b/multisig2/build.sh new file mode 100755 index 00000000..e69b7baa --- /dev/null +++ b/multisig2/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +RUSTFLAGS='-C link-arg=-s' cargo +stable build --target wasm32-unknown-unknown --release +cp target/wasm32-unknown-unknown/release/multisig2.wasm ./res/ diff --git a/multisig2/res/multisig2.wasm b/multisig2/res/multisig2.wasm new file mode 100755 index 00000000..45cfacd5 Binary files /dev/null and b/multisig2/res/multisig2.wasm differ diff --git a/multisig2/src/lib.rs b/multisig2/src/lib.rs new file mode 100644 index 00000000..052bfabb --- /dev/null +++ b/multisig2/src/lib.rs @@ -0,0 +1,878 @@ +use std::collections::HashSet; +use std::convert::TryInto; + +use near_sdk::borsh::{self, BorshDeserialize, BorshSerialize}; +use near_sdk::collections::{LookupMap, UnorderedMap, UnorderedSet}; +use near_sdk::json_types::{Base64VecU8, U128, U64}; +use near_sdk::serde::{Deserialize, Serialize}; +use near_sdk::{ + env, near_bindgen, serde_json, AccountId, BorshStorageKey, Gas, PanicOnDefault, Promise, + PromiseOrValue, PublicKey, +}; + +/// Unlimited allowance for multisig keys. +const DEFAULT_ALLOWANCE: u128 = 0; + +/// Request cooldown period (time before a request can be deleted) +const REQUEST_COOLDOWN: u64 = 900_000_000_000; + +/// Default limit of active requests. +const ACTIVE_REQUESTS_LIMIT: u32 = 12; + +/// Default set of methods that access key should have. +const MULTISIG_METHOD_NAMES: &str = "add_request,delete_request,confirm,add_and_confirm_request"; + +pub type RequestId = u32; + +/// Permissions for function call access key. +#[derive(BorshDeserialize, BorshSerialize, Serialize, Deserialize)] +#[cfg_attr(test, derive(PartialEq, Clone))] +#[serde(crate = "near_sdk::serde")] +pub struct FunctionCallPermission { + allowance: Option, + receiver_id: AccountId, + method_names: Vec, +} + +/// Lowest level action that can be performed by the multisig contract. +#[derive(BorshDeserialize, BorshSerialize, Serialize, Deserialize)] +#[cfg_attr(test, derive(PartialEq, Clone))] +#[serde(tag = "type", crate = "near_sdk::serde")] +pub enum MultiSigRequestAction { + /// Transfers given amount to receiver. + Transfer { amount: U128 }, + /// Create a new account. + CreateAccount, + /// Deploys contract to receiver's account. Can upgrade given contract as well. + DeployContract { code: Base64VecU8 }, + /// Add new member of the multisig. + AddMember { member: MultisigMember }, + /// Remove existing member of the multisig. + DeleteMember { member: MultisigMember }, + /// Adds full access key to another account. + AddKey { + public_key: PublicKey, + #[serde(skip_serializing_if = "Option::is_none")] + permission: Option, + }, + /// Call function on behalf of this contract. + FunctionCall { + method_name: String, + args: Base64VecU8, + deposit: U128, + gas: U64, + }, + /// Sets number of confirmations required to authorize requests. + /// Can not be bundled with any other actions or transactions. + SetNumConfirmations { num_confirmations: u32 }, + /// Sets number of active requests (unconfirmed requests) per access key + /// Default is 12 unconfirmed requests at a time + /// The REQUEST_COOLDOWN for requests is 15min + /// Worst gas attack a malicious keyholder could do is 12 requests every 15min + SetActiveRequestsLimit { active_requests_limit: u32 }, +} + +/// The request the user makes specifying the receiving account and actions they want to execute (1 tx) +#[derive(BorshDeserialize, BorshSerialize, Serialize, Deserialize)] +#[cfg_attr(test, derive(PartialEq, Clone))] +#[serde(crate = "near_sdk::serde")] +pub struct MultiSigRequest { + receiver_id: AccountId, + actions: Vec, +} + +/// An internal request wrapped with the signer_pk and added timestamp to determine num_requests_pk and prevent against malicious key holder gas attacks +#[derive(BorshDeserialize, BorshSerialize, Serialize, Deserialize)] +#[cfg_attr(test, derive(PartialEq, Clone))] +#[serde(crate = "near_sdk::serde")] +pub struct MultiSigRequestWithSigner { + request: MultiSigRequest, + member: MultisigMember, + added_timestamp: u64, +} + +/// Represents member of the multsig: either account or access key to given account. +#[derive(Debug, BorshDeserialize, BorshSerialize, Clone, PartialEq, Serialize, Deserialize)] +#[serde(crate = "near_sdk::serde", untagged)] +pub enum MultisigMember { + AccessKey { public_key: PublicKey }, + Account { account_id: AccountId }, +} + +impl ToString for MultisigMember { + fn to_string(&self) -> String { + serde_json::to_string(&self).unwrap_or_else(|_| env::panic_str("Failed to serialize")) + } +} + +#[derive(BorshStorageKey, BorshSerialize)] +pub enum StorageKeys { + Members, + Requests, + Confirmations, + NumRequestsPk, +} + +#[near_bindgen] +#[derive(BorshDeserialize, BorshSerialize, PanicOnDefault)] +pub struct MultiSigContract { + /// Members of the multisig. + members: UnorderedSet, + /// Number of confirmations required. + num_confirmations: u32, + /// Latest request nonce. + request_nonce: RequestId, + /// All active requests. + requests: UnorderedMap, + /// All confirmations for active requests. + confirmations: LookupMap>, + /// Number of requests per member. + num_requests_pk: LookupMap, + /// Limit number of active requests per member. + active_requests_limit: u32, +} + +#[inline] +fn assert(condition: bool, error: &str) { + if !condition { + env::panic_str(error); + } +} + +#[near_bindgen] +impl MultiSigContract { + /// Initialize multisig contract. + /// @params members: list of {"account_id": "name"} or {"public_key": "key"} members. + /// @params num_confirmations: k of n signatures required to perform operations. + #[init] + pub fn new(members: Vec, num_confirmations: u32) -> Self { + assert( + members.len() >= num_confirmations as usize, + "Members list must be equal or larger than number of confirmations", + ); + let mut multisig = Self { + members: UnorderedSet::new(StorageKeys::Members), + num_confirmations, + request_nonce: 0, + requests: UnorderedMap::new(StorageKeys::Requests), + confirmations: LookupMap::new(StorageKeys::Confirmations), + num_requests_pk: LookupMap::new(StorageKeys::NumRequestsPk), + active_requests_limit: ACTIVE_REQUESTS_LIMIT, + }; + let mut promise = Promise::new(env::current_account_id()); + for member in members { + promise = multisig.add_member(promise, member); + } + multisig + } + + /// Add request for multisig. + pub fn add_request(&mut self, request: MultiSigRequest) -> RequestId { + let current_member = self.current_member().unwrap_or_else(|| { + env::panic_str( + "Predecessor must be a member or transaction signed with key of given account", + ) + }); + // track how many requests this key has made + let num_requests = self + .num_requests_pk + .get(¤t_member.to_string()) + .unwrap_or(0) + + 1; + assert( + num_requests <= self.active_requests_limit, + "Account has too many active requests. Confirm or delete some.", + ); + self.num_requests_pk + .insert(¤t_member.to_string(), &num_requests); + // add the request + let request_added = MultiSigRequestWithSigner { + member: current_member, + added_timestamp: env::block_timestamp(), + request, + }; + self.requests.insert(&self.request_nonce, &request_added); + let confirmations = HashSet::new(); + self.confirmations + .insert(&self.request_nonce, &confirmations); + self.request_nonce += 1; + self.request_nonce - 1 + } + + /// Add request for multisig and confirm with the pk that added. + pub fn add_request_and_confirm(&mut self, request: MultiSigRequest) -> RequestId { + let request_id = self.add_request(request); + self.confirm(request_id); + request_id + } + + /// Remove given request and associated confirmations. + pub fn delete_request(&mut self, request_id: RequestId) { + self.assert_valid_request(request_id); + let request_with_signer = self + .requests + .get(&request_id) + .unwrap_or_else(|| env::panic_str("No such request")); + // can't delete requests before 15min + assert( + env::block_timestamp() > request_with_signer.added_timestamp + REQUEST_COOLDOWN, + "Request cannot be deleted immediately after creation.", + ); + self.remove_request(request_id); + } + + fn execute_request(&mut self, request: MultiSigRequest) -> PromiseOrValue { + let mut promise = Promise::new(request.receiver_id.clone()); + let receiver_id = request.receiver_id.clone(); + let num_actions = request.actions.len(); + for action in request.actions { + promise = match action { + MultiSigRequestAction::Transfer { amount } => promise.transfer(amount.into()), + MultiSigRequestAction::CreateAccount => promise.create_account(), + MultiSigRequestAction::DeployContract { code } => { + promise.deploy_contract(code.into()) + } + MultiSigRequestAction::AddMember { member } => { + self.assert_self_request(receiver_id.clone()); + self.add_member(promise, member) + } + MultiSigRequestAction::DeleteMember { member } => { + self.assert_self_request(receiver_id.clone()); + self.delete_member(promise, member) + } + MultiSigRequestAction::AddKey { + public_key, + permission, + } => { + self.assert_self_request(receiver_id.clone()); + if let Some(permission) = permission { + promise.add_access_key( + public_key.into(), + permission + .allowance + .map(|x| x.into()) + .unwrap_or(DEFAULT_ALLOWANCE), + permission.receiver_id, + permission.method_names.join(","), + ) + } else { + // wallet UI should warn user if receiver_id == env::current_account_id(), adding FAK will render multisig useless + promise.add_full_access_key(public_key.into()) + } + } + MultiSigRequestAction::FunctionCall { + method_name, + args, + deposit, + gas, + } => promise.function_call( + method_name, + args.into(), + deposit.into(), + Gas::from(gas.0), + ), + // the following methods must be a single action + MultiSigRequestAction::SetNumConfirmations { num_confirmations } => { + self.assert_one_action_only(receiver_id, num_actions); + self.num_confirmations = num_confirmations; + return PromiseOrValue::Value(true); + } + MultiSigRequestAction::SetActiveRequestsLimit { + active_requests_limit, + } => { + self.assert_one_action_only(receiver_id, num_actions); + self.active_requests_limit = active_requests_limit; + return PromiseOrValue::Value(true); + } + }; + } + promise.into() + } + + /// Confirm given request with given signing key. + /// If with this, there has been enough confirmation, a promise with request will be scheduled. + pub fn confirm(&mut self, request_id: RequestId) -> PromiseOrValue { + self.assert_valid_request(request_id); + let member = self + .current_member() + .unwrap_or_else(|| env::panic_str("Must be validated above")); + let mut confirmations = self.confirmations.get(&request_id).unwrap(); + assert( + !confirmations.contains(&member.to_string()), + "Already confirmed this request with this key", + ); + if confirmations.len() as u32 + 1 >= self.num_confirmations { + let request = self.remove_request(request_id); + /******************************** + NOTE: If the tx execution fails for any reason, the request and confirmations are removed already, so the client has to start all over + ********************************/ + self.execute_request(request) + } else { + confirmations.insert(member.to_string()); + self.confirmations.insert(&request_id, &confirmations); + PromiseOrValue::Value(true) + } + } + + /******************************** + Helper methods + ********************************/ + + /// Returns current member: either predecessor as account or if it's the same as current account - signer. + fn current_member(&self) -> Option { + let member = if env::current_account_id() == env::predecessor_account_id() { + MultisigMember::AccessKey { + public_key: env::signer_account_pk() + .try_into() + .unwrap_or_else(|_| env::panic_str("Failed to deserialize public key")), + } + } else { + MultisigMember::Account { + account_id: env::predecessor_account_id(), + } + }; + if self.members.contains(&member) { + Some(member) + } else { + None + } + } + + /// Add member to the list. Adds access key if member is key based. + fn add_member(&mut self, promise: Promise, member: MultisigMember) -> Promise { + self.members.insert(&member.clone().into()); + match member { + MultisigMember::AccessKey { public_key } => promise.add_access_key( + public_key.into(), + DEFAULT_ALLOWANCE, + env::current_account_id(), + MULTISIG_METHOD_NAMES.to_string(), + ), + MultisigMember::Account { account_id: _ } => promise, + } + } + + /// Delete member from the list. Removes access key if the member is key based. + fn delete_member(&mut self, promise: Promise, member: MultisigMember) -> Promise { + assert( + self.members.len() - 1 >= self.num_confirmations as u64, + "Removing given member will make total number of members below number of confirmations", + ); + // delete outstanding requests by public_key + let request_ids: Vec = self + .requests + .iter() + .filter_map(|(k, r)| if r.member == member { Some(k) } else { None }) + .collect(); + for request_id in request_ids { + // remove confirmations for this request + self.confirmations.remove(&request_id); + self.requests.remove(&request_id); + } + // remove num_requests_pk entry for member + self.num_requests_pk.remove(&member.to_string()); + self.members.remove(&member); + match member { + MultisigMember::AccessKey { public_key } => promise.delete_key(public_key.into()), + MultisigMember::Account { account_id: _ } => promise, + } + } + + /// Removes request, removes confirmations and reduces num_requests_pk - used in delete, delete_key, and confirm + fn remove_request(&mut self, request_id: RequestId) -> MultiSigRequest { + // remove confirmations for this request + self.confirmations.remove(&request_id); + // remove the original request + let request_with_signer = self + .requests + .remove(&request_id) + .unwrap_or_else(|| env::panic_str("Failed to remove existing element")); + // decrement num_requests for original request signer + let original_member = request_with_signer.member; + let mut num_requests = self + .num_requests_pk + .get(&original_member.to_string()) + .unwrap_or(0); + // safety check for underrun (unlikely since original_signer_pk must have num_requests_pk > 0) + if num_requests > 0 { + num_requests = num_requests - 1; + } + self.num_requests_pk + .insert(&original_member.to_string(), &num_requests); + // return request + request_with_signer.request + } + + /// Prevents access to calling requests and make sure request_id is valid - used in delete and confirm + fn assert_valid_request(&mut self, request_id: RequestId) { + // request must come from key added to contract account + assert( + self.current_member().is_some(), + "Caller (predecessor or signer) is not a member of this multisig", + ); + // request must exist + assert( + self.requests.get(&request_id).is_some(), + "No such request: either wrong number or already confirmed", + ); + // request must have + assert( + self.confirmations.get(&request_id).is_some(), + "Internal error: confirmations mismatch requests", + ); + } + + /// Prevents request from approving tx on another account + fn assert_self_request(&mut self, receiver_id: AccountId) { + assert( + receiver_id == env::current_account_id(), + "This method only works when receiver_id is equal to current_account_id", + ); + } + + /// Prevents a request from being bundled with other actions + fn assert_one_action_only(&mut self, receiver_id: AccountId, num_actions: usize) { + self.assert_self_request(receiver_id); + assert(num_actions == 1, "This method should be a separate request"); + } + + /******************************** + View methods + ********************************/ + + /// Returns members of the multisig. + pub fn get_members(&self) -> Vec { + self.members.to_vec() + } + + pub fn get_request(&self, request_id: RequestId) -> MultiSigRequest { + (self + .requests + .get(&request_id) + .unwrap_or_else(|| env::panic_str("No such request"))) + .request + } + + pub fn get_num_requests_per_member(&self, member: MultisigMember) -> u32 { + self.num_requests_pk.get(&member.to_string()).unwrap_or(0) + } + + pub fn list_request_ids(&self) -> Vec { + self.requests.keys().collect() + } + + pub fn get_confirmations(&self, request_id: RequestId) -> Vec { + self.confirmations + .get(&request_id) + .unwrap_or_else(|| env::panic_str("No such request")) + .into_iter() + .collect() + } + + pub fn get_num_confirmations(&self) -> u32 { + self.num_confirmations + } + + pub fn get_request_nonce(&self) -> u32 { + self.request_nonce + } +} + +#[cfg(test)] +mod tests { + use std::convert::TryFrom; + use std::fmt::{Debug, Error, Formatter}; + + use near_sdk::test_utils::VMContextBuilder; + use near_sdk::Balance; + use near_sdk::{testing_env, PublicKey}; + use near_sdk::{AccountId, VMContext}; + + use super::*; + + /// Used for asserts_eq. + /// TODO: replace with derive when https://github.com/near/near-sdk-rs/issues/165 + impl Debug for MultiSigRequest { + fn fmt(&self, _f: &mut Formatter<'_>) -> Result<(), Error> { + panic!("Should not trigger"); + } + } + + pub fn alice() -> AccountId { + AccountId::new_unchecked("alice".to_string()) + } + pub fn bob() -> AccountId { + AccountId::new_unchecked("bob".to_string()) + } + + const TEST_KEY: [u8; 33] = [ + 0, 247, 230, 176, 93, 224, 175, 33, 211, 72, 124, 12, 163, 219, 7, 137, 3, 37, 162, 199, + 181, 38, 90, 244, 111, 207, 37, 216, 79, 84, 50, 83, 164, + ]; + + fn members() -> Vec { + vec![ + MultisigMember::Account { + account_id: alice(), + }, + MultisigMember::Account { account_id: bob() }, + MultisigMember::AccessKey { + public_key: PublicKey::from( + "ed25519:Eg2jtsiMrprn7zgKKUk79qM1hWhANsFyE6JSX4txLEuy" + .parse() + .unwrap(), + ), + }, + MultisigMember::AccessKey { + public_key: PublicKey::try_from(TEST_KEY.to_vec()).unwrap(), + }, + ] + } + + fn context_with_key(key: PublicKey, amount: Balance) -> VMContext { + context_with_account_key(alice(), key, amount) + } + + fn context_with_account(account_id: AccountId, amount: Balance) -> VMContext { + context_with_account_key( + account_id, + PublicKey::try_from(vec![ + 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + ]) + .unwrap(), + amount, + ) + } + + fn context_with_account_key( + account_id: AccountId, + key: PublicKey, + amount: Balance, + ) -> VMContext { + VMContextBuilder::new() + .current_account_id(alice()) + .predecessor_account_id(account_id.clone()) + .signer_account_id(account_id.clone()) + .signer_account_pk(key) + .account_balance(amount) + .build() + } + + fn context_with_key_future(key: PublicKey, amount: Balance) -> VMContext { + VMContextBuilder::new() + .current_account_id(alice()) + .block_timestamp(REQUEST_COOLDOWN + 1) + .predecessor_account_id(alice()) + .signer_account_id(alice()) + .signer_account_pk(key) + .account_balance(amount) + .build() + } + + #[test] + fn test_multi_3_of_n() { + let amount = 1_000; + testing_env!(context_with_key( + PublicKey::from( + "Eg2jtsiMrprn7zgKKUk79qM1hWhANsFyE6JSX4txLEuy" + .parse() + .unwrap() + ), + amount + )); + let mut c = MultiSigContract::new(members(), 3); + let request = MultiSigRequest { + receiver_id: bob(), + actions: vec![MultiSigRequestAction::Transfer { + amount: amount.into(), + }], + }; + let request_id = c.add_request(request.clone()); + assert_eq!(c.get_request(request_id), request); + assert_eq!(c.list_request_ids(), vec![request_id]); + c.confirm(request_id); + assert_eq!(c.requests.len(), 1); + assert_eq!(c.confirmations.get(&request_id).unwrap().len(), 1); + testing_env!(context_with_key( + PublicKey::from( + "HghiythFFPjVXwc9BLNi8uqFmfQc1DWFrJQ4nE6ANo7R" + .parse() + .unwrap() + ), + amount + )); + c.confirm(request_id); + assert_eq!(c.confirmations.get(&request_id).unwrap().len(), 2); + assert_eq!(c.get_confirmations(request_id).len(), 2); + testing_env!(context_with_account(bob(), amount)); + c.confirm(request_id); + // TODO: confirm that funds were transferred out via promise. + assert_eq!(c.requests.len(), 0); + } + + #[test] + fn test_multi_add_request_and_confirm() { + let amount = 1_000; + testing_env!(context_with_key( + PublicKey::from( + "Eg2jtsiMrprn7zgKKUk79qM1hWhANsFyE6JSX4txLEuy" + .parse() + .unwrap() + ), + amount + )); + let mut c = MultiSigContract::new(members(), 3); + let request = MultiSigRequest { + receiver_id: bob(), + actions: vec![MultiSigRequestAction::Transfer { + amount: amount.into(), + }], + }; + let request_id = c.add_request_and_confirm(request.clone()); + assert_eq!(c.get_request(request_id), request); + assert_eq!(c.list_request_ids(), vec![request_id]); + // c.confirm(request_id); + assert_eq!(c.requests.len(), 1); + assert_eq!(c.confirmations.get(&request_id).unwrap().len(), 1); + testing_env!(context_with_key( + PublicKey::from( + "HghiythFFPjVXwc9BLNi8uqFmfQc1DWFrJQ4nE6ANo7R" + .parse() + .unwrap() + ), + amount + )); + c.confirm(request_id); + assert_eq!(c.confirmations.get(&request_id).unwrap().len(), 2); + assert_eq!(c.get_confirmations(request_id).len(), 2); + testing_env!(context_with_account(bob(), amount)); + c.confirm(request_id); + // TODO: confirm that funds were transferred out via promise. + assert_eq!(c.requests.len(), 0); + } + + #[test] + fn add_key_delete_key_storage_cleared() { + let amount = 1_000; + testing_env!(context_with_key( + PublicKey::from( + "ed25519:Eg2jtsiMrprn7zgKKUk79qM1hWhANsFyE6JSX4txLEuy" + .parse() + .unwrap() + ), + amount + )); + let mut c = MultiSigContract::new(members(), 1); + let new_key: PublicKey = PublicKey::from( + "HghiythFFPjVXwc9BLNi8uqFmfQc1DWFrJQ4nE6ANo7R" + .parse() + .unwrap(), + ); + // vm current_account_id is alice, receiver_id must be alice + let request = MultiSigRequest { + receiver_id: alice(), + actions: vec![MultiSigRequestAction::AddKey { + public_key: new_key.clone(), + permission: None, + }], + }; + // make request + c.add_request_and_confirm(request.clone()); + // should be empty now + assert_eq!(c.requests.len(), 0); + // switch accounts + testing_env!(context_with_key( + PublicKey::from( + "HghiythFFPjVXwc9BLNi8uqFmfQc1DWFrJQ4nE6ANo7R" + .parse() + .unwrap() + ), + amount + )); + let request2 = MultiSigRequest { + receiver_id: alice(), + actions: vec![MultiSigRequestAction::Transfer { + amount: amount.into(), + }], + }; + // make request but don't confirm + c.add_request(request2.clone()); + // should have 1 request now + let new_member = MultisigMember::AccessKey { + public_key: new_key.clone(), + }; + assert_eq!(c.requests.len(), 1); + assert_eq!(c.get_num_requests_per_member(new_member.clone()), 1); + // self delete key + let request3 = MultiSigRequest { + receiver_id: alice(), + actions: vec![MultiSigRequestAction::DeleteMember { + member: new_member.clone(), + }], + }; + // make request and confirm + c.add_request_and_confirm(request3.clone()); + // should be empty now + assert_eq!(c.requests.len(), 0); + assert_eq!(c.get_num_requests_per_member(new_member), 0); + } + + #[test] + #[should_panic] + fn test_panics_add_key_different_account() { + let amount = 1_000; + testing_env!(context_with_key( + PublicKey::try_from(Vec::from("Eg2jtsiMrprn7zgKKUk79qM1hWhANsFyE6JSX4txLEuy")).unwrap(), + amount + )); + let mut c = MultiSigContract::new(members(), 1); + let new_key: PublicKey = + PublicKey::try_from(Vec::from("HghiythFFPjVXwc9BLNi8uqFmfQc1DWFrJQ4nE6ANo7R")) + .unwrap() + .into(); + // vm current_account_id is alice, receiver_id must be alice + let request = MultiSigRequest { + receiver_id: bob(), + actions: vec![MultiSigRequestAction::AddKey { + public_key: new_key.clone(), + permission: None, + }], + }; + // make request + c.add_request_and_confirm(request); + } + + #[test] + fn test_change_num_confirmations() { + let amount = 1_000; + testing_env!(context_with_key( + PublicKey::try_from(TEST_KEY.to_vec()).unwrap(), + amount + )); + let mut c = MultiSigContract::new(members(), 1); + let request_id = c.add_request(MultiSigRequest { + receiver_id: alice(), + actions: vec![MultiSigRequestAction::SetNumConfirmations { + num_confirmations: 2, + }], + }); + c.confirm(request_id); + assert_eq!(c.num_confirmations, 2); + } + + #[test] + #[should_panic] + fn test_panics_on_second_confirm() { + let amount = 1_000; + testing_env!(context_with_key( + PublicKey::try_from(TEST_KEY.to_vec()).unwrap(), + amount + )); + let mut c = MultiSigContract::new(members(), 3); + let request_id = c.add_request(MultiSigRequest { + receiver_id: bob(), + actions: vec![MultiSigRequestAction::Transfer { + amount: amount.into(), + }], + }); + assert_eq!(c.requests.len(), 1); + assert_eq!(c.confirmations.get(&request_id).unwrap().len(), 0); + c.confirm(request_id); + assert_eq!(c.confirmations.get(&request_id).unwrap().len(), 1); + c.confirm(request_id); + } + + #[test] + #[should_panic] + fn test_panics_delete_request() { + let amount = 1_000; + testing_env!(context_with_key( + PublicKey::try_from(TEST_KEY.to_vec()).unwrap(), + amount + )); + let mut c = MultiSigContract::new(members(), 3); + let request_id = c.add_request(MultiSigRequest { + receiver_id: bob(), + actions: vec![MultiSigRequestAction::Transfer { + amount: amount.into(), + }], + }); + c.delete_request(request_id); + } + + #[test] + fn test_delete_request_future() { + let amount = 1_000; + testing_env!(context_with_key( + PublicKey::try_from(TEST_KEY.to_vec()).unwrap(), + amount + )); + let mut c = MultiSigContract::new(members(), 3); + let request_id = c.add_request(MultiSigRequest { + receiver_id: bob(), + actions: vec![MultiSigRequestAction::Transfer { + amount: amount.into(), + }], + }); + c.confirm(request_id); + testing_env!(context_with_key_future( + PublicKey::try_from(TEST_KEY.to_vec()).unwrap(), + amount + )); + c.delete_request(request_id); + assert_eq!(c.requests.len(), 0); + assert!(c.confirmations.get(&request_id).is_none()); + } + + #[test] + #[should_panic] + fn test_delete_request_panic_wrong_key() { + let amount = 1_000; + testing_env!(context_with_key( + PublicKey::try_from(TEST_KEY.to_vec()).unwrap(), + amount + )); + let mut c = MultiSigContract::new(members(), 3); + let request_id = c.add_request(MultiSigRequest { + receiver_id: bob(), + actions: vec![MultiSigRequestAction::Transfer { + amount: amount.into(), + }], + }); + testing_env!(context_with_key( + PublicKey::try_from(TEST_KEY.to_vec()).unwrap(), + amount + )); + c.delete_request(request_id); + } + + #[test] + #[should_panic] + fn test_too_many_requests() { + let amount = 1_000; + testing_env!(context_with_key( + PublicKey::try_from(TEST_KEY.to_vec()).unwrap(), + amount + )); + let mut c = MultiSigContract::new(members(), 3); + for _i in 0..16 { + c.add_request(MultiSigRequest { + receiver_id: bob(), + actions: vec![MultiSigRequestAction::Transfer { + amount: amount.into(), + }], + }); + } + } + + #[test] + #[should_panic] + fn test_too_many_confirmations() { + testing_env!(context_with_key( + PublicKey::try_from(TEST_KEY.to_vec()).unwrap(), + 1_000 + )); + let _ = MultiSigContract::new(members(), 5); + } +} diff --git a/multisig2/test.sh b/multisig2/test.sh new file mode 100755 index 00000000..35e1e2cf --- /dev/null +++ b/multisig2/test.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +./build.sh +cargo +stable test -- --nocapture diff --git a/multisig2/tests/general.rs b/multisig2/tests/general.rs new file mode 100644 index 00000000..979ac60d --- /dev/null +++ b/multisig2/tests/general.rs @@ -0,0 +1,101 @@ +use std::cell::RefCell; +use std::rc::Rc; +use near_sdk::serde_json::json; +use near_sdk_sim::{to_yocto, DEFAULT_GAS, UserAccount}; +use near_sdk_sim::account::AccessKey; +use near_sdk_sim::near_crypto::{InMemorySigner, KeyType, Signer}; +use near_sdk_sim::runtime::{GenesisConfig, RuntimeStandalone}; +use near_sdk_sim::state_record::StateRecord; +use near_primitives_core::account::Account as PrimitiveAccount; +use multisig2::MultisigMember; + +near_sdk_sim::lazy_static_include::lazy_static_include_bytes! { + MULTISIG_WASM_BYTES => "res/multisig2.wasm", +} + +fn accounts(num: usize) -> String { + ["root", "multisig"][num].to_string() +} + +#[test] +fn setup_and_remove_multisig() { + let mut genesis = GenesisConfig::default(); + + // Set up signers for root and multisig + let root_signer = genesis.init_root_signer(&accounts(0)); + let multisig_signer = InMemorySigner::from_seed(&accounts(1), KeyType::ED25519, &accounts(1)); + + // Push multisig account to state_records + genesis.state_records.push(StateRecord::Account { + account_id: accounts(1), + account: PrimitiveAccount { + amount: to_yocto("100"), + locked: 0, + code_hash: Default::default(), + storage_usage: 0, + }, + }); + genesis.state_records.push(StateRecord::AccessKey { + account_id: accounts(1), + public_key: multisig_signer.clone().public_key(), + access_key: AccessKey::full_access(), + }); + + let runtime = RuntimeStandalone::new_with_store(genesis); + let runtime_rc = &Rc::new(RefCell::new(runtime)); + + // Set up proper UserAccount objects for root and multisig + let root_account = UserAccount::new(runtime_rc, accounts(0), root_signer.clone()); + let multisig_account = UserAccount::new(runtime_rc, accounts(1), multisig_signer.clone()); + + // Set up arguments that will be passed into the "new" function + let new_args = json!( + { + "members": [ + { "public_key": multisig_signer.public_key() } + ], + "num_confirmations": 1} + ).to_string(); + + // Deploy multisig contract to the account + let deploy_tx = multisig_account.create_transaction(accounts(1)); + deploy_tx.deploy_contract( + MULTISIG_WASM_BYTES.to_vec(), + ).submit().assert_success(); + + // Call the "new" initialization method + multisig_account.call( + accounts(1), + "new", + new_args.as_bytes(), + DEFAULT_GAS, + 0 + ).assert_success(); + + // Ensure that the new member is added + let members: Vec = root_account.view(accounts(1), "get_members", &[]).unwrap_json(); + assert_eq!(members.len(), 1); + + // Set up arguments for "add_request" and call it + let add_request_args = json!({"request": {"receiver_id": accounts(1), "actions": [ + {"type": "AddKey", "public_key": root_signer.public_key()}, + {"type": "DeployContract", "code": ""}, + ]}}).to_string(); + multisig_account.call( + accounts(1), + "add_request", + add_request_args.as_bytes(), + DEFAULT_GAS, + 0 + ).assert_success(); + // assert!(1 == 2, "aloha "); + + // Call "confirm" + multisig_account.call( + accounts(1), + "confirm", + json!({"request_id": 0}).to_string().as_bytes(), + DEFAULT_GAS, + 0 + ).assert_success(); +} diff --git a/scripts/build_docker.sh b/scripts/build_docker.sh index e6e51167..878e98cf 100755 --- a/scripts/build_docker.sh +++ b/scripts/build_docker.sh @@ -20,7 +20,7 @@ docker create \ fi docker start build_$NAME -docker exec build_$NAME /bin/bash -c "cargo build --target wasm32-unknown-unknown --release" +docker exec build_$NAME /bin/bash -c "rustup toolchain install stable-2020-10-08; rustup default stable-2020-10-08; rustup target add wasm32-unknown-unknown; cargo build --target wasm32-unknown-unknown --release" mkdir -p res cp $NAME/target/wasm32-unknown-unknown/release/$CONTRACT_WASM_NAME.wasm $NAME/res/$CONTRACT_WASM_NAME.wasm diff --git a/scripts/contracts.json b/scripts/contracts.json index 5c6d1db7..c84447d9 100644 --- a/scripts/contracts.json +++ b/scripts/contracts.json @@ -17,5 +17,13 @@ { "contract_dir": "w-near", "contract_name": "w_near" + }, + { + "contract_dir": "multisig2", + "contract_name": "multisig2" + }, + { + "contract_dir": "multisig-factory", + "contract_name": "multisig_factory" } ] diff --git a/voting/res/voting_contract.wasm b/voting/res/voting_contract.wasm index c4e850ef..811c47e4 100755 Binary files a/voting/res/voting_contract.wasm and b/voting/res/voting_contract.wasm differ diff --git a/w-near/res/w_near.wasm b/w-near/res/w_near.wasm index 8df321f9..b01fcfae 100755 Binary files a/w-near/res/w_near.wasm and b/w-near/res/w_near.wasm differ diff --git a/whitelist/res/whitelist.wasm b/whitelist/res/whitelist.wasm index 1012564c..052b8942 100755 Binary files a/whitelist/res/whitelist.wasm and b/whitelist/res/whitelist.wasm differ