sdk: fixes to types and builds
Change-Id: I10b753450445cc021dbeb9f28ddb0384070e9635
This commit is contained in:
parent
e8ed614e0d
commit
e561d6de02
Binary file not shown.
|
@ -1352,7 +1352,6 @@ dependencies = [
|
||||||
"solana-program",
|
"solana-program",
|
||||||
"solitaire",
|
"solitaire",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
"wormhole-core",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1391,6 +1390,7 @@ dependencies = [
|
||||||
name = "wormhole-sdk"
|
name = "wormhole-sdk"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"borsh",
|
||||||
"byteorder",
|
"byteorder",
|
||||||
"cosmwasm-std",
|
"cosmwasm-std",
|
||||||
"cosmwasm-storage",
|
"cosmwasm-storage",
|
||||||
|
|
|
@ -64,6 +64,11 @@ pub type Signature = [u8; 66];
|
||||||
/// Ethereum addresses, are left zero padded to 32.
|
/// Ethereum addresses, are left zero padded to 32.
|
||||||
pub type ForeignAddress = [u8; 32];
|
pub type ForeignAddress = [u8; 32];
|
||||||
|
|
||||||
|
/// Fields on VAA's are all usually fixed bytestrings, however they often contain UTF-8. When
|
||||||
|
/// parsed these result in `String` with the additional constraint that they are always equal or
|
||||||
|
/// less to the underlying byte field.
|
||||||
|
type ShortUTFString = String;
|
||||||
|
|
||||||
/// The core VAA itself. This structure is what is received by a contract on the receiving side of
|
/// The core VAA itself. This structure is what is received by a contract on the receiving side of
|
||||||
/// a wormhole message passing flow. The payload of the message must be parsed separately to the
|
/// a wormhole message passing flow. The payload of the message must be parsed separately to the
|
||||||
/// VAA itself as it is completely user defined.
|
/// VAA itself as it is completely user defined.
|
||||||
|
@ -84,6 +89,13 @@ pub struct VAA {
|
||||||
pub payload: Vec<u8>,
|
pub payload: Vec<u8>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Contains the hash, secp256k1 payload, and serialized digest of the VAA. These are used in
|
||||||
|
/// various places in Wormhole codebases.
|
||||||
|
pub struct VAADigest {
|
||||||
|
pub digest: Vec<u8>,
|
||||||
|
pub hash: [u8; 32],
|
||||||
|
}
|
||||||
|
|
||||||
impl VAA {
|
impl VAA {
|
||||||
/// Given any argument treatable as a series of bytes, attempt to deserialize into a valid VAA.
|
/// Given any argument treatable as a series of bytes, attempt to deserialize into a valid VAA.
|
||||||
pub fn from_bytes<T: AsRef<[u8]>>(input: T) -> Result<Self, WormholeError> {
|
pub fn from_bytes<T: AsRef<[u8]>>(input: T) -> Result<Self, WormholeError> {
|
||||||
|
@ -97,7 +109,7 @@ impl VAA {
|
||||||
/// returns a 256 bit Keccak hash of these components. This hash is utilised in all Wormhole
|
/// returns a 256 bit Keccak hash of these components. This hash is utilised in all Wormhole
|
||||||
/// components for identifying unique VAA's, including the bridge, modules, and core guardian
|
/// components for identifying unique VAA's, including the bridge, modules, and core guardian
|
||||||
/// software.
|
/// software.
|
||||||
pub fn digest(&self) -> Option<[u8; 32]> {
|
pub fn digest(&self) -> Option<VAADigest> {
|
||||||
use byteorder::{
|
use byteorder::{
|
||||||
BigEndian,
|
BigEndian,
|
||||||
WriteBytesExt,
|
WriteBytesExt,
|
||||||
|
@ -124,13 +136,16 @@ impl VAA {
|
||||||
// We hash the body so that secp256k1 signatures are signing the hash instead of the body
|
// We hash the body so that secp256k1 signatures are signing the hash instead of the body
|
||||||
// within our contracts. We do this so we don't have to submit the entire VAA for signature
|
// within our contracts. We do this so we don't have to submit the entire VAA for signature
|
||||||
// verification, only the hash.
|
// verification, only the hash.
|
||||||
let body: [u8; 32] = {
|
let hash: [u8; 32] = {
|
||||||
let mut h = sha3::Keccak256::default();
|
let mut h = sha3::Keccak256::default();
|
||||||
let _ = h.write(body.as_slice()).unwrap();
|
let _ = h.write(body.as_slice()).unwrap();
|
||||||
h.finalize().into()
|
h.finalize().into()
|
||||||
};
|
};
|
||||||
|
|
||||||
Some(body)
|
Some(VAADigest {
|
||||||
|
digest: body,
|
||||||
|
hash,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,10 @@ use crate::vaa::{
|
||||||
parse_fixed,
|
parse_fixed,
|
||||||
GovernanceAction,
|
GovernanceAction,
|
||||||
};
|
};
|
||||||
|
use crate::vaa::ShortUTFString;
|
||||||
use crate::{
|
use crate::{
|
||||||
parse_fixed_utf8,
|
|
||||||
Chain,
|
Chain,
|
||||||
|
parse_fixed_utf8,
|
||||||
WormholeError,
|
WormholeError,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -36,16 +37,16 @@ pub struct Transfer {
|
||||||
pub nft_chain: Chain,
|
pub nft_chain: Chain,
|
||||||
|
|
||||||
/// Symbol of the token
|
/// Symbol of the token
|
||||||
pub symbol: String,
|
pub symbol: ShortUTFString,
|
||||||
|
|
||||||
/// Name of the token
|
/// Name of the token
|
||||||
pub name: String,
|
pub name: ShortUTFString,
|
||||||
|
|
||||||
/// TokenID of the token (big-endian uint256)
|
/// TokenID of the token (big-endian uint256)
|
||||||
pub token_id: U256,
|
pub token_id: U256,
|
||||||
|
|
||||||
/// URI of the token metadata
|
/// URI of the token metadata
|
||||||
pub uri: String,
|
pub uri: ShortUTFString,
|
||||||
|
|
||||||
/// Address of the recipient. Left-zero-padded if shorter than 32 bytes
|
/// Address of the recipient. Left-zero-padded if shorter than 32 bytes
|
||||||
pub to: [u8; 32],
|
pub to: [u8; 32],
|
||||||
|
|
|
@ -13,9 +13,10 @@ use nom::{
|
||||||
use primitive_types::U256;
|
use primitive_types::U256;
|
||||||
|
|
||||||
use crate::vaa::{
|
use crate::vaa::{
|
||||||
|
GovernanceAction,
|
||||||
parse_chain,
|
parse_chain,
|
||||||
parse_fixed,
|
parse_fixed,
|
||||||
GovernanceAction,
|
ShortUTFString,
|
||||||
};
|
};
|
||||||
use crate::{
|
use crate::{
|
||||||
parse_fixed_utf8,
|
parse_fixed_utf8,
|
||||||
|
@ -94,11 +95,11 @@ pub struct AssetMeta {
|
||||||
/// Number of decimals the source token has on its origin chain.
|
/// Number of decimals the source token has on its origin chain.
|
||||||
pub decimals: u8,
|
pub decimals: u8,
|
||||||
|
|
||||||
/// Ticker symbol for the token on its origin chain.
|
/// Ticker Symbol for the token on its origin chain.
|
||||||
pub symbol: String,
|
pub symbol: ShortUTFString,
|
||||||
|
|
||||||
/// Full token name for the token on its origin chain.
|
/// Full Token name for the token on its origin chain.
|
||||||
pub name: String,
|
pub name: ShortUTFString,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AssetMeta {
|
impl AssetMeta {
|
||||||
|
|
|
@ -24,19 +24,25 @@ pub fn id() -> Addr {
|
||||||
Addr::unchecked("terra1dq03ugtd40zu9hcgdzrsq6z2z4hwhc9tqk2uy5")
|
Addr::unchecked("terra1dq03ugtd40zu9hcgdzrsq6z2z4hwhc9tqk2uy5")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Export Core Devnet Contract Address
|
||||||
|
#[cfg(feature = "testnet")]
|
||||||
|
pub fn id() -> Addr {
|
||||||
|
Addr::unchecked("terra1pd65m0q9tl3v8znnz5f5ltsfegyzah7g42cx5v")
|
||||||
|
}
|
||||||
|
|
||||||
/// Export Core Devnet Contract Address
|
/// Export Core Devnet Contract Address
|
||||||
#[cfg(feature = "devnet")]
|
#[cfg(feature = "devnet")]
|
||||||
pub fn id() -> Addr {
|
pub fn id() -> Addr {
|
||||||
Addr::unchecked("terra1pd65m0q9tl3v8znnz5f5ltsfegyzah7g42cx5v")
|
Addr::unchecked("terra1pd65m0q9tl3v8znnz5f5ltsfegyzah7g42cx5v")
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn post_message<T>(wormhole: Addr, nonce: u32, message: &T) -> StdResult<CosmosMsg>
|
pub fn post_message<T>(nonce: u32, message: &T) -> StdResult<CosmosMsg>
|
||||||
where
|
where
|
||||||
T: Serialize,
|
T: Serialize,
|
||||||
T: ?Sized,
|
T: ?Sized,
|
||||||
{
|
{
|
||||||
Ok(CosmosMsg::Wasm(WasmMsg::Execute {
|
Ok(CosmosMsg::Wasm(WasmMsg::Execute {
|
||||||
contract_addr: wormhole.to_string(),
|
contract_addr: id().to_string(),
|
||||||
funds: vec![],
|
funds: vec![],
|
||||||
msg: to_binary(&ExecuteMsg::PostMessage {
|
msg: to_binary(&ExecuteMsg::PostMessage {
|
||||||
message: to_binary(message)?,
|
message: to_binary(message)?,
|
||||||
|
@ -47,13 +53,12 @@ where
|
||||||
|
|
||||||
/// Parse a VAA using the Wormhole contract Query interface.
|
/// Parse a VAA using the Wormhole contract Query interface.
|
||||||
pub fn parse_vaa(
|
pub fn parse_vaa(
|
||||||
wormhole: Addr,
|
|
||||||
deps: DepsMut,
|
deps: DepsMut,
|
||||||
env: Env,
|
env: Env,
|
||||||
data: &Binary,
|
data: &Binary,
|
||||||
) -> StdResult<ParsedVAA> {
|
) -> StdResult<ParsedVAA> {
|
||||||
let vaa: ParsedVAA = deps.querier.query(&QueryRequest::Wasm(WasmQuery::Smart {
|
let vaa: ParsedVAA = deps.querier.query(&QueryRequest::Wasm(WasmQuery::Smart {
|
||||||
contract_addr: wormhole.to_string(),
|
contract_addr: id().to_string(),
|
||||||
msg: to_binary(&QueryMsg::VerifyVAA {
|
msg: to_binary(&QueryMsg::VerifyVAA {
|
||||||
vaa: data.clone(),
|
vaa: data.clone(),
|
||||||
block_time: env.block.time.seconds(),
|
block_time: env.block.time.seconds(),
|
||||||
|
|
|
@ -69,12 +69,6 @@ version = "0.5.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
|
checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "arrayvec"
|
|
||||||
version = "0.7.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "assert_matches"
|
name = "assert_matches"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
|
@ -153,18 +147,6 @@ version = "1.3.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "bitvec"
|
|
||||||
version = "0.20.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848"
|
|
||||||
dependencies = [
|
|
||||||
"funty",
|
|
||||||
"radium",
|
|
||||||
"tap",
|
|
||||||
"wyz",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "blake3"
|
name = "blake3"
|
||||||
version = "0.3.8"
|
version = "0.3.8"
|
||||||
|
@ -172,7 +154,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3"
|
checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayref",
|
"arrayref",
|
||||||
"arrayvec 0.5.2",
|
"arrayvec",
|
||||||
"cc",
|
"cc",
|
||||||
"cfg-if 0.1.10",
|
"cfg-if 0.1.10",
|
||||||
"constant_time_eq",
|
"constant_time_eq",
|
||||||
|
@ -304,12 +286,6 @@ dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "byte-slice-cast"
|
|
||||||
version = "1.2.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1d30c751592b77c499e7bce34d99d67c2c11bdc0574e9a488ddade14150a4698"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "byte-tools"
|
name = "byte-tools"
|
||||||
version = "0.3.1"
|
version = "0.3.1"
|
||||||
|
@ -932,9 +908,6 @@ version = "0.7.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c"
|
checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder",
|
|
||||||
"rand 0.8.4",
|
|
||||||
"rustc-hex",
|
|
||||||
"static_assertions",
|
"static_assertions",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -997,12 +970,6 @@ version = "0.3.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
|
checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "funty"
|
|
||||||
version = "1.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures"
|
name = "futures"
|
||||||
version = "0.1.31"
|
version = "0.1.31"
|
||||||
|
@ -1374,26 +1341,6 @@ dependencies = [
|
||||||
"unicode-normalization",
|
"unicode-normalization",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "impl-codec"
|
|
||||||
version = "0.5.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443"
|
|
||||||
dependencies = [
|
|
||||||
"parity-scale-codec",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "impl-trait-for-tuples"
|
|
||||||
version = "0.2.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2 1.0.28",
|
|
||||||
"quote 1.0.9",
|
|
||||||
"syn 1.0.75",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "indexmap"
|
name = "indexmap"
|
||||||
version = "1.7.0"
|
version = "1.7.0"
|
||||||
|
@ -1636,12 +1583,6 @@ version = "0.3.16"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
|
checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "minimal-lexical"
|
|
||||||
version = "0.2.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "miniz_oxide"
|
name = "miniz_oxide"
|
||||||
version = "0.4.4"
|
version = "0.4.4"
|
||||||
|
@ -1757,17 +1698,6 @@ dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "nom"
|
|
||||||
version = "7.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109"
|
|
||||||
dependencies = [
|
|
||||||
"memchr",
|
|
||||||
"minimal-lexical",
|
|
||||||
"version_check",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ntapi"
|
name = "ntapi"
|
||||||
version = "0.3.6"
|
version = "0.3.6"
|
||||||
|
@ -1930,32 +1860,6 @@ dependencies = [
|
||||||
"syn 1.0.75",
|
"syn 1.0.75",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "parity-scale-codec"
|
|
||||||
version = "2.3.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909"
|
|
||||||
dependencies = [
|
|
||||||
"arrayvec 0.7.2",
|
|
||||||
"bitvec",
|
|
||||||
"byte-slice-cast",
|
|
||||||
"impl-trait-for-tuples",
|
|
||||||
"parity-scale-codec-derive",
|
|
||||||
"serde",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "parity-scale-codec-derive"
|
|
||||||
version = "2.3.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro-crate 1.0.0",
|
|
||||||
"proc-macro2 1.0.28",
|
|
||||||
"quote 1.0.9",
|
|
||||||
"syn 1.0.75",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parking_lot"
|
name = "parking_lot"
|
||||||
version = "0.9.0"
|
version = "0.9.0"
|
||||||
|
@ -2095,7 +1999,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "06345ee39fbccfb06ab45f3a1a5798d9dafa04cb8921a76d227040003a234b0e"
|
checksum = "06345ee39fbccfb06ab45f3a1a5798d9dafa04cb8921a76d227040003a234b0e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fixed-hash",
|
"fixed-hash",
|
||||||
"impl-codec",
|
|
||||||
"uint",
|
"uint",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -2175,12 +2078,6 @@ dependencies = [
|
||||||
"proc-macro2 1.0.28",
|
"proc-macro2 1.0.28",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "radium"
|
|
||||||
version = "0.6.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rand"
|
name = "rand"
|
||||||
version = "0.7.3"
|
version = "0.7.3"
|
||||||
|
@ -2423,12 +2320,6 @@ version = "1.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "rustc-hex"
|
|
||||||
version = "2.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustc_version"
|
name = "rustc_version"
|
||||||
version = "0.2.3"
|
version = "0.2.3"
|
||||||
|
@ -3381,12 +3272,6 @@ dependencies = [
|
||||||
"unicode-xid 0.2.2",
|
"unicode-xid 0.2.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tap"
|
|
||||||
version = "1.0.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tar"
|
name = "tar"
|
||||||
version = "0.4.37"
|
version = "0.4.37"
|
||||||
|
@ -4121,15 +4006,6 @@ dependencies = [
|
||||||
"solitaire",
|
"solitaire",
|
||||||
"solitaire-client",
|
"solitaire-client",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
"wormhole-core",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "wormhole-core"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"nom",
|
|
||||||
"primitive-types",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -4142,12 +4018,6 @@ dependencies = [
|
||||||
"winapi-build",
|
"winapi-build",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "wyz"
|
|
||||||
version = "0.2.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "xattr"
|
name = "xattr"
|
||||||
version = "0.2.2"
|
version = "0.2.2"
|
||||||
|
|
|
@ -26,8 +26,6 @@ solana-program = "=1.7.0"
|
||||||
solitaire-client = { path = "../../solitaire/client", optional = true }
|
solitaire-client = { path = "../../solitaire/client", optional = true }
|
||||||
solitaire = { path = "../../solitaire/program" }
|
solitaire = { path = "../../solitaire/program" }
|
||||||
wasm-bindgen = { version = "0.2.74", features = ["serde-serialize"], optional = true }
|
wasm-bindgen = { version = "0.2.74", features = ["serde-serialize"], optional = true }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
|
||||||
wormhole-core = { path = "../../../sdk/rust/core", version="0.1.0" }
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
hex = "*"
|
hex = "*"
|
||||||
|
|
|
@ -244,20 +244,6 @@ dependencies = [
|
||||||
"syn 1.0.75",
|
"syn 1.0.75",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "bridge"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"borsh",
|
|
||||||
"byteorder",
|
|
||||||
"primitive-types",
|
|
||||||
"serde",
|
|
||||||
"sha3",
|
|
||||||
"solana-program",
|
|
||||||
"solitaire",
|
|
||||||
"wasm-bindgen",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bs58"
|
name = "bs58"
|
||||||
version = "0.3.1"
|
version = "0.3.1"
|
||||||
|
@ -1655,7 +1641,6 @@ name = "nft-bridge"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"borsh",
|
"borsh",
|
||||||
"bridge",
|
|
||||||
"bstr",
|
"bstr",
|
||||||
"byteorder",
|
"byteorder",
|
||||||
"hex",
|
"hex",
|
||||||
|
@ -1675,6 +1660,7 @@ dependencies = [
|
||||||
"spl-token",
|
"spl-token",
|
||||||
"spl-token-metadata",
|
"spl-token-metadata",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
|
"wormhole-bridge-solana",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -3984,6 +3970,19 @@ dependencies = [
|
||||||
"winapi 0.3.9",
|
"winapi 0.3.9",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wormhole-bridge-solana"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"borsh",
|
||||||
|
"byteorder",
|
||||||
|
"primitive-types",
|
||||||
|
"serde",
|
||||||
|
"sha3",
|
||||||
|
"solana-program",
|
||||||
|
"solitaire",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ws2_32-sys"
|
name = "ws2_32-sys"
|
||||||
version = "0.2.1"
|
version = "0.2.1"
|
||||||
|
|
|
@ -17,7 +17,7 @@ cpi = ["no-entrypoint"]
|
||||||
default = []
|
default = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bridge = { path = "../../../bridge/program", features = ["no-entrypoint", "cpi"] }
|
wormhole-bridge-solana = { path = "../../../bridge/program", features = ["no-entrypoint", "cpi"] }
|
||||||
borsh = "0.8.1"
|
borsh = "0.8.1"
|
||||||
bstr = "0.2.16"
|
bstr = "0.2.16"
|
||||||
byteorder = "1.4.3"
|
byteorder = "1.4.3"
|
||||||
|
|
|
@ -244,20 +244,6 @@ dependencies = [
|
||||||
"syn 1.0.75",
|
"syn 1.0.75",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "bridge"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"borsh",
|
|
||||||
"byteorder",
|
|
||||||
"primitive-types",
|
|
||||||
"serde",
|
|
||||||
"sha3",
|
|
||||||
"solana-program",
|
|
||||||
"solitaire",
|
|
||||||
"wasm-bindgen",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bs58"
|
name = "bs58"
|
||||||
version = "0.3.1"
|
version = "0.3.1"
|
||||||
|
@ -3402,7 +3388,6 @@ name = "token-bridge"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"borsh",
|
"borsh",
|
||||||
"bridge",
|
|
||||||
"bstr",
|
"bstr",
|
||||||
"byteorder",
|
"byteorder",
|
||||||
"hex",
|
"hex",
|
||||||
|
@ -3421,6 +3406,7 @@ dependencies = [
|
||||||
"spl-token",
|
"spl-token",
|
||||||
"spl-token-metadata",
|
"spl-token-metadata",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
|
"wormhole-bridge-solana",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -4013,6 +3999,19 @@ dependencies = [
|
||||||
"winapi 0.3.9",
|
"winapi 0.3.9",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wormhole-bridge-solana"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"borsh",
|
||||||
|
"byteorder",
|
||||||
|
"primitive-types",
|
||||||
|
"serde",
|
||||||
|
"sha3",
|
||||||
|
"solana-program",
|
||||||
|
"solitaire",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ws2_32-sys"
|
name = "ws2_32-sys"
|
||||||
version = "0.2.1"
|
version = "0.2.1"
|
||||||
|
|
|
@ -17,7 +17,7 @@ cpi = ["no-entrypoint"]
|
||||||
default = []
|
default = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bridge = { path = "../../../bridge/program", features = ["no-entrypoint", "cpi"] }
|
wormhole-bridge-solana = { path = "../../../bridge/program", features = ["no-entrypoint", "cpi"] }
|
||||||
borsh = "0.8.1"
|
borsh = "0.8.1"
|
||||||
bstr = "0.2.16"
|
bstr = "0.2.16"
|
||||||
byteorder = "1.4.3"
|
byteorder = "1.4.3"
|
||||||
|
|
|
@ -6,14 +6,14 @@ edition = "2018"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["pyth2wormhole/client", "bridge/client"]
|
default = ["pyth2wormhole/client", "wormhole-bridge-solana/client"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
borsh = "0.8.1"
|
borsh = "0.8.1"
|
||||||
clap = "3.0.0-beta.2" # This beta assimilates structopt into clap
|
clap = "3.0.0-beta.2" # This beta assimilates structopt into clap
|
||||||
env_logger = "0.8.4"
|
env_logger = "0.8.4"
|
||||||
log = "0.4.14"
|
log = "0.4.14"
|
||||||
bridge = {path = "../../bridge/program"}
|
wormhole-bridge-solana = {path = "../../bridge/program"}
|
||||||
pyth2wormhole = {path = "../program"}
|
pyth2wormhole = {path = "../program"}
|
||||||
shellexpand = "2.1.0"
|
shellexpand = "2.1.0"
|
||||||
solana-client = "=1.7.0"
|
solana-client = "=1.7.0"
|
||||||
|
|
|
@ -9,14 +9,14 @@ crate-type = ["cdylib", "lib"]
|
||||||
name = "pyth2wormhole"
|
name = "pyth2wormhole"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["bridge/no-entrypoint"]
|
default = ["wormhole-bridge-solana/no-entrypoint"]
|
||||||
client = ["solitaire/client", "solitaire-client", "no-entrypoint"]
|
client = ["solitaire/client", "solitaire-client", "no-entrypoint"]
|
||||||
trace = ["solitaire/trace", "bridge/trace"]
|
trace = ["solitaire/trace", "wormhole-bridge-solana/trace"]
|
||||||
no-entrypoint = []
|
no-entrypoint = []
|
||||||
wasm = ["no-entrypoint", "wasm-bindgen", "serde", "serde_derive", "serde_json"]
|
wasm = ["no-entrypoint", "wasm-bindgen", "serde", "serde_derive", "serde_json"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bridge = {path = "../../bridge/program"}
|
wormhole-bridge-solana = {path = "../../bridge/program"}
|
||||||
solitaire = { path = "../../solitaire/program" }
|
solitaire = { path = "../../solitaire/program" }
|
||||||
solitaire-client = { path = "../../solitaire/client", optional = true }
|
solitaire-client = { path = "../../solitaire/client", optional = true }
|
||||||
rocksalt = { path = "../../solitaire/rocksalt" }
|
rocksalt = { path = "../../solitaire/rocksalt" }
|
||||||
|
@ -28,4 +28,4 @@ pyth-client = {git = "https://github.com/pyth-network/pyth-client-rs", branch =
|
||||||
wasm-bindgen = { version = "0.2.74", features = ["serde-serialize"], optional = true}
|
wasm-bindgen = { version = "0.2.74", features = ["serde-serialize"], optional = true}
|
||||||
serde = { version = "1", optional = true}
|
serde = { version = "1", optional = true}
|
||||||
serde_derive = { version = "1", optional = true}
|
serde_derive = { version = "1", optional = true}
|
||||||
serde_json = { version = "1", optional = true}
|
serde_json = { version = "1", optional = true}
|
||||||
|
|
|
@ -1159,7 +1159,7 @@ dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"sha3",
|
"sha3",
|
||||||
"wormhole",
|
"wormhole-bridge-terra",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1332,7 +1332,7 @@ dependencies = [
|
||||||
"solana-program",
|
"solana-program",
|
||||||
"terraswap",
|
"terraswap",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"wormhole",
|
"wormhole-bridge-terra",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1950,7 +1950,7 @@ dependencies = [
|
||||||
"sha3",
|
"sha3",
|
||||||
"terraswap",
|
"terraswap",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"wormhole",
|
"wormhole-bridge-terra",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2299,7 +2299,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wormhole"
|
name = "wormhole-bridge-terra"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cosmwasm-std",
|
"cosmwasm-std",
|
||||||
|
|
|
@ -20,7 +20,7 @@ serde = { version = "1.0.103", default-features = false, features = ["derive"] }
|
||||||
cw721-wrapped = { path = "../cw721-wrapped", features = ["library"] }
|
cw721-wrapped = { path = "../cw721-wrapped", features = ["library"] }
|
||||||
cw721-base = { path = "../../contracts/cw721-base", version = "0.10.0", features = ["library"] }
|
cw721-base = { path = "../../contracts/cw721-base", version = "0.10.0", features = ["library"] }
|
||||||
cw721 = { path = "../../packages/cw721" }
|
cw721 = { path = "../../packages/cw721" }
|
||||||
wormhole = { path = "../wormhole", features = ["library"] }
|
wormhole-bridge-terra = { path = "../wormhole", features = ["library"] }
|
||||||
sha3 = { version = "0.9.1", default-features = false }
|
sha3 = { version = "0.9.1", default-features = false }
|
||||||
hex = "0.4.2"
|
hex = "0.4.2"
|
||||||
bigint = "4"
|
bigint = "4"
|
||||||
|
|
|
@ -23,7 +23,7 @@ cw20 = "0.8.0"
|
||||||
cw20-base = { version = "0.8.0", features = ["library"] }
|
cw20-base = { version = "0.8.0", features = ["library"] }
|
||||||
cw20-wrapped = { path = "../cw20-wrapped", features = ["library"] }
|
cw20-wrapped = { path = "../cw20-wrapped", features = ["library"] }
|
||||||
terraswap = "2.4.0"
|
terraswap = "2.4.0"
|
||||||
wormhole = { path = "../wormhole", features = ["library"] }
|
wormhole-bridge-terra = { path = "../wormhole", features = ["library"] }
|
||||||
thiserror = { version = "1.0.20" }
|
thiserror = { version = "1.0.20" }
|
||||||
k256 = { version = "0.9.4", default-features = false, features = ["ecdsa"] }
|
k256 = { version = "0.9.4", default-features = false, features = ["ecdsa"] }
|
||||||
sha3 = { version = "0.9.1", default-features = false }
|
sha3 = { version = "0.9.1", default-features = false }
|
||||||
|
|
|
@ -22,7 +22,7 @@ cw20 = "0.8.0"
|
||||||
cw20-base = { version = "0.8.0", features = ["library"] }
|
cw20-base = { version = "0.8.0", features = ["library"] }
|
||||||
cw20-wrapped = { path = "../cw20-wrapped", features = ["library"] }
|
cw20-wrapped = { path = "../cw20-wrapped", features = ["library"] }
|
||||||
terraswap = "2.4.0"
|
terraswap = "2.4.0"
|
||||||
wormhole = { path = "../wormhole", features = ["library"] }
|
wormhole-bridge-terra = { path = "../wormhole", features = ["library"] }
|
||||||
thiserror = { version = "1.0.20" }
|
thiserror = { version = "1.0.20" }
|
||||||
k256 = { version = "0.9.4", default-features = false, features = ["ecdsa"] }
|
k256 = { version = "0.9.4", default-features = false, features = ["ecdsa"] }
|
||||||
sha3 = { version = "0.9.1", default-features = false }
|
sha3 = { version = "0.9.1", default-features = false }
|
||||||
|
|
|
@ -6,7 +6,7 @@ edition = "2018"
|
||||||
description = "Wormhole contract"
|
description = "Wormhole contract"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "bridge"
|
name = "wormhole"
|
||||||
crate-type = ["cdylib", "rlib"]
|
crate-type = ["cdylib", "rlib"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|
Loading…
Reference in New Issue