From 701154457c07df1dfba9cd9afa2478f2db026aa7 Mon Sep 17 00:00:00 2001 From: Yuriy Savchenko Date: Tue, 22 Dec 2020 19:03:33 +0200 Subject: [PATCH] New tests and fixes in Terra Wormhole contracts - added new descriptive errors in terra wormhole contract - 0-expiration guardian sets error fixed - added script for test VAAs generation - added full test coverage for the VAA processing in the contract - fixed cargo clippy/fmt warnings --- bridge/cmd/vaa-test-terra/main.go | 335 +++++++ terra/Cargo.lock | 849 +++++++++--------- terra/contracts/cw20-wrapped/src/contract.rs | 2 +- terra/contracts/cw20-wrapped/src/msg.rs | 1 + terra/contracts/wormhole/Cargo.toml | 1 + terra/contracts/wormhole/src/contract.rs | 321 ++++++- terra/contracts/wormhole/src/error.rs | 8 + terra/contracts/wormhole/src/lib.rs | 4 + terra/contracts/wormhole/src/msg.rs | 2 +- terra/contracts/wormhole/src/state.rs | 8 +- terra/contracts/wormhole/tests/integration.rs | 14 +- 11 files changed, 1070 insertions(+), 475 deletions(-) create mode 100644 bridge/cmd/vaa-test-terra/main.go diff --git a/bridge/cmd/vaa-test-terra/main.go b/bridge/cmd/vaa-test-terra/main.go new file mode 100644 index 00000000..53aad550 --- /dev/null +++ b/bridge/cmd/vaa-test-terra/main.go @@ -0,0 +1,335 @@ +// vaa-test generates VAA test fixtures used by the ETH devnet tests +package main + +import ( + "crypto/ecdsa" + "encoding/hex" + "fmt" + "math/big" + "math/rand" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + + "github.com/certusone/wormhole/bridge/pkg/vaa" +) + +type signerInfo struct { + signer *ecdsa.PrivateKey + index int +} + +var i = 0 + +var defaultTargetAddress = vaa.Address{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0} + +func main() { + + keys := generateKeys(6) + for i, key := range keys { + fmt.Printf("Key [%d]: %s\n", i, crypto.PubkeyToAddress(key.PublicKey).String()) + } + + // 0 - Valid transfer, single signer + signAndPrintVAA(&vaa.VAA{ + Version: 1, + GuardianSetIndex: 0, + Timestamp: time.Unix(2000, 0), + Payload: &vaa.BodyTransfer{ + Nonce: 56, + SourceChain: 1, + TargetChain: 3, + SourceAddress: vaa.Address{2, 1, 4}, + TargetAddress: defaultTargetAddress, + Asset: &vaa.AssetMeta{ + Chain: vaa.ChainIDSolana, + Address: hexToAddress("0x347ef34687bdc9f189e87a9200658d9c40e9988"), + Decimals: 8, + }, + Amount: big.NewInt(1000000000000000000), + }, + }, []*signerInfo{{keys[0], 0}}) + + // 1 - 2 signers, invalid order + signAndPrintVAA(&vaa.VAA{ + Version: 1, + GuardianSetIndex: 0, + Timestamp: time.Unix(2000, 0), + Payload: &vaa.BodyTransfer{ + Nonce: 56, + SourceChain: 1, + TargetChain: 3, + SourceAddress: vaa.Address{2, 1, 4}, + TargetAddress: defaultTargetAddress, + Asset: &vaa.AssetMeta{ + Chain: vaa.ChainIDEthereum, + Address: hexToAddress("0xd833215cbcc3f914bd1c9ece3ee7bf8b14f841bb"), + Decimals: 8, + }, + Amount: big.NewInt(1000000000000000000), + }, + }, []*signerInfo{{keys[1], 1}, {keys[0], 0}}) + + // 2 - Valid transfer, 2 signers + signAndPrintVAA(&vaa.VAA{ + Version: 1, + GuardianSetIndex: 0, + Timestamp: time.Unix(2000, 0), + Payload: &vaa.BodyTransfer{ + Nonce: 56, + SourceChain: 1, + TargetChain: 3, + SourceAddress: vaa.Address{2, 1, 4}, + TargetAddress: defaultTargetAddress, + Asset: &vaa.AssetMeta{ + Chain: vaa.ChainIDEthereum, + Address: hexToAddress("0xd833215cbcc3f914bd1c9ece3ee7bf8b14f841bb"), + Decimals: 8, + }, + Amount: big.NewInt(1000000000000000000), + }, + }, []*signerInfo{{keys[0], 0}, {keys[1], 1}}) + + // 3 - Valid transfer, 3 signers + signAndPrintVAA(&vaa.VAA{ + Version: 1, + GuardianSetIndex: 0, + Timestamp: time.Unix(2000, 0), + Payload: &vaa.BodyTransfer{ + Nonce: 56, + SourceChain: 1, + TargetChain: 3, + SourceAddress: vaa.Address{2, 1, 4}, + TargetAddress: defaultTargetAddress, + Asset: &vaa.AssetMeta{ + Chain: vaa.ChainIDEthereum, + Address: hexToAddress("0xd833215cbcc3f914bd1c9ece3ee7bf8b14f841bb"), + Decimals: 8, + }, + Amount: big.NewInt(1000000000000000000), + }, + }, []*signerInfo{{keys[0], 0}, {keys[1], 1}, {keys[2], 2}}) + + // 4 - Invalid signature, single signer + signAndPrintVAA(&vaa.VAA{ + Version: 1, + GuardianSetIndex: 0, + Timestamp: time.Unix(2000, 0), + Payload: &vaa.BodyTransfer{ + Nonce: 56, + SourceChain: 1, + TargetChain: 3, + SourceAddress: vaa.Address{2, 1, 4}, + TargetAddress: defaultTargetAddress, + Asset: &vaa.AssetMeta{ + Chain: vaa.ChainIDSolana, + Address: hexToAddress("0x347ef34687bdc9f189e87a9200658d9c40e9988"), + Decimals: 8, + }, + Amount: big.NewInt(1000000000000000000), + }, + }, []*signerInfo{{keys[1], 0}}) + + // 5 - Valid guardian set change + signAndPrintVAA(&vaa.VAA{ + Version: 1, + GuardianSetIndex: 0, + Timestamp: time.Unix(2000, 0), + Payload: &vaa.BodyGuardianSetUpdate{ + Keys: []common.Address{ + crypto.PubkeyToAddress(keys[1].PublicKey), + }, + NewIndex: 1, + }, + }, []*signerInfo{{keys[0], 0}}) + + // 6 - Change from set 0 to set 1, single guardian with key#2 (zero-based) + signAndPrintVAA(&vaa.VAA{ + Version: 1, + GuardianSetIndex: 0, + Timestamp: time.Unix(2000, 0), + Payload: &vaa.BodyGuardianSetUpdate{ + Keys: []common.Address{ + crypto.PubkeyToAddress(keys[2].PublicKey), + }, + NewIndex: 1, + }, + }, []*signerInfo{{keys[0], 0}}) + + // 7 - Guardian set index jump + signAndPrintVAA(&vaa.VAA{ + Version: 1, + GuardianSetIndex: 0, + Timestamp: time.Unix(2000, 0), + Payload: &vaa.BodyGuardianSetUpdate{ + Keys: []common.Address{ + crypto.PubkeyToAddress(keys[2].PublicKey), + }, + NewIndex: 2, + }, + }, []*signerInfo{{keys[0], 0}}) + + // 8 - Invalid target address format + signAndPrintVAA(&vaa.VAA{ + Version: 1, + GuardianSetIndex: 0, + Timestamp: time.Unix(2000, 0), + Payload: &vaa.BodyTransfer{ + Nonce: 56, + SourceChain: 1, + TargetChain: 3, + SourceAddress: vaa.Address{2, 1, 4}, + TargetAddress: hexToAddress("0x347ef34687bdc9f189e87a9200658d9c40e9988"), + Asset: &vaa.AssetMeta{ + Chain: vaa.ChainIDSolana, + Address: hexToAddress("0x347ef34687bdc9f189e87a9200658d9c40e9988"), + Decimals: 8, + }, + Amount: big.NewInt(1000000000000000000), + }, + }, []*signerInfo{{keys[0], 0}}) + + // 9 - Amount too high (max u128 + 1) + amount, ok := new(big.Int).SetString("100000000000000000000000000000000", 16) + if !ok { + panic("Cannot convert big amount") + } + signAndPrintVAA(&vaa.VAA{ + Version: 1, + GuardianSetIndex: 0, + Timestamp: time.Unix(2000, 0), + Payload: &vaa.BodyTransfer{ + Nonce: 56, + SourceChain: 1, + TargetChain: 3, + SourceAddress: vaa.Address{2, 1, 4}, + TargetAddress: defaultTargetAddress, + Asset: &vaa.AssetMeta{ + Chain: vaa.ChainIDSolana, + Address: hexToAddress("0x347ef34687bdc9f189e87a9200658d9c40e9988"), + Decimals: 8, + }, + Amount: amount, + }, + }, []*signerInfo{{keys[0], 0}}) + + // 10 - Same source and target + signAndPrintVAA(&vaa.VAA{ + Version: 1, + GuardianSetIndex: 0, + Timestamp: time.Unix(1000, 0), + Payload: &vaa.BodyTransfer{ + Nonce: 56, + SourceChain: 3, + TargetChain: 3, + SourceAddress: vaa.Address{2, 1, 4}, + TargetAddress: defaultTargetAddress, + Asset: &vaa.AssetMeta{ + Chain: vaa.ChainIDSolana, + Address: hexToAddress("0x347ef34687bdc9f189e87a9200658d9c40e9988"), + Decimals: 8, + }, + Amount: big.NewInt(1000000000000000000), + }, + }, []*signerInfo{{keys[0], 0}}) + + // 11 - Wrong target chain + signAndPrintVAA(&vaa.VAA{ + Version: 1, + GuardianSetIndex: 0, + Timestamp: time.Unix(1000, 0), + Payload: &vaa.BodyTransfer{ + Nonce: 56, + SourceChain: 1, + TargetChain: 2, + SourceAddress: vaa.Address{2, 1, 4}, + TargetAddress: defaultTargetAddress, + Asset: &vaa.AssetMeta{ + Chain: vaa.ChainIDSolana, + Address: hexToAddress("0x347ef34687bdc9f189e87a9200658d9c40e9988"), + Decimals: 8, + }, + Amount: big.NewInt(1000000000000000000), + }, + }, []*signerInfo{{keys[0], 0}}) + + // 12 - Change guardian set to 6 addresses + signAndPrintVAA(&vaa.VAA{ + Version: 1, + GuardianSetIndex: 0, + Timestamp: time.Unix(4000, 0), + Payload: &vaa.BodyGuardianSetUpdate{ + Keys: []common.Address{ + crypto.PubkeyToAddress(keys[0].PublicKey), + crypto.PubkeyToAddress(keys[1].PublicKey), + crypto.PubkeyToAddress(keys[2].PublicKey), + crypto.PubkeyToAddress(keys[3].PublicKey), + crypto.PubkeyToAddress(keys[4].PublicKey), + crypto.PubkeyToAddress(keys[5].PublicKey), + }, + NewIndex: 1, + }, + }, []*signerInfo{{keys[0], 0}}) + + // 13 - Valid transfer, partial quorum + signAndPrintVAA(&vaa.VAA{ + Version: 1, + GuardianSetIndex: 1, + Timestamp: time.Unix(4000, 0), + Payload: &vaa.BodyTransfer{ + Nonce: 57, + SourceChain: 1, + TargetChain: 3, + SourceAddress: vaa.Address{2, 1, 5}, + TargetAddress: defaultTargetAddress, + Asset: &vaa.AssetMeta{ + Chain: vaa.ChainIDSolana, + Address: hexToAddress("0x347ef34687bdc9f189e87a9200658d9c40e9988"), + Decimals: 8, + }, + Amount: big.NewInt(1000000000000000000), + }, + }, []*signerInfo{{keys[0], 0}, {keys[1], 1}, {keys[3], 3}, {keys[4], 4}, {keys[5], 5}}) +} + +func signAndPrintVAA(vaa *vaa.VAA, signers []*signerInfo) { + for _, signer := range signers { + vaa.AddSignature(signer.signer, uint8(signer.index)) + } + vData, err := vaa.Marshal() + if err != nil { + panic(err) + } + println(i, hex.EncodeToString(vData)) + i++ +} + +func generateKeys(n int) (keys []*ecdsa.PrivateKey) { + r := rand.New(rand.NewSource(555)) + + for i := 0; i < n; i++ { + key, err := ecdsa.GenerateKey(crypto.S256(), r) + if err != nil { + panic(err) + } + + keys = append(keys, key) + } + + return +} + +func hexToAddress(hex string) vaa.Address { + hexAddr := common.HexToAddress(hex) + return padAddress(hexAddr) +} + +func padAddress(address common.Address) vaa.Address { + paddedAddress := common.LeftPadBytes(address[:], 32) + + addr := vaa.Address{} + copy(addr[:], paddedAddress) + + return addr +} diff --git a/terra/Cargo.lock b/terra/Cargo.lock index e62c1549..0d2a63b2 100644 --- a/terra/Cargo.lock +++ b/terra/Cargo.lock @@ -4,1240 +4,1239 @@ name = "addr2line" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" dependencies = [ - "gimli 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gimli 0.22.0", ] [[package]] name = "adler" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" [[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.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" [[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.51" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec1931848a574faa8f7c71a12ea00453ff5effbb5f51afe7f77d7a48cace6ac1" dependencies = [ - "addr2line 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.79 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "object 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "addr2line", + "cfg-if 0.1.10", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", ] [[package]] name = "base64" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" [[package]] name = "bincode" version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30d3a39baa26f9651f17b375061f3233dde33424a8b72b0dbe93a68a0bc896d" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "serde", ] [[package]] name = "bitflags" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "bitvec" version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2838fdd79e8776dbe07a106c784b0f8dda571a21b2750a092cc4cbaa653c8e" dependencies = [ - "funty 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "radium 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wyz 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "funty", + "radium", + "wyz", ] [[package]] name = "blake3" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9ff35b701f3914bdb8fad3368d822c766ef2858b2583198e41639b936f09d3f" dependencies = [ - "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.61 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "crypto-mac 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayref", + "arrayvec", + "cc", + "cfg-if 0.1.10", + "constant_time_eq", + "crypto-mac 0.8.0", + "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 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", + "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 = "byteorder" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" [[package]] name = "cc" version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed67cbde08356238e75fc4656be4749481eeffb09e19f320a25237d5221c985d" [[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 = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", ] [[package]] name = "constant_time_eq" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "cosmwasm-std" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f85908a2696117c8f2c1b3ce201d34a1aa9a6b3c1583a65cfb794ec66e1cfde4" dependencies = [ - "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "schemars 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", - "serde-json-wasm 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "snafu 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "base64", + "schemars", + "serde", + "serde-json-wasm", + "snafu", ] [[package]] name = "cosmwasm-storage" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e103531a2ce636e86b7639cec25d348c4d360832ab8e0e7f9a6e00f08aac1379" dependencies = [ - "cosmwasm-std 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", + "cosmwasm-std", + "serde", ] [[package]] name = "cosmwasm-vm" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12d56a7ad7bbbf04b94a782f25fe50a9372067737f661931acf9d30668003efd" dependencies = [ - "cosmwasm-std 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", - "schemars 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.58 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "snafu 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-clif-backend 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-middleware-common 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-runtime-core 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cosmwasm-std", + "hex", + "memmap", + "parity-wasm", + "schemars", + "serde", + "serde_json", + "sha2", + "snafu", + "wasmer-clif-backend", + "wasmer-middleware-common", + "wasmer-runtime-core", ] [[package]] name = "cpuid-bool" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" [[package]] name = "cranelift-bforest" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45a9c21f8042b9857bda93f6c1910b9f9f24100187a3d3d52f214a34e3dc5818" dependencies = [ - "cranelift-entity 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-entity", ] [[package]] name = "cranelift-codegen" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7853f77a6e4a33c67a69c40f5e1bb982bd2dc5c4a22e17e67b65bbccf9b33b2e" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-bforest 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-codegen-meta 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-codegen-shared 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-entity 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gimli 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "cranelift-bforest", + "cranelift-codegen-meta", + "cranelift-codegen-shared", + "cranelift-entity", + "gimli 0.20.0", + "log", + "smallvec", + "target-lexicon", + "thiserror", ] [[package]] name = "cranelift-codegen-meta" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "084cd6d5fb0d1da28acd72c199471bfb09acc703ec8f3bf07b1699584272a3b9" dependencies = [ - "cranelift-codegen-shared 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-entity 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-codegen-shared", + "cranelift-entity", ] [[package]] name = "cranelift-codegen-shared" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "701b599783305a58c25027a4d73f2d6b599b2d8ef3f26677275f480b4d51e05d" [[package]] name = "cranelift-entity" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b88e792b28e1ebbc0187b72ba5ba880dad083abe9231a99d19604d10c9e73f38" [[package]] name = "cranelift-native" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32daf082da21c0c05d93394ff4842c2ab7c4991b1f3186a1d952f8ac660edd0b" dependencies = [ - "cranelift-codegen 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", - "raw-cpuid 7.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-codegen", + "raw-cpuid", + "target-lexicon", ] [[package]] name = "crossbeam-channel" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" dependencies = [ - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils", + "maybe-uninit", ] [[package]] name = "crossbeam-deque" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" dependencies = [ - "crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-epoch", + "crossbeam-utils", + "maybe-uninit", ] [[package]] name = "crossbeam-epoch" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "cfg-if 0.1.10", + "crossbeam-utils", + "lazy_static", + "maybe-uninit", + "memoffset", + "scopeguard", ] [[package]] name = "crossbeam-utils" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "cfg-if 0.1.10", + "lazy_static", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.14.4", + "subtle", ] [[package]] name = "crypto-mac" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58bcd97a54c7ca5ce2f6eb16f6bede5b0ab5f0055fedc17d2f0b4466e21671ca" dependencies = [ - "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.14.4", + "subtle", ] [[package]] name = "cw0" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd55b1bb0bb419fe065d80d9ac5a4a0512d9fecf08ad9796f8aa29c7dbe63618" dependencies = [ - "cosmwasm-std 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "schemars 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", + "cosmwasm-std", + "schemars", + "serde", ] [[package]] name = "cw2" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b7d5d7ea75a5eb53bfa4db60112bef22cdb56a8d612b67aab5c70edd2fbf34e" dependencies = [ - "cosmwasm-std 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cosmwasm-storage 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "schemars 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", + "cosmwasm-std", + "cosmwasm-storage", + "schemars", + "serde", ] [[package]] name = "cw20" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4e74e78cc957826bb20c21e75244b2a3a7e0e12799f0710e318726406bed37b" dependencies = [ - "cosmwasm-std 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cw0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "schemars 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", + "cosmwasm-std", + "cw0", + "schemars", + "serde", ] [[package]] name = "cw20-base" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33af71eb8e2746fc7843b096fee77451ca96b78bc32b3c88b4bf744048fc07a" dependencies = [ - "cosmwasm-std 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cosmwasm-storage 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cw0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cw2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cw20 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "schemars 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", - "snafu 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cosmwasm-std", + "cosmwasm-storage", + "cw0", + "cw2", + "cw20", + "schemars", + "serde", + "snafu", ] [[package]] name = "cw20-wrapped" version = "0.1.0" dependencies = [ - "cosmwasm-std 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cosmwasm-storage 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cosmwasm-vm 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cw20 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cw20-base 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "schemars 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", + "cosmwasm-std", + "cosmwasm-storage", + "cosmwasm-vm", + "cw20", + "cw20-base", + "schemars", + "serde", + "thiserror", ] [[package]] name = "digest" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.3", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.14.4", ] [[package]] name = "doc-comment" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "ecdsa" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87bf8bfb05ea8a6f74ddf48c7d1774851ba77bbe51ac984fdfa6c30310e1ff5f" dependencies = [ - "elliptic-curve 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "hmac 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "signature 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "elliptic-curve", + "hmac", + "signature", ] [[package]] name = "either" version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "elliptic-curve" version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396db09c483e7fca5d4fdb9112685632b3e76c9a607a2649c1bf904404a01366" dependencies = [ - "bitvec 0.18.4 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ff 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", - "group 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitvec", + "digest 0.9.0", + "ff", + "generic-array 0.14.4", + "group", + "rand_core", + "subtle", + "zeroize", ] [[package]] name = "errno" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eab5ee3df98a279d9b316b1af6ac95422127b1290317e6d18c1743c99418b01" dependencies = [ - "errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.79 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "errno-dragonfly", + "libc", + "winapi", ] [[package]] name = "errno-dragonfly" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" dependencies = [ - "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.79 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc", + "libc", ] [[package]] name = "ff" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01646e077d4ebda82b73f1bca002ea1e91561a77df2431a9e79729bcc31950ef" dependencies = [ - "bitvec 0.18.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitvec", + "rand_core", + "subtle", ] [[package]] name = "funty" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ba62103ce691c2fd80fbae2213dfdda9ce60804973ac6b6e97de818ea7f52c8" [[package]] name = "gcc" version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" [[package]] name = "generic-array" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" dependencies = [ - "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum", ] [[package]] name = "generic-array" version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" dependencies = [ - "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum", + "version_check", ] [[package]] name = "gimli" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81dd6190aad0f05ddbbf3245c54ed14ca4aa6dd32f22312b70d8f168c3e3e633" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "indexmap", ] [[package]] name = "gimli" version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" [[package]] name = "group" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc11f9f5fbf1943b48ae7c2bf6846e7d827a512d1be4f23af708f5ca5d01dde1" dependencies = [ - "ff 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ff", + "rand_core", + "subtle", ] [[package]] name = "hashbrown" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" [[package]] name = "hermit-abi" version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8" dependencies = [ - "libc 0.2.79 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "hex" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" [[package]] name = "hmac" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deae6d9dbb35ec2c502d62b8f7b1c000a0822c3b0794ba36b3149c0a1c840dff" dependencies = [ - "crypto-mac 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crypto-mac 0.9.1", + "digest 0.9.0", ] [[package]] name = "indexmap" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hashbrown 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "hashbrown", + "serde", ] [[package]] name = "itoa" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" [[package]] name = "k256" version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2967b7caf19e57f5d01ac0893551b0aaae1a8e2e2b2a28996e12c9c51b3b486" dependencies = [ - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ecdsa 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", - "elliptic-curve 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "ecdsa", + "elliptic-curve", ] [[package]] name = "keccak" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2448f6066e80e3bfc792e9c98bf705b4b0fc6e8ef5b43e5889aff0eaa9c58743" [[package]] name = "lock_api" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" dependencies = [ - "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard", ] [[package]] name = "log" version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10", ] [[package]] name = "maybe-uninit" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "memmap" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" dependencies = [ - "libc 0.2.79 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "winapi", ] [[package]] name = "memoffset" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", ] [[package]] name = "miniz_oxide" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c60c0dfe32c10b43a144bad8fc83538c52f58302c92300ea7ec7bf7b38d5a7b9" dependencies = [ - "adler 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "adler", + "autocfg", ] [[package]] name = "nix" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2e0b4f3320ed72aaedb9a5ac838690a8047c7b275da22711fddff4f8a14229" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.61 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.79 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "cc", + "cfg-if 0.1.10", + "libc", + "void", ] [[package]] name = "num_cpus" version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" dependencies = [ - "hermit-abi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.79 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi", + "libc", ] [[package]] name = "object" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" [[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 0.2.79 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "winapi", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api", + "parking_lot_core", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.79 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10", + "cloudabi", + "libc", + "redox_syscall", + "smallvec", + "winapi", ] [[package]] name = "proc-macro2" version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" dependencies = [ - "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid", ] [[package]] name = "quote" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", ] [[package]] name = "radium" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64de9a0c5361e034f1aefc9f71a86871ec870e766fe31a009734a989b329286a" [[package]] name = "rand_core" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" [[package]] name = "raw-cpuid" version = "7.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4a349ca83373cfa5d6dbb66fd76e58b2cca08da71a5f6400de0a0a6a9bceeaf" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.61 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "cc", + "rustc_version", ] [[package]] name = "rayon" version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf6960dc9a5b4ee8d3e4c5787b4a112a8818e0290a42ff664ad60692fdf2032" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon-core 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "crossbeam-deque", + "either", + "rayon-core", ] [[package]] name = "rayon-core" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8c4fec834fb6e6d2dd5eece3c7b432a52f0ba887cf40e595190c4107edc08bf" dependencies = [ - "crossbeam-channel 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "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 = "rustc-demangle" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" [[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 (registry+https://github.com/rust-lang/crates.io-index)", + "semver", ] [[package]] name = "ryu" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" [[package]] name = "schemars" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be77ed66abed6954aabf6a3e31a84706bedbf93750d267e92ef4a6d90bbd6a61" dependencies = [ - "schemars_derive 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.58 (registry+https://github.com/rust-lang/crates.io-index)", + "schemars_derive", + "serde", + "serde_json", ] [[package]] name = "schemars_derive" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11af7a475c9ee266cfaa9e303a47c830ebe072bf3101ab907a7b7b9d816fa01d" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive_internals 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "serde_derive_internals", + "syn", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", + "semver-parser", ] [[package]] name = "semver-parser" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96fe57af81d28386a513cbc6858332abc6117cfdb5999647c6444b8f43a370a5" dependencies = [ - "serde_derive 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive", ] [[package]] name = "serde-bench" version = "0.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d733da87e79faaac25616e33d26299a41143fd4cd42746cbb0e91d8feea243fd" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "serde", ] [[package]] name = "serde-json-wasm" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7294d94d390f1d2334697c065ea591d7074c676e2d20aa6f1df752fced29823f" dependencies = [ - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", ] [[package]] name = "serde_bytes" version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" dependencies = [ - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", ] [[package]] name = "serde_derive" version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f630a6370fd8e457873b4bd2ffdae75408bc291ba72be773772a4c2a065d9ae8" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "serde_derive_internals" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "serde_json" version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a230ea9107ca2220eea9d46de97eddcb04cd00e92d13dda78e478dd33fa82bd4" dependencies = [ - "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa", + "ryu", + "serde", ] [[package]] name = "sha2" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2933378ddfeda7ea26f48c555bdad8bb446bf8a3d17832dc83e380d444cfb8c1" dependencies = [ - "block-buffer 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cpuid-bool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "block-buffer", + "cfg-if 0.1.10", + "cpuid-bool", + "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 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "block-buffer", + "digest 0.9.0", + "keccak", + "opaque-debug", ] [[package]] name = "signature" version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29f060a7d147e33490ec10da418795238fd7545bba241504d6b31a409f2e6210" dependencies = [ - "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.9.0", + "rand_core", ] [[package]] name = "smallvec" version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252" [[package]] name = "snafu" version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c4e6046e4691afe918fd1b603fd6e515bcda5388a1092a9edbada307d159f09" dependencies = [ - "backtrace 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", - "doc-comment 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "snafu-derive 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace", + "doc-comment", + "snafu-derive", ] [[package]] name = "snafu-derive" version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7073448732a89f2f3e6581989106067f403d378faeafb4a50812eb814170d3e5" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "subtle" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "343f3f510c2915908f155e94f17220b19ccfacf2a64a2a5d8004f2c3e311e7fd" [[package]] name = "syn" version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c51d92969d209b54a98397e1b91c8ae82d8c87a7bb87df0b29aa2ad81454228" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "unicode-xid", ] [[package]] name = "target-lexicon" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d" [[package]] name = "thiserror" version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "318234ffa22e0920fe9a40d7b8369b5f649d490980cf7aadcf1eb91594869b42" dependencies = [ - "thiserror-impl 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror-impl", ] [[package]] name = "thiserror-impl" version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cae2447b6282786c3493999f40a9be2a6ad20cb8bd268b0a0dbf5a065535c0ab" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[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 = "version_check" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" [[package]] name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "wasmer-clif-backend" version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "691ea323652d540a10722066dbf049936f4367bb22a96f8992a262a942a8b11b" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-codegen 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-entity 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-native 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.79 (registry+https://github.com/rust-lang/crates.io-index)", - "nix 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", - "serde-bench 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", - "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-clif-fork-frontend 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-clif-fork-wasm 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-runtime-core 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-win-exception-handler 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmparser 0.51.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "cranelift-codegen", + "cranelift-entity", + "cranelift-native", + "libc", + "nix", + "rayon", + "serde", + "serde-bench", + "serde_bytes", + "serde_derive", + "target-lexicon", + "wasmer-clif-fork-frontend", + "wasmer-clif-fork-wasm", + "wasmer-runtime-core", + "wasmer-win-exception-handler", + "wasmparser", + "winapi", ] [[package]] name = "wasmer-clif-fork-frontend" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c23f2824f354a00a77e4b040eef6e1d4c595a8a3e9013bad65199cc8dade9a5a" dependencies = [ - "cranelift-codegen 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-codegen", + "log", + "smallvec", + "target-lexicon", ] [[package]] name = "wasmer-clif-fork-wasm" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a35e21d3aebc51cc6ebc0e830cf8458a9891c3482fb3c65ad18d408102929ae5" dependencies = [ - "cranelift-codegen 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-entity 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-clif-fork-frontend 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmparser 0.51.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-codegen", + "cranelift-entity", + "log", + "thiserror", + "wasmer-clif-fork-frontend", + "wasmparser", ] [[package]] name = "wasmer-middleware-common" version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd94068186b25fbe5213442648ffe0fa65ee77389bed020404486fd22056cc87" dependencies = [ - "wasmer-runtime-core 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmer-runtime-core", ] [[package]] name = "wasmer-runtime-core" version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45d4253f097502423d8b19d54cb18745f61b984b9dbce32424cba7945cfef367" dependencies = [ - "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "blake3 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.61 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "errno 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.79 (registry+https://github.com/rust-lang/crates.io-index)", - "nix 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "page_size 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", - "serde-bench 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmparser 0.51.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "bincode", + "blake3", + "cc", + "digest 0.8.1", + "errno", + "hex", + "indexmap", + "lazy_static", + "libc", + "nix", + "page_size", + "parking_lot", + "rustc_version", + "serde", + "serde-bench", + "serde_bytes", + "serde_derive", + "smallvec", + "target-lexicon", + "wasmparser", + "winapi", ] [[package]] name = "wasmer-win-exception-handler" version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf22ce6dc66d893099aac853d451bf9443fa8f5443f5bf4fc63f3aebd7b592b1" dependencies = [ - "cc 1.0.61 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.79 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-runtime-core 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "libc", + "wasmer-runtime-core", + "winapi", ] [[package]] name = "wasmparser" version = "0.51.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeb1956b19469d1c5e63e459d29e7b5aa0f558d9f16fcef09736f8a265e6c10a" [[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 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "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 = "wormhole" version = "0.1.0" dependencies = [ - "cosmwasm-std 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cosmwasm-storage 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cosmwasm-vm 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cw20 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cw20-base 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cw20-wrapped 0.1.0", - "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "k256 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", - "schemars 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", - "sha3 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", + "cosmwasm-std", + "cosmwasm-storage", + "cosmwasm-vm", + "cw20", + "cw20-base", + "cw20-wrapped", + "hex", + "k256", + "lazy_static", + "schemars", + "serde", + "sha3", + "thiserror", ] [[package]] name = "wyz" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" [[package]] name = "zeroize" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum addr2line 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" -"checksum adler 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" -"checksum arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" -"checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" -"checksum autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" -"checksum backtrace 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)" = "ec1931848a574faa8f7c71a12ea00453ff5effbb5f51afe7f77d7a48cace6ac1" -"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" -"checksum bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f30d3a39baa26f9651f17b375061f3233dde33424a8b72b0dbe93a68a0bc896d" -"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -"checksum bitvec 0.18.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1d2838fdd79e8776dbe07a106c784b0f8dda571a21b2750a092cc4cbaa653c8e" -"checksum blake3 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "e9ff35b701f3914bdb8fad3368d822c766ef2858b2583198e41639b936f09d3f" -"checksum block-buffer 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -"checksum block-padding 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" -"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" -"checksum cc 1.0.61 (registry+https://github.com/rust-lang/crates.io-index)" = "ed67cbde08356238e75fc4656be4749481eeffb09e19f320a25237d5221c985d" -"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -"checksum cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" -"checksum cosmwasm-std 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f85908a2696117c8f2c1b3ce201d34a1aa9a6b3c1583a65cfb794ec66e1cfde4" -"checksum cosmwasm-storage 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e103531a2ce636e86b7639cec25d348c4d360832ab8e0e7f9a6e00f08aac1379" -"checksum cosmwasm-vm 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "12d56a7ad7bbbf04b94a782f25fe50a9372067737f661931acf9d30668003efd" -"checksum cpuid-bool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" -"checksum cranelift-bforest 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)" = "45a9c21f8042b9857bda93f6c1910b9f9f24100187a3d3d52f214a34e3dc5818" -"checksum cranelift-codegen 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7853f77a6e4a33c67a69c40f5e1bb982bd2dc5c4a22e17e67b65bbccf9b33b2e" -"checksum cranelift-codegen-meta 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)" = "084cd6d5fb0d1da28acd72c199471bfb09acc703ec8f3bf07b1699584272a3b9" -"checksum cranelift-codegen-shared 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)" = "701b599783305a58c25027a4d73f2d6b599b2d8ef3f26677275f480b4d51e05d" -"checksum cranelift-entity 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b88e792b28e1ebbc0187b72ba5ba880dad083abe9231a99d19604d10c9e73f38" -"checksum cranelift-native 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32daf082da21c0c05d93394ff4842c2ab7c4991b1f3186a1d952f8ac660edd0b" -"checksum crossbeam-channel 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" -"checksum crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" -"checksum crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -"checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -"checksum crypto-mac 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -"checksum crypto-mac 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "58bcd97a54c7ca5ce2f6eb16f6bede5b0ab5f0055fedc17d2f0b4466e21671ca" -"checksum cw0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd55b1bb0bb419fe065d80d9ac5a4a0512d9fecf08ad9796f8aa29c7dbe63618" -"checksum cw2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2b7d5d7ea75a5eb53bfa4db60112bef22cdb56a8d612b67aab5c70edd2fbf34e" -"checksum cw20 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c4e74e78cc957826bb20c21e75244b2a3a7e0e12799f0710e318726406bed37b" -"checksum cw20-base 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e33af71eb8e2746fc7843b096fee77451ca96b78bc32b3c88b4bf744048fc07a" -"checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -"checksum digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -"checksum doc-comment 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" -"checksum ecdsa 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87bf8bfb05ea8a6f74ddf48c7d1774851ba77bbe51ac984fdfa6c30310e1ff5f" -"checksum either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" -"checksum elliptic-curve 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "396db09c483e7fca5d4fdb9112685632b3e76c9a607a2649c1bf904404a01366" -"checksum errno 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6eab5ee3df98a279d9b316b1af6ac95422127b1290317e6d18c1743c99418b01" -"checksum errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" -"checksum ff 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "01646e077d4ebda82b73f1bca002ea1e91561a77df2431a9e79729bcc31950ef" -"checksum funty 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0ba62103ce691c2fd80fbae2213dfdda9ce60804973ac6b6e97de818ea7f52c8" -"checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" -"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" -"checksum generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" -"checksum gimli 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "81dd6190aad0f05ddbbf3245c54ed14ca4aa6dd32f22312b70d8f168c3e3e633" -"checksum gimli 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" -"checksum group 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc11f9f5fbf1943b48ae7c2bf6846e7d827a512d1be4f23af708f5ca5d01dde1" -"checksum hashbrown 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" -"checksum hermit-abi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8" -"checksum hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" -"checksum hmac 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "deae6d9dbb35ec2c502d62b8f7b1c000a0822c3b0794ba36b3149c0a1c840dff" -"checksum indexmap 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" -"checksum itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" -"checksum k256 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c2967b7caf19e57f5d01ac0893551b0aaae1a8e2e2b2a28996e12c9c51b3b486" -"checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" -"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -"checksum libc 0.2.79 (registry+https://github.com/rust-lang/crates.io-index)" = "2448f6066e80e3bfc792e9c98bf705b4b0fc6e8ef5b43e5889aff0eaa9c58743" -"checksum lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -"checksum log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" -"checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" -"checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" -"checksum memoffset 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" -"checksum miniz_oxide 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c60c0dfe32c10b43a144bad8fc83538c52f58302c92300ea7ec7bf7b38d5a7b9" -"checksum nix 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3b2e0b4f3320ed72aaedb9a5ac838690a8047c7b275da22711fddff4f8a14229" -"checksum num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -"checksum object 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" -"checksum opaque-debug 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" -"checksum page_size 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eebde548fbbf1ea81a99b128872779c437752fb99f217c45245e1a61dcd9edcd" -"checksum parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" -"checksum parking_lot 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -"checksum parking_lot_core 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -"checksum proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)" = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" -"checksum quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" -"checksum radium 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "64de9a0c5361e034f1aefc9f71a86871ec870e766fe31a009734a989b329286a" -"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -"checksum raw-cpuid 7.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4a349ca83373cfa5d6dbb66fd76e58b2cca08da71a5f6400de0a0a6a9bceeaf" -"checksum rayon 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf6960dc9a5b4ee8d3e4c5787b4a112a8818e0290a42ff664ad60692fdf2032" -"checksum rayon-core 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e8c4fec834fb6e6d2dd5eece3c7b432a52f0ba887cf40e595190c4107edc08bf" -"checksum redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)" = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" -"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" -"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" -"checksum schemars 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "be77ed66abed6954aabf6a3e31a84706bedbf93750d267e92ef4a6d90bbd6a61" -"checksum schemars_derive 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "11af7a475c9ee266cfaa9e303a47c830ebe072bf3101ab907a7b7b9d816fa01d" -"checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)" = "96fe57af81d28386a513cbc6858332abc6117cfdb5999647c6444b8f43a370a5" -"checksum serde-bench 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "d733da87e79faaac25616e33d26299a41143fd4cd42746cbb0e91d8feea243fd" -"checksum serde-json-wasm 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7294d94d390f1d2334697c065ea591d7074c676e2d20aa6f1df752fced29823f" -"checksum serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)" = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" -"checksum serde_derive 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)" = "f630a6370fd8e457873b4bd2ffdae75408bc291ba72be773772a4c2a065d9ae8" -"checksum serde_derive_internals 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" -"checksum serde_json 1.0.58 (registry+https://github.com/rust-lang/crates.io-index)" = "a230ea9107ca2220eea9d46de97eddcb04cd00e92d13dda78e478dd33fa82bd4" -"checksum sha2 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2933378ddfeda7ea26f48c555bdad8bb446bf8a3d17832dc83e380d444cfb8c1" -"checksum sha3 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -"checksum signature 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "29f060a7d147e33490ec10da418795238fd7545bba241504d6b31a409f2e6210" -"checksum smallvec 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252" -"checksum snafu 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9c4e6046e4691afe918fd1b603fd6e515bcda5388a1092a9edbada307d159f09" -"checksum snafu-derive 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "7073448732a89f2f3e6581989106067f403d378faeafb4a50812eb814170d3e5" -"checksum subtle 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "343f3f510c2915908f155e94f17220b19ccfacf2a64a2a5d8004f2c3e311e7fd" -"checksum syn 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)" = "9c51d92969d209b54a98397e1b91c8ae82d8c87a7bb87df0b29aa2ad81454228" -"checksum target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d" -"checksum thiserror 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)" = "318234ffa22e0920fe9a40d7b8369b5f649d490980cf7aadcf1eb91594869b42" -"checksum thiserror-impl 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cae2447b6282786c3493999f40a9be2a6ad20cb8bd268b0a0dbf5a065535c0ab" -"checksum typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" -"checksum unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" -"checksum version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" -"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum wasmer-clif-backend 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "691ea323652d540a10722066dbf049936f4367bb22a96f8992a262a942a8b11b" -"checksum wasmer-clif-fork-frontend 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c23f2824f354a00a77e4b040eef6e1d4c595a8a3e9013bad65199cc8dade9a5a" -"checksum wasmer-clif-fork-wasm 0.59.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a35e21d3aebc51cc6ebc0e830cf8458a9891c3482fb3c65ad18d408102929ae5" -"checksum wasmer-middleware-common 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd94068186b25fbe5213442648ffe0fa65ee77389bed020404486fd22056cc87" -"checksum wasmer-runtime-core 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "45d4253f097502423d8b19d54cb18745f61b984b9dbce32424cba7945cfef367" -"checksum wasmer-win-exception-handler 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cf22ce6dc66d893099aac853d451bf9443fa8f5443f5bf4fc63f3aebd7b592b1" -"checksum wasmparser 0.51.4 (registry+https://github.com/rust-lang/crates.io-index)" = "aeb1956b19469d1c5e63e459d29e7b5aa0f558d9f16fcef09736f8a265e6c10a" -"checksum winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum wyz 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" -"checksum zeroize 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05f33972566adbd2d3588b0491eb94b98b43695c4ef897903470ede4f3f5a28a" +checksum = "05f33972566adbd2d3588b0491eb94b98b43695c4ef897903470ede4f3f5a28a" diff --git a/terra/contracts/cw20-wrapped/src/contract.rs b/terra/contracts/cw20-wrapped/src/contract.rs index 587f241c..df427f87 100644 --- a/terra/contracts/cw20-wrapped/src/contract.rs +++ b/terra/contracts/cw20-wrapped/src/contract.rs @@ -119,7 +119,7 @@ fn handle_mint_wrapped( return Err(StdError::unauthorized()); } - return Ok(handle_mint(deps, env, recipient, amount)?); + Ok(handle_mint(deps, env, recipient, amount)?) } pub fn query( diff --git a/terra/contracts/cw20-wrapped/src/msg.rs b/terra/contracts/cw20-wrapped/src/msg.rs index 75da562c..eb0919a1 100644 --- a/terra/contracts/cw20-wrapped/src/msg.rs +++ b/terra/contracts/cw20-wrapped/src/msg.rs @@ -1,3 +1,4 @@ +#![allow(clippy::field_reassign_with_default)] use schemars::JsonSchema; use serde::{Deserialize, Serialize}; diff --git a/terra/contracts/wormhole/Cargo.toml b/terra/contracts/wormhole/Cargo.toml index dd0cc317..389e6494 100644 --- a/terra/contracts/wormhole/Cargo.toml +++ b/terra/contracts/wormhole/Cargo.toml @@ -25,6 +25,7 @@ thiserror = { version = "1.0.20" } k256 = { version = "0.5.9", default-features = false, features = ["ecdsa"] } sha3 = { version = "0.9.1", default-features = false } hex = "0.4.2" +lazy_static = "1.4.0" [dev-dependencies] cosmwasm-vm = { version = "0.10.0", default-features = false, features = ["default-cranelift"] } \ No newline at end of file diff --git a/terra/contracts/wormhole/src/contract.rs b/terra/contracts/wormhole/src/contract.rs index 39821477..38256e5c 100644 --- a/terra/contracts/wormhole/src/contract.rs +++ b/terra/contracts/wormhole/src/contract.rs @@ -18,8 +18,6 @@ use cw20_base::msg::QueryMsg as TokenQuery; use cw20::TokenInfoResponse; -use hex; - use cw20_wrapped::msg::HandleMsg as WrappedMsg; use cw20_wrapped::msg::InitMsg as WrappedInit; use cw20_wrapped::msg::QueryMsg as WrappedQuery; @@ -69,14 +67,24 @@ pub fn handle( ) -> StdResult { match msg { HandleMsg::SubmitVAA { vaa } => handle_submit_vaa(deps, env, &vaa.as_slice()), - HandleMsg::RegisterAssetHook { asset_id } => handle_register_asset(deps, env, &asset_id.as_slice()), + HandleMsg::RegisterAssetHook { asset_id } => { + handle_register_asset(deps, env, &asset_id.as_slice()) + } HandleMsg::LockAssets { asset, recipient, amount, target_chain, nonce, - } => handle_lock_assets(deps, env, asset, amount, recipient.as_slice(), target_chain, nonce), + } => handle_lock_assets( + deps, + env, + asset, + amount, + recipient.as_slice(), + target_chain, + nonce, + ), HandleMsg::SetActive { is_active } => handle_set_active(deps, env, is_active), } } @@ -87,7 +95,6 @@ fn handle_submit_vaa( env: Env, data: &[u8], ) -> StdResult { - let state = config_read(&deps.storage).load()?; if !state.is_active { return ContractError::ContractInactive.std_err(); @@ -132,13 +139,13 @@ fn handle_submit_vaa( if vaa_archive_check(&deps.storage, &hash) { return ContractError::VaaAlreadyExecuted.std_err(); } - + // Load and check guardian set let guardian_set = guardian_set_get(&deps.storage, vaa_guardian_set_index); let guardian_set: GuardianSetInfo = - guardian_set.or(ContractError::InvalidGuardianSetIndex.std_err())?; + guardian_set.or_else(|_| ContractError::InvalidGuardianSetIndex.std_err())?; - if guardian_set.expiration_time == 0 || guardian_set.expiration_time < env.block.time { + if guardian_set.expiration_time != 0 && guardian_set.expiration_time < env.block.time { return ContractError::GuardianSetExpired.std_err(); } if len_signers < guardian_set.quorum() { @@ -151,21 +158,26 @@ fn handle_submit_vaa( for _ in 0..len_signers { let index = data.get_u8(pos) as i32; if index <= last_index { - return Err(ContractError::WrongGuardianIndexOrder.std()); + return ContractError::WrongGuardianIndexOrder.std_err(); } last_index = index; let signature = Signature::try_from(&data[pos + 1..pos + 1 + 64]) - .or(ContractError::CannotDecodeSignature.std_err())?; + .or_else(|_| ContractError::CannotDecodeSignature.std_err())?; let id = RecoverableId::new(data.get_u8(pos + 1 + 64)) - .or(ContractError::CannotDecodeSignature.std_err())?; + .or_else(|_| ContractError::CannotDecodeSignature.std_err())?; let recoverable_signature = RecoverableSignature::new(&signature, id) - .or(ContractError::CannotDecodeSignature.std_err())?; + .or_else(|_| ContractError::CannotDecodeSignature.std_err())?; let verify_key = recoverable_signature .recover_verify_key_from_digest_bytes(&hash) - .or(ContractError::CannotRecoverKey.std_err())?; - if !keys_equal(&verify_key, &guardian_set.addresses[index as usize]) { + .or_else(|_| ContractError::CannotRecoverKey.std_err())?; + + let index = index as usize; + if index >= guardian_set.addresses.len() { + return ContractError::TooManySignatures.std_err(); + } + if !keys_equal(&verify_key, &guardian_set.addresses[index]) { return ContractError::GuardianSignatureError.std_err(); } pos += SIGNATURE_LEN; @@ -204,7 +216,7 @@ fn handle_register_asset( match result { Ok(_) => { // Asset already registered, return error - return ContractError::AssetAlreadyRegistered.std_err(); + ContractError::AssetAlreadyRegistered.std_err() } Err(_) => { bucket.save(asset_id, &env.message.sender)?; @@ -343,7 +355,10 @@ fn vaa_transfer( messages.push(CosmosMsg::Wasm(WasmMsg::Execute { contract_addr, msg: to_binary(&WrappedMsg::Mint { - recipient: deps.api.human_address(&target_address)?, + recipient: deps + .api + .human_address(&target_address) + .or_else(|_| ContractError::WrongTargetAddressFormat.std_err())?, amount: Uint128::from(amount), })?, send: vec![], @@ -359,7 +374,10 @@ fn vaa_transfer( asset_address: asset_address.to_vec().into(), decimals: data.get_u8(103), mint: Some(InitMint { - recipient: deps.api.human_address(&target_address)?, + recipient: deps + .api + .human_address(&target_address) + .or_else(|_| ContractError::WrongTargetAddressFormat.std_err())?, amount: Uint128::from(amount), }), init_hook: Some(InitHook { @@ -443,7 +461,7 @@ fn handle_lock_assets( contract_addr: asset.clone(), msg: to_binary(&WrappedMsg::Burn { account: env.message.sender.clone(), - amount: Uint128::from(amount), + amount, })?, send: vec![], })); @@ -459,11 +477,11 @@ fn handle_lock_assets( Err(_) => { // This is a regular asset, transfer its balance messages.push(CosmosMsg::Wasm(WasmMsg::Execute { - contract_addr: asset.clone(), + contract_addr: asset, msg: to_binary(&TokenMsg::TransferFrom { owner: env.message.sender.clone(), recipient: env.contract.address.clone(), - amount: Uint128::from(amount), + amount, })?, send: vec![], })); @@ -479,7 +497,12 @@ fn handle_lock_assets( log("locked.token_chain", asset_chain), log("locked.token_decimals", decimals), log("locked.token", hex::encode(asset_address)), - log("locked.sender", hex::encode(extend_address_to_32(&deps.api.canonical_address(&env.message.sender)?))), + log( + "locked.sender", + hex::encode(extend_address_to_32( + &deps.api.canonical_address(&env.message.sender)?, + )), + ), log("locked.recipient", hex::encode(recipient)), log("locked.amount", amount), log("locked.nonce", nonce), @@ -559,36 +582,77 @@ fn keys_equal(a: &VerifyKey, b: &GuardianAddress) -> bool { #[cfg(test)] mod tests { - use std::time::{UNIX_EPOCH, SystemTime}; use super::*; use crate::state::GuardianSetInfo; use cosmwasm_std::testing::{mock_dependencies, mock_env}; use cosmwasm_std::HumanAddr; + use std::time::{SystemTime, UNIX_EPOCH}; + // Constants generated by bridge/cmd/vaa-test-terra/main.go const ADDR_1: &str = "beFA429d57cD18b7F8A4d91A2da9AB4AF05d0FBe"; - const ADDR_2: &str = "8575Df9b3c97B4E267Deb92d93137844A97A0132"; - const VAA_VALID_TRANSFER: &str = "010000000001001063f503dd308134e0f158537f54c5799719f4fa2687dd276c72ef60ae0c82c47d4fb560545afaabdf60c15918e221763fd1892c75f2098c0ffd5db4af254a4501000007d01000000038010302010400000000000000000000000000000000000000000000000000000000000101010101010101010101010101010101010101000000000000000000000000010000000000000000000000000347ef34687bdc9f189e87a9200658d9c40e9988080000000000000000000000000000000000000000000000000de0b6b3a7640000"; - const VAA_VALID_GUARDIAN_SET_CHANGE: &str = "01000000000100d90d6f9cbc0458599cbe4d267bc9221b54955b94cb5cb338aeb845bdc9dd275f558871ea479de9cc0b44cfb2a07344431a3adbd2f98aa86f4e12ff4aba061b7f00000007d00100000001018575df9b3c97b4e267deb92d93137844a97a0132"; + const ADDR_2: &str = "E06A9ADfeB38a8eE4D00E89307C016D0749679bD"; + const ADDR_3: &str = "8575Df9b3c97B4E267Deb92d93137844A97A0132"; + const ADDR_4: &str = "0427cDA59902Dc6EB0c1bd2b6D38F87c5552b348"; + const ADDR_5: &str = "bFEa822F75c42e1764c791B8fE04a7B10DDB3857"; + const ADDR_6: &str = "2F5FE0B158147e7260f14062556AfC94Eece55fF"; + const VAA_VALID_TRANSFER_1_SIG: &str = "01000000000100d106d4f363c6e3d0bf8ebf3cf8ef1ba35e66687b7613a826b5f5b68e0c346e1e0fdd6ceb332c87dad7d170ee6736571c0b75173787a8dcf41a492075e18a9a9601000007d01000000038010302010400000000000000000000000000000000000000000000000000000000000000000000000000000000000102030405060708090001020304050607080900010000000000000000000000000347ef34687bdc9f189e87a9200658d9c40e9988080000000000000000000000000000000000000000000000000de0b6b3a7640000"; + const VAA_VALID_TRANSFER_2_SIGS: &str = "0100000000020040d91705d211c52c9f120adb1b794355ba10ec1ff855295e677c5b341b2e5449684179f8ca4087e88de2cba0e6cbf6e0c7a353529800ccf96e5fdd80a85a59220001efb8a4825c87ab68190e1b184eeda5c45f82b22450ff113f2581a2f1bd3aeca60798392405cd4d3b523a5c3426d09b963c195c842a0040e93651cb700785d0e600000007d0100000003801030201040000000000000000000000000000000000000000000000000000000000000000000000000000000000010203040506070809000102030405060708090002000000000000000000000000d833215cbcc3f914bd1c9ece3ee7bf8b14f841bb080000000000000000000000000000000000000000000000000de0b6b3a7640000"; + const VAA_VALID_TRANSFER_3_SIGS: &str = "0100000000030040d91705d211c52c9f120adb1b794355ba10ec1ff855295e677c5b341b2e5449684179f8ca4087e88de2cba0e6cbf6e0c7a353529800ccf96e5fdd80a85a59220001efb8a4825c87ab68190e1b184eeda5c45f82b22450ff113f2581a2f1bd3aeca60798392405cd4d3b523a5c3426d09b963c195c842a0040e93651cb700785d0e60002a5fb92ff2b5a5eed98e2909ed932e5d9328cb2527027cce8f40c4f5677c341c83fe9fac7bf39af60fe47ecfb6f52b22b9d817d24d4147684b08e2fe19ff3a3ef01000007d0100000003801030201040000000000000000000000000000000000000000000000000000000000000000000000000000000000010203040506070809000102030405060708090002000000000000000000000000d833215cbcc3f914bd1c9ece3ee7bf8b14f841bb080000000000000000000000000000000000000000000000000de0b6b3a7640000"; + const VAA_VALID_GUARDIAN_SET_CHANGE_FROM_0: &str = "01000000000100a33c022217ccb87a5bc83b71e6377fff6639e7904d9e9995a42dc0867dc2b0bc5d1aacc3752ea71cf4d85278526b5dd40b0343667a2d4434a44cbf7844181a1000000007d0010000000101e06a9adfeb38a8ee4d00e89307c016d0749679bd"; + const VAA_ERROR_SIGNATURE_SEQUENCE: &str = "01000000000201efb8a4825c87ab68190e1b184eeda5c45f82b22450ff113f2581a2f1bd3aeca60798392405cd4d3b523a5c3426d09b963c195c842a0040e93651cb700785d0e6000040d91705d211c52c9f120adb1b794355ba10ec1ff855295e677c5b341b2e5449684179f8ca4087e88de2cba0e6cbf6e0c7a353529800ccf96e5fdd80a85a592200000007d0100000003801030201040000000000000000000000000000000000000000000000000000000000000000000000000000000000010203040506070809000102030405060708090002000000000000000000000000d833215cbcc3f914bd1c9ece3ee7bf8b14f841bb080000000000000000000000000000000000000000000000000de0b6b3a7640000"; + const VAA_ERROR_WRONG_SIGNATURE_1_SIG: &str = "0100000000010075c1b20fb59adc55a08f9778bc525507a36a29d1f0e2cb3fcc9c90f7331786263c4bd53ce5d3865b4f63cddeafb2c1026b5e13f1b66af7dabbd1f1af9f34fd3f01000007d01000000038010302010400000000000000000000000000000000000000000000000000000000000000000000000000000000000102030405060708090001020304050607080900010000000000000000000000000347ef34687bdc9f189e87a9200658d9c40e9988080000000000000000000000000000000000000000000000000de0b6b3a7640000"; + const VAA_VALID_GUARDIAN_SET_CHANGE_FROM_0_DIFF: &str = "01000000000100d90d6f9cbc0458599cbe4d267bc9221b54955b94cb5cb338aeb845bdc9dd275f558871ea479de9cc0b44cfb2a07344431a3adbd2f98aa86f4e12ff4aba061b7f00000007d00100000001018575df9b3c97b4e267deb92d93137844a97a0132"; + const VAA_ERROR_INVALID_TARGET_ADDRESS: &str = "0100000000010092f32c76aa3a8d83de59b3f2281cfbf70af33d9bcfbaa78bd3e9cafc512335ab40b126a894f0182ee8c69f5324496eb681c1780ed39bcc80f589cfc0a5df144a01000007d01000000038010302010400000000000000000000000000000000000000000000000000000000000000000000000000000000000347ef34687bdc9f189e87a9200658d9c40e9988010000000000000000000000000347ef34687bdc9f189e87a9200658d9c40e9988080000000000000000000000000000000000000000000000000de0b6b3a7640000"; + const VAA_VALID_GUARDIAN_SET_CHANGE_JUMP: &str = "010000000001004b179853b36b76446c72944d50551be814ab34f23da2124615315da71505df801b38355d741cdd65e856792e2a1435270abfe52ae005c4e3671c0b7aac36445a01000007d00100000002018575df9b3c97b4e267deb92d93137844a97a0132"; + const VAA_ERROR_AMOUNT_TOO_HIGH: &str = "0100000000010055fdf76a64b779ac5b7a54dc181cf430f4d14a499b7933049d8bc94db529ed0a2d12d50ec2026883e59a5c64f2189b60c84a53b66113e8b52da66fd89f70495f00000007d01000000038010302010400000000000000000000000000000000000000000000000000000000000000000000000000000000000102030405060708090001020304050607080900010000000000000000000000000347ef34687bdc9f189e87a9200658d9c40e9988080000000000000000000000000000000100000000000000000000000000000000"; + const VAA_ERROR_SAME_SOURCE_AND_TARGET: &str = "010000000001004c53dfce8fc9e781f0cfdc6592c00c337c1e109168ff17ee3bf4cf69ddb8a0a52a3c215093301d5459d282d625dc5125592609f06f14a57f61121e668b0ec10500000003e81000000038030302010400000000000000000000000000000000000000000000000000000000000000000000000000000000000102030405060708090001020304050607080900010000000000000000000000000347ef34687bdc9f189e87a9200658d9c40e9988080000000000000000000000000000000000000000000000000de0b6b3a7640000"; + const VAA_ERROR_WRONG_TARGET: &str = "01000000000100b19a265b1407e9619ffc29be9562161ed2c155db5ba68e01265a250a677eb0c62bb91e468da827e9ec4c1e9428ade97129126f56500c4a3c9f9803cc85f656d200000003e81000000038010202010400000000000000000000000000000000000000000000000000000000000000000000000000000000000102030405060708090001020304050607080900010000000000000000000000000347ef34687bdc9f189e87a9200658d9c40e9988080000000000000000000000000000000000000000000000000de0b6b3a7640000"; + const VAA_VALID_GUARDIAN_SET_CHANGE_TO_6: &str = "01000000000100a5defbd912ef327d07afff71e0da9c2e2a13e5516255c62e249a6761afe2465c7b6fc1032451559551e76eb4a029474fd791b2250c4fd40a8b3f5d4f5f58e5a30000000fa0010000000106befa429d57cd18b7f8a4d91a2da9ab4af05d0fbee06a9adfeb38a8ee4d00e89307c016d0749679bd8575df9b3c97b4e267deb92d93137844a97a01320427cda59902dc6eb0c1bd2b6d38f87c5552b348bfea822f75c42e1764c791b8fe04a7b10ddb38572f5fe0b158147e7260f14062556afc94eece55ff"; + const VAA_VALID_TRANSFER_5_SIGS_GS_1: &str = "01000000010500027eb7e87a9d0ab91ec53bb073c0f0acf189900139daa652666fd4cfe32a4ee42383c1a66e3a397c2de8ae485225357feb52f665952b1e384ef6dfcea1ba9f920001cfcacfad444ac3202f8f0d2252c69ee90d18c9105f7be3b5d361b7fcb0fbf7fa7287bac5de9cb02f86a28fdd7f24015991020431b0048aa3bbb29daed625e416000372f6c239ddeccded04a95a0cf0bfefe6e168148f1fe3b93e797eb2e74e098b890f2be341dd0f3c8172c2050154407cfdd1ea7bd6cce0b31f020ec7530ffb6109000449c025fe0630268983d57c4bd1546497788f810e427b6fd436cb1f048152375e1063422b4d1cc668a0612814c550ea7e3d1aa93404a0b6e089d210d4c937023a000548bf474fb350d5e482378c37404fb4d1421e262d13ebf6b11977214c789a246a6c278a522a9be4beba008f3d481b1ee35c5b0559bef474eb34b9e3e681947c230100000fa01000000039010302010500000000000000000000000000000000000000000000000000000000000000000000000000000000000102030405060708090001020304050607080900010000000000000000000000000347ef34687bdc9f189e87a9200658d9c40e9988080000000000000000000000000000000000000000000000000de0b6b3a7640000"; const CANONICAL_LENGTH: usize = 20; - fn do_init_default_guardians(deps: &mut Extern) { - do_init(deps, &vec![GuardianAddress::from(ADDR_1)]); + lazy_static! { + static ref ALL_GUARDIANS: Vec = vec![ + GuardianAddress::from(ADDR_1), + GuardianAddress::from(ADDR_2), + GuardianAddress::from(ADDR_3), + GuardianAddress::from(ADDR_4), + GuardianAddress::from(ADDR_5), + GuardianAddress::from(ADDR_6) + ]; + } + + fn unix_timestamp() -> u64 { + SystemTime::now() + .duration_since(UNIX_EPOCH) + .unwrap() + .as_secs() + } + + fn do_init_with_guardians( + deps: &mut Extern, + number_of_guardians: usize, + ) { + let expiration_time = unix_timestamp() + 1000; + do_init(deps, &ALL_GUARDIANS[..number_of_guardians], expiration_time); } fn do_init( deps: &mut Extern, - guardians: &Vec, + guardians: &[GuardianAddress], + expiration_time: u64, ) { let init_msg = InitMsg { initial_guardian_set: GuardianSetInfo { - addresses: guardians.clone(), - expiration_time: SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() + 1000, + addresses: guardians.to_vec(), + expiration_time, }, guardian_set_expirity: 50, wrapped_asset_code_id: 999, }; - let env = mock_env(&HumanAddr::from("creator"), &[]); + let mut env = mock_env(&HumanAddr::from("creator"), &[]); + env.block.time = unix_timestamp(); let res = init(deps, env, init_msg).unwrap(); assert_eq!(0, res.messages.len()); @@ -602,7 +666,8 @@ mod tests { let msg = HandleMsg::SubmitVAA { vaa: hex::decode(vaa).expect("Decoding failed").into(), }; - let env = mock_env(&HumanAddr::from("creator"), &[]); + let mut env = mock_env(&HumanAddr::from("creator"), &[]); + env.block.time = unix_timestamp(); handle(deps, env, msg) } @@ -610,15 +675,17 @@ mod tests { #[test] fn can_init() { let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); - do_init_default_guardians(&mut deps); + do_init_with_guardians(&mut deps, 1); } #[test] fn valid_vaa_token_transfer() { let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); - do_init_default_guardians(&mut deps); + do_init_with_guardians(&mut deps, 1); - let messages = submit_vaa(&mut deps, VAA_VALID_TRANSFER).unwrap().messages; + let messages = submit_vaa(&mut deps, VAA_VALID_TRANSFER_1_SIG) + .unwrap() + .messages; assert_eq!(1, messages.len()); let msg = &messages[0]; match msg { @@ -640,21 +707,39 @@ mod tests { } #[test] - fn same_vaa_twice_error() { + fn valid_vaa_2_signatures() { let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); - do_init_default_guardians(&mut deps); + do_init_with_guardians(&mut deps, 2); - let _ = submit_vaa(&mut deps, VAA_VALID_TRANSFER).unwrap(); - let e = submit_vaa(&mut deps, VAA_VALID_TRANSFER).unwrap_err(); + let result = submit_vaa(&mut deps, VAA_VALID_TRANSFER_2_SIGS); + assert!(result.is_ok()); + } + + #[test] + fn valid_vaa_non_expiring_guardians() { + let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); + do_init(&mut deps, &vec![GuardianAddress::from(ADDR_1)], 0); + + let result = submit_vaa(&mut deps, VAA_VALID_TRANSFER_1_SIG); + assert!(result.is_ok()); + } + + #[test] + fn error_vaa_same_vaa_twice() { + let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); + do_init_with_guardians(&mut deps, 1); + + let _ = submit_vaa(&mut deps, VAA_VALID_TRANSFER_1_SIG).unwrap(); + let e = submit_vaa(&mut deps, VAA_VALID_TRANSFER_1_SIG).unwrap_err(); assert_eq!(e, ContractError::VaaAlreadyExecuted.std()); } #[test] fn valid_vaa_guardian_set_change() { let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); - do_init_default_guardians(&mut deps); + do_init_with_guardians(&mut deps, 1); - let messages = submit_vaa(&mut deps, VAA_VALID_GUARDIAN_SET_CHANGE) + let messages = submit_vaa(&mut deps, VAA_VALID_GUARDIAN_SET_CHANGE_FROM_0) .unwrap() .messages; assert_eq!(0, messages.len()); @@ -674,4 +759,158 @@ mod tests { } ); } + + #[test] + fn error_vaa_guardian_set_expired() { + let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); + // Expiration time 1 second in the past + let expiration_time = unix_timestamp() - 1; + do_init( + &mut deps, + &vec![GuardianAddress::from(ADDR_1)], + expiration_time, + ); + + let result = submit_vaa(&mut deps, VAA_VALID_TRANSFER_1_SIG); + assert_eq!(result, ContractError::GuardianSetExpired.std_err()); + } + + #[test] + fn error_vaa_no_quorum() { + let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); + do_init_with_guardians(&mut deps, 2); + + let result = submit_vaa(&mut deps, VAA_VALID_TRANSFER_1_SIG); + assert_eq!(result, ContractError::NoQuorum.std_err()); + } + + #[test] + fn valid_partial_quorum() { + let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); + do_init_with_guardians(&mut deps, 4); + + // 3 signatures on 4-guardian set is quorum + let result = submit_vaa(&mut deps, VAA_VALID_TRANSFER_3_SIGS); + assert!(result.is_ok()); + } + + #[test] + fn error_vaa_wrong_guardian_index_order() { + let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); + do_init_with_guardians(&mut deps, 2); + + let result = submit_vaa(&mut deps, VAA_ERROR_SIGNATURE_SEQUENCE); + assert_eq!(result, ContractError::WrongGuardianIndexOrder.std_err()); + } + + #[test] + fn error_vaa_too_many_signatures() { + let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); + do_init_with_guardians(&mut deps, 1); + + let result = submit_vaa(&mut deps, VAA_VALID_TRANSFER_2_SIGS); + assert_eq!(result, ContractError::TooManySignatures.std_err()); + } + + #[test] + fn error_vaa_invalid_signature() { + let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); + do_init( + &mut deps, + // Use 1-2-4 guardians + &vec![ + GuardianAddress::from(ADDR_1), + GuardianAddress::from(ADDR_2), + GuardianAddress::from(ADDR_4), + ], + unix_timestamp(), + ); + // Sign by 1-2-3 guardians + let result = submit_vaa(&mut deps, VAA_VALID_TRANSFER_3_SIGS); + assert_eq!(result, ContractError::GuardianSignatureError.std_err()); + + // Single signature, wrong key + let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); + do_init_with_guardians(&mut deps, 1); + + let result = submit_vaa(&mut deps, VAA_ERROR_WRONG_SIGNATURE_1_SIG); + assert_eq!(result, ContractError::GuardianSignatureError.std_err()); + } + + #[test] + fn error_vaa_not_current_quardian_set() { + let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); + do_init_with_guardians(&mut deps, 1); + + let result = submit_vaa(&mut deps, VAA_VALID_GUARDIAN_SET_CHANGE_FROM_0); + assert!(result.is_ok()); + + // Submit another valid change, which will fail, because now set #1 is active + // (we need to send a different VAA, because otherwise it will be blocked by duplicate check) + let result = submit_vaa(&mut deps, VAA_VALID_GUARDIAN_SET_CHANGE_FROM_0_DIFF); + assert_eq!(result, ContractError::NotCurrentGuardianSet.std_err()); + } + + #[test] + fn error_vaa_wrong_target_address_format() { + let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); + do_init_with_guardians(&mut deps, 1); + + let result = submit_vaa(&mut deps, VAA_ERROR_INVALID_TARGET_ADDRESS); + assert_eq!(result, ContractError::WrongTargetAddressFormat.std_err()); + } + + #[test] + fn error_vaa_guardian_set_change_index_not_increasing() { + let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); + do_init_with_guardians(&mut deps, 1); + + let result = submit_vaa(&mut deps, VAA_VALID_GUARDIAN_SET_CHANGE_JUMP); + assert_eq!( + result, + ContractError::GuardianSetIndexIncreaseError.std_err() + ); + } + + #[test] + fn error_vaa_transfer_amount_too_high() { + let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); + do_init_with_guardians(&mut deps, 1); + + let result = submit_vaa(&mut deps, VAA_ERROR_AMOUNT_TOO_HIGH); + assert_eq!(result, ContractError::AmountTooHigh.std_err()); + } + + #[test] + fn error_vaa_transfer_same_source_and_target() { + let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); + do_init_with_guardians(&mut deps, 1); + + let result = submit_vaa(&mut deps, VAA_ERROR_SAME_SOURCE_AND_TARGET); + assert_eq!(result, ContractError::SameSourceAndTarget.std_err()); + } + + #[test] + fn error_vaa_transfer_wrong_target_chain() { + let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); + do_init_with_guardians(&mut deps, 1); + + let result = submit_vaa(&mut deps, VAA_ERROR_WRONG_TARGET); + assert_eq!(result, ContractError::WrongTargetChain.std_err()); + } + + #[test] + fn valid_transfer_after_guardian_set_change() { + let mut deps = mock_dependencies(CANONICAL_LENGTH, &[]); + do_init_with_guardians(&mut deps, 1); + + let result = submit_vaa(&mut deps, VAA_VALID_TRANSFER_5_SIGS_GS_1); + assert_eq!(result, ContractError::InvalidGuardianSetIndex.std_err()); + + let result = submit_vaa(&mut deps, VAA_VALID_GUARDIAN_SET_CHANGE_TO_6); + assert!(result.is_ok()); + + let result = submit_vaa(&mut deps, VAA_VALID_TRANSFER_5_SIGS_GS_1); + assert!(result.is_ok()); + } } diff --git a/terra/contracts/wormhole/src/error.rs b/terra/contracts/wormhole/src/error.rs index b5286ff8..334aaa8e 100644 --- a/terra/contracts/wormhole/src/error.rs +++ b/terra/contracts/wormhole/src/error.rs @@ -78,6 +78,14 @@ pub enum ContractError { /// Attempt to execute contract action while it is inactive #[error("ContractInactive")] ContractInactive, + + /// Could not decode target address from canonical to human-readable form + #[error("WrongTargetAddressFormat")] + WrongTargetAddressFormat, + + /// More signatures than active guardians found + #[error("TooManySignatures")] + TooManySignatures, } impl ContractError { diff --git a/terra/contracts/wormhole/src/lib.rs b/terra/contracts/wormhole/src/lib.rs index bb529705..b40a7846 100644 --- a/terra/contracts/wormhole/src/lib.rs +++ b/terra/contracts/wormhole/src/lib.rs @@ -1,3 +1,7 @@ +#[cfg(test)] +#[macro_use] +extern crate lazy_static; + mod byte_utils; pub mod contract; mod error; diff --git a/terra/contracts/wormhole/src/msg.rs b/terra/contracts/wormhole/src/msg.rs index fef6b96c..b476a838 100644 --- a/terra/contracts/wormhole/src/msg.rs +++ b/terra/contracts/wormhole/src/msg.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{HumanAddr, Uint128, Binary}; +use cosmwasm_std::{Binary, HumanAddr, Uint128}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; diff --git a/terra/contracts/wormhole/src/state.rs b/terra/contracts/wormhole/src/state.rs index 6e8c584f..bd3ae9ec 100644 --- a/terra/contracts/wormhole/src/state.rs +++ b/terra/contracts/wormhole/src/state.rs @@ -1,7 +1,7 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use cosmwasm_std::{CanonicalAddr, HumanAddr, StdResult, Storage, Binary}; +use cosmwasm_std::{Binary, CanonicalAddr, HumanAddr, StdResult, Storage}; use cosmwasm_storage::{ bucket, bucket_read, singleton, singleton_read, Bucket, ReadonlyBucket, ReadonlySingleton, Singleton, @@ -122,7 +122,9 @@ mod tests { fn build_guardian_set(length: usize) -> GuardianSetInfo { let mut addresses: Vec = Vec::with_capacity(length); for _ in 0..length { - addresses.push(GuardianAddress{bytes: vec![].into()}); + addresses.push(GuardianAddress { + bytes: vec![].into(), + }); } GuardianSetInfo { @@ -149,4 +151,4 @@ mod tests { assert_eq!(build_guardian_set(25).quorum(), 17); assert_eq!(build_guardian_set(100).quorum(), 67); } -} \ No newline at end of file +} diff --git a/terra/contracts/wormhole/tests/integration.rs b/terra/contracts/wormhole/tests/integration.rs index f2dc0df0..d3f22c7e 100644 --- a/terra/contracts/wormhole/tests/integration.rs +++ b/terra/contracts/wormhole/tests/integration.rs @@ -3,7 +3,7 @@ static WASM: &[u8] = include_bytes!("../../../target/wasm32-unknown-unknown/rele use cosmwasm_std::{from_slice, Env, HumanAddr, InitResponse}; use cosmwasm_storage::to_length_prefixed; use cosmwasm_vm::testing::{init, mock_env, mock_instance, MockApi, MockQuerier, MockStorage}; -use cosmwasm_vm::{Instance, Storage, Api}; +use cosmwasm_vm::{Api, Instance, Storage}; use wormhole::msg::InitMsg; use wormhole::state::{ConfigInfo, GuardianAddress, GuardianSetInfo, CONFIG_KEY}; @@ -53,7 +53,11 @@ fn do_init( wrapped_asset_code_id: 999, }; let env = mock_env_height(&TestAddress::INITIALIZER.value(), height, 0); - let owner = deps.api.canonical_address(&TestAddress::INITIALIZER.value()).0.unwrap(); + let owner = deps + .api + .canonical_address(&TestAddress::INITIALIZER.value()) + .0 + .unwrap(); let res: InitResponse = init(&mut deps, env, init_msg).unwrap(); assert_eq!(0, res.messages.len()); @@ -66,7 +70,7 @@ fn do_init( guardian_set_expirity: 50, wrapped_asset_code_id: 999, owner, - is_active: true, + is_active: true, } ); Ok(()) @@ -78,7 +82,9 @@ fn do_init( #[test] fn init_works() { let guardians = vec![GuardianAddress::from(GuardianAddress { - bytes: hex::decode("beFA429d57cD18b7F8A4d91A2da9AB4AF05d0FBe").expect("Decoding failed").into(), + bytes: hex::decode("beFA429d57cD18b7F8A4d91A2da9AB4AF05d0FBe") + .expect("Decoding failed") + .into(), })]; let _deps = do_init(111, &guardians); }