Cosmwasm package naming updates (#2641)
* sdk: update wormhole-core to wormhole-sdk and fix lib name to be wormhole_sdk * cosmwasm: update wormhole and token bridge cosmwasm package/lib names * Fix terra2 deployment script with new artifact names
This commit is contained in:
parent
c8e18ba72c
commit
d7b6be7358
|
@ -859,7 +859,7 @@ dependencies = [
|
|||
"thiserror",
|
||||
"tinyvec",
|
||||
"wormhole-bindings",
|
||||
"wormhole-core",
|
||||
"wormhole-sdk",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1100,8 +1100,8 @@ dependencies = [
|
|||
"schemars",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"token-bridge-terra-2",
|
||||
"wormhole-bridge-terra-2",
|
||||
"token-bridge-cosmwasm",
|
||||
"wormhole-cosmwasm",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1595,14 +1595,14 @@ dependencies = [
|
|||
name = "shutdown-core-bridge-cosmwasm"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"wormhole-bridge-terra-2",
|
||||
"wormhole-cosmwasm",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "shutdown-token-bridge-cosmwasm"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"token-bridge-terra-2",
|
||||
"token-bridge-cosmwasm",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1731,7 +1731,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
|
||||
|
||||
[[package]]
|
||||
name = "token-bridge-terra-2"
|
||||
name = "token-bridge-cosmwasm"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cosmwasm-std",
|
||||
|
@ -1745,7 +1745,7 @@ dependencies = [
|
|||
"sha3 0.9.1",
|
||||
"terraswap",
|
||||
"thiserror",
|
||||
"wormhole-bridge-terra-2",
|
||||
"wormhole-cosmwasm",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2146,11 +2146,11 @@ dependencies = [
|
|||
"schemars",
|
||||
"serde",
|
||||
"serde_wormhole",
|
||||
"wormhole-core",
|
||||
"wormhole-sdk",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wormhole-bridge-terra-2"
|
||||
name = "wormhole-cosmwasm"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cosmwasm-std",
|
||||
|
@ -2165,7 +2165,7 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "wormhole-core"
|
||||
name = "wormhole-sdk"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
|
|
|
@ -32,8 +32,8 @@ accountant = { path = "packages/accountant" }
|
|||
cw_transcode = { path = "packages/cw_transcode" }
|
||||
cw20-wrapped-2 = { path = "contracts/cw20-wrapped" }
|
||||
serde_wormhole = { path = "../sdk/rust/serde_wormhole" }
|
||||
token-bridge-terra-2 = { path = "contracts/token-bridge" }
|
||||
token-bridge-cosmwasm = { path = "contracts/token-bridge" }
|
||||
global-accountant = { path = "contracts/global-accountant" }
|
||||
wormhole-bindings = { path = "packages/wormhole-bindings" }
|
||||
wormhole-bridge-terra-2 = { path = "contracts/wormhole" }
|
||||
wormhole-core = { path = "../sdk/rust/core" }
|
||||
wormhole-cosmwasm = { path = "contracts/wormhole" }
|
||||
wormhole-sdk = { path = "../sdk/rust/core" }
|
||||
|
|
|
@ -28,7 +28,7 @@ serde_wormhole = "0.1.0"
|
|||
thiserror = { version = "1.0.31" }
|
||||
tinyvec = { version = "1.6", default-features = false, features = ["alloc", "serde"]}
|
||||
wormhole-bindings = "0.1.0"
|
||||
wormhole-core = { version = "0.1.0", features = ["schemars"] }
|
||||
wormhole-sdk = { version = "0.1.0", features = ["schemars"] }
|
||||
|
||||
[dev-dependencies]
|
||||
anyhow = { version = "1", features = ["backtrace"] }
|
||||
|
|
|
@ -16,12 +16,12 @@ use cw2::set_contract_version;
|
|||
use cw_storage_plus::Bound;
|
||||
use serde_wormhole::RawMessage;
|
||||
use tinyvec::{Array, TinyVec};
|
||||
use wormhole::{
|
||||
use wormhole_bindings::WormholeQuery;
|
||||
use wormhole_sdk::{
|
||||
accountant as accountant_module, token,
|
||||
vaa::{self, Body, Header, Signature},
|
||||
Chain,
|
||||
};
|
||||
use wormhole_bindings::WormholeQuery;
|
||||
|
||||
use crate::{
|
||||
bail,
|
||||
|
@ -332,7 +332,7 @@ fn handle_vaa(
|
|||
|
||||
// We may also accept governance messages from wormchain in the future
|
||||
let mut evt = if body.emitter_chain == Chain::Solana
|
||||
&& body.emitter_address == wormhole::GOVERNANCE_EMITTER
|
||||
&& body.emitter_address == wormhole_sdk::GOVERNANCE_EMITTER
|
||||
{
|
||||
if body.payload.len() < 32 {
|
||||
bail!("governance module missing");
|
||||
|
|
|
@ -3,7 +3,7 @@ use std::ops::{Deref, DerefMut};
|
|||
use anyhow::anyhow;
|
||||
use cosmwasm_std::StdError;
|
||||
use thiserror::Error;
|
||||
use wormhole::Chain;
|
||||
use wormhole_sdk::Chain;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum ContractError {
|
||||
|
|
|
@ -2,7 +2,7 @@ use accountant::state::{account, transfer, Account, Modification, Transfer};
|
|||
use cosmwasm_schema::{cw_serde, QueryResponses};
|
||||
use cosmwasm_std::Binary;
|
||||
use serde_wormhole::RawMessage;
|
||||
use wormhole::{
|
||||
use wormhole_sdk::{
|
||||
vaa::{Body, Signature},
|
||||
Address,
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@ mod helpers;
|
|||
use cosmwasm_std::{to_binary, Event};
|
||||
use global_accountant::msg::ChainRegistrationResponse;
|
||||
use helpers::*;
|
||||
use wormhole::{
|
||||
use wormhole_sdk::{
|
||||
token::{Action, GovernancePacket},
|
||||
vaa::Body,
|
||||
Address, Chain,
|
||||
|
@ -14,7 +14,7 @@ fn create_vaa_body() -> Body<GovernancePacket> {
|
|||
timestamp: 1,
|
||||
nonce: 1,
|
||||
emitter_chain: Chain::Solana,
|
||||
emitter_address: wormhole::GOVERNANCE_EMITTER,
|
||||
emitter_address: wormhole_sdk::GOVERNANCE_EMITTER,
|
||||
sequence: 15920283,
|
||||
consistency_level: 0,
|
||||
payload: GovernancePacket {
|
||||
|
|
|
@ -18,13 +18,13 @@ use global_accountant::{
|
|||
state,
|
||||
};
|
||||
use serde::Serialize;
|
||||
use wormhole::{
|
||||
use wormhole_bindings::{fake, WormholeQuery};
|
||||
use wormhole_sdk::{
|
||||
accountant::{self as accountant_module, ModificationKind},
|
||||
token,
|
||||
vaa::{Body, Header, Signature},
|
||||
Address, Amount, Chain, Vaa,
|
||||
};
|
||||
use wormhole_bindings::{fake, WormholeQuery};
|
||||
|
||||
#[cw_serde]
|
||||
pub struct TransferResponse {
|
||||
|
@ -94,7 +94,7 @@ impl Contract {
|
|||
timestamp: self.sequence as u32,
|
||||
nonce: self.sequence as u32,
|
||||
emitter_chain: Chain::Solana,
|
||||
emitter_address: wormhole::GOVERNANCE_EMITTER,
|
||||
emitter_address: wormhole_sdk::GOVERNANCE_EMITTER,
|
||||
sequence: self.sequence,
|
||||
consistency_level: 0,
|
||||
payload: accountant_module::GovernancePacket {
|
||||
|
@ -364,7 +364,7 @@ pub fn register_emitters(wh: &fake::WormholeKeeper, contract: &mut Contract, cou
|
|||
timestamp: i as u32,
|
||||
nonce: i as u32,
|
||||
emitter_chain: Chain::Solana,
|
||||
emitter_address: wormhole::GOVERNANCE_EMITTER,
|
||||
emitter_address: wormhole_sdk::GOVERNANCE_EMITTER,
|
||||
sequence: i as u64,
|
||||
consistency_level: 0,
|
||||
payload: token::GovernancePacket {
|
||||
|
|
|
@ -4,7 +4,7 @@ use accountant::state::transfer;
|
|||
use cosmwasm_std::{to_binary, Uint256};
|
||||
use global_accountant::msg::Observation;
|
||||
use helpers::*;
|
||||
use wormhole::{token::Message, Address, Amount, Chain};
|
||||
use wormhole_sdk::{token::Message, Address, Amount, Chain};
|
||||
|
||||
fn create_observation() -> Observation {
|
||||
let msg: Message = Message::Transfer {
|
||||
|
|
|
@ -9,8 +9,8 @@ use accountant::state::{
|
|||
use cosmwasm_std::Uint256;
|
||||
use global_accountant::msg::TransferStatus;
|
||||
use helpers::*;
|
||||
use wormhole::{token::Message, vaa::Body, Address, Amount};
|
||||
use wormhole_bindings::fake;
|
||||
use wormhole_sdk::{token::Message, vaa::Body, Address, Amount};
|
||||
|
||||
fn create_accounts(wh: &fake::WormholeKeeper, contract: &mut Contract, count: usize) {
|
||||
let mut s = 0;
|
||||
|
|
|
@ -7,12 +7,12 @@ use cosmwasm_std::{from_binary, to_binary, Binary, Event, Uint256};
|
|||
use cw_multi_test::AppResponse;
|
||||
use global_accountant::msg::{Observation, ObservationStatus, SubmitObservationResponse};
|
||||
use helpers::*;
|
||||
use wormhole::{
|
||||
use wormhole_bindings::fake;
|
||||
use wormhole_sdk::{
|
||||
token::Message,
|
||||
vaa::{Body, Header},
|
||||
Address, Amount,
|
||||
};
|
||||
use wormhole_bindings::fake;
|
||||
|
||||
fn set_up(count: usize) -> (Vec<Message>, Vec<Observation>) {
|
||||
let mut txs = Vec::with_capacity(count);
|
||||
|
|
|
@ -5,12 +5,12 @@ use cosmwasm_std::{from_binary, to_binary, Binary, Event, Uint256};
|
|||
use global_accountant::msg::{Observation, ObservationStatus, SubmitObservationResponse};
|
||||
use helpers::*;
|
||||
use serde_wormhole::RawMessage;
|
||||
use wormhole::{
|
||||
use wormhole_bindings::fake::WormholeKeeper;
|
||||
use wormhole_sdk::{
|
||||
token::Message,
|
||||
vaa::{Body, Header, Vaa},
|
||||
Address, Amount, Chain,
|
||||
};
|
||||
use wormhole_bindings::fake::WormholeKeeper;
|
||||
|
||||
fn create_transfer_vaas(wh: &WormholeKeeper, count: usize) -> (Vec<Vaa<Message>>, Vec<Binary>) {
|
||||
let mut vaas = Vec::with_capacity(count);
|
||||
|
|
|
@ -18,8 +18,8 @@ cosmwasm-storage = { version = "1.0.0" }
|
|||
schemars = "0.8.8"
|
||||
serde = { version = "1.0.137", default-features = false, features = ["derive"] }
|
||||
|
||||
wormhole-bridge-terra-2 = { version = "0.1.0", features = ["library"] }
|
||||
token-bridge-terra-2 = { version = "0.1.0", features = ["library"] }
|
||||
wormhole-cosmwasm = { version = "0.1.0", features = ["library"] }
|
||||
token-bridge-cosmwasm = { version = "0.1.0", features = ["library"] }
|
||||
|
||||
[dev-dependencies]
|
||||
cosmwasm-vm = { version = "1.0.0", default-features = false }
|
||||
|
|
|
@ -8,7 +8,7 @@ use crate::{
|
|||
state::{config, config_read, Config},
|
||||
};
|
||||
|
||||
use token_bridge_terra_2::{
|
||||
use cw_token_bridge::{
|
||||
msg::TransferInfoResponse,
|
||||
msg::{ExecuteMsg as TokenBridgeExecuteMsg, QueryMsg as TokenBridgeQueryMessage},
|
||||
};
|
||||
|
|
|
@ -9,4 +9,4 @@ description = "Shutdown Wormhole token bridge on cosmwasm"
|
|||
crate-type = ["cdylib", "rlib"]
|
||||
|
||||
[dependencies]
|
||||
token-bridge-terra-2 = { version = "0.1.0", default-features = false }
|
||||
token-bridge-cosmwasm = { version = "0.1.0", default-features = false }
|
||||
|
|
|
@ -1 +1 @@
|
|||
pub use token_bridge_terra_2::contract;
|
||||
pub use cw_token_bridge::contract;
|
||||
|
|
|
@ -9,4 +9,4 @@ description = "Shutdown Wormhole core bridge on cosmwasm"
|
|||
crate-type = ["cdylib", "rlib"]
|
||||
|
||||
[dependencies]
|
||||
wormhole-bridge-terra-2 = { version = "0.1.0", default-features = false }
|
||||
wormhole-cosmwasm = { version = "0.1.0", default-features = false }
|
||||
|
|
|
@ -1 +1 @@
|
|||
pub use wormhole::contract;
|
||||
pub use cw_wormhole::contract;
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
[package]
|
||||
name = "token-bridge-terra-2"
|
||||
name = "token-bridge-cosmwasm"
|
||||
version = "0.1.0"
|
||||
authors = ["Yuriy Savchenko <yuriy.savchenko@gmail.com>"]
|
||||
edition = "2018"
|
||||
description = "Wormhole token bridge"
|
||||
|
||||
[lib]
|
||||
name = "cw_token_bridge"
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
|
||||
[features]
|
||||
|
@ -14,7 +15,7 @@ backtraces = ["cosmwasm-std/backtraces"]
|
|||
library = []
|
||||
# The 'full' feature enables all non-shutdown functionality. Without the 'full' feature
|
||||
# enabled, only shutdown functionality is enabled (basically governance).
|
||||
full = ["wormhole-bridge-terra-2/full"]
|
||||
full = ["wormhole-cosmwasm/full"]
|
||||
default = ["full"]
|
||||
|
||||
[dependencies]
|
||||
|
@ -26,7 +27,7 @@ cw20 = "0.13.2"
|
|||
cw20-base = { version = "0.13.2", features = ["library"] }
|
||||
cw20-wrapped-2 = { version = "0.1.0", features = ["library"] }
|
||||
terraswap = "2.6.1"
|
||||
wormhole-bridge-terra-2 = { version = "0.1.0", default-features = false, features = ["library"] }
|
||||
wormhole-cosmwasm = { version = "0.1.0", default-features = false, features = ["library"] }
|
||||
thiserror = { version = "1.0.31" }
|
||||
sha3 = { version = "0.9.1", default-features = false }
|
||||
hex = "0.4.2"
|
||||
|
|
|
@ -10,7 +10,7 @@ use std::{
|
|||
};
|
||||
use terraswap::asset::{Asset, AssetInfo};
|
||||
|
||||
use wormhole::{
|
||||
use cw_wormhole::{
|
||||
byte_utils::{
|
||||
extend_address_to_32, extend_address_to_32_array, extend_string_to_32, get_string_from_32,
|
||||
ByteUtils,
|
||||
|
|
|
@ -7,7 +7,7 @@ use cosmwasm_storage::{
|
|||
Singleton,
|
||||
};
|
||||
|
||||
use wormhole::byte_utils::ByteUtils;
|
||||
use cw_wormhole::byte_utils::ByteUtils;
|
||||
|
||||
use crate::token_address::{ExternalTokenId, WrappedCW20};
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::convert::TryInto;
|
|||
|
||||
use cosmwasm_std::{Binary, StdResult};
|
||||
|
||||
use wormhole::state::ParsedVAA;
|
||||
use cw_wormhole::state::ParsedVAA;
|
||||
|
||||
use crate::{
|
||||
state::{Action, TokenBridgeMessage, TransferInfo, TransferWithPayloadInfo},
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
[package]
|
||||
name = "wormhole-bridge-terra-2"
|
||||
name = "wormhole-cosmwasm"
|
||||
version = "0.1.0"
|
||||
authors = ["Yuriy Savchenko <yuriy.savchenko@gmail.com>"]
|
||||
edition = "2018"
|
||||
description = "Wormhole contract"
|
||||
|
||||
[lib]
|
||||
name = "wormhole"
|
||||
name = "cw_wormhole"
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
|
||||
[features]
|
||||
|
|
|
@ -5,7 +5,7 @@ use cosmwasm_std::{
|
|||
};
|
||||
use cosmwasm_storage::to_length_prefixed;
|
||||
|
||||
use wormhole::{
|
||||
use cw_wormhole::{
|
||||
contract::instantiate,
|
||||
msg::InstantiateMsg,
|
||||
state::{ConfigInfo, GuardianAddress, GuardianSetInfo, CONFIG_KEY},
|
||||
|
|
|
@ -88,8 +88,8 @@ For each contract you wish to verify on-chain, you will need the following eleme
|
|||
Below is how to verify all three contracts:
|
||||
|
||||
```console
|
||||
./verify artifacts/wormhole.wasm NEW_BRIDGE_CODE_ID
|
||||
./verify artifacts/token_bridge.wasm NEW_TOKEN_BRIDGE_CODE_ID
|
||||
./verify artifacts/cw_wormhole.wasm NEW_BRIDGE_CODE_ID
|
||||
./verify artifacts/cw_token_bridge.wasm NEW_TOKEN_BRIDGE_CODE_ID
|
||||
./verify artifacts/nft_bridge.wasm NEW_NFT_BRIDGE_CODE_ID
|
||||
```
|
||||
|
||||
|
|
|
@ -54,11 +54,11 @@ const CONSISTENCY_LEVEL = 0;
|
|||
|
||||
const CHAIN_ID = 18;
|
||||
|
||||
const WASM_WORMHOLE = "../artifacts/wormhole.wasm";
|
||||
const WASM_WORMHOLE = "../artifacts/cw_wormhole.wasm";
|
||||
const WASM_SHUTDOWN_WORMHOLE =
|
||||
"../artifacts/shutdown_core_bridge_cosmwasm.wasm";
|
||||
const WASM_WRAPPED_ASSET = "../artifacts/cw20_wrapped_2.wasm";
|
||||
const WASM_TOKEN_BRIDGE = "../artifacts/token_bridge_terra_2.wasm";
|
||||
const WASM_TOKEN_BRIDGE = "../artifacts/cw_token_bridge.wasm";
|
||||
const WASM_SHUTDOWN_TOKEN_BRIDGE =
|
||||
"../artifacts/shutdown_token_bridge_cosmwasm.wasm";
|
||||
const WASM_MOCK_BRIDGE_INTEGRATION =
|
||||
|
|
|
@ -15,8 +15,8 @@ import { zeroPad } from "ethers/lib/utils.js";
|
|||
deterministic.
|
||||
*/
|
||||
const artifacts = [
|
||||
"wormhole.wasm",
|
||||
"token_bridge_terra_2.wasm",
|
||||
"cw_wormhole.wasm",
|
||||
"cw_token_bridge.wasm",
|
||||
"cw20_wrapped_2.wasm",
|
||||
"cw20_base.wasm",
|
||||
"mock_bridge_integration_2.wasm",
|
||||
|
@ -154,8 +154,8 @@ if (!init_guardians || init_guardians.length === 0) {
|
|||
throw "failed to get initial guardians from .env file.";
|
||||
}
|
||||
|
||||
addresses["wormhole.wasm"] = await instantiate(
|
||||
"wormhole.wasm",
|
||||
addresses["cw_wormhole.wasm"] = await instantiate(
|
||||
"cw_wormhole.wasm",
|
||||
{
|
||||
gov_chain: govChain,
|
||||
gov_address: Buffer.from(govAddress, "hex").toString("base64"),
|
||||
|
@ -174,12 +174,12 @@ addresses["wormhole.wasm"] = await instantiate(
|
|||
"wormhole"
|
||||
);
|
||||
|
||||
addresses["token_bridge_terra_2.wasm"] = await instantiate(
|
||||
"token_bridge_terra_2.wasm",
|
||||
addresses["cw_token_bridge.wasm"] = await instantiate(
|
||||
"cw_token_bridge.wasm",
|
||||
{
|
||||
gov_chain: govChain,
|
||||
gov_address: Buffer.from(govAddress, "hex").toString("base64"),
|
||||
wormhole_contract: addresses["wormhole.wasm"],
|
||||
wormhole_contract: addresses["cw_wormhole.wasm"],
|
||||
wrapped_asset_code_id: codeIds["cw20_wrapped_2.wasm"],
|
||||
chain_id: 18,
|
||||
native_denom: "uluna",
|
||||
|
@ -209,7 +209,7 @@ addresses["mock.wasm"] = await instantiate(
|
|||
/* Registrations: tell the bridge contracts to know about each other */
|
||||
|
||||
const contract_registrations = {
|
||||
"token_bridge_terra_2.wasm": [
|
||||
"cw_token_bridge.wasm": [
|
||||
// Solana
|
||||
process.env.REGISTER_SOL_TOKEN_BRIDGE_VAA,
|
||||
// Ethereum
|
||||
|
|
|
@ -39,8 +39,8 @@ console.log("Deploying to " + NETWORK + " at URL " + LCD_URL + ", chainId " + CH
|
|||
deterministic.
|
||||
*/
|
||||
const artifacts = [
|
||||
"wormhole.wasm",
|
||||
"token_bridge_terra_2.wasm",
|
||||
"cw_wormhole.wasm",
|
||||
"cw_token_bridge.wasm",
|
||||
"cw20_wrapped_2.wasm",
|
||||
// Decided not to deploy these as of 10/10/2022:
|
||||
// "shutdown_core_bridge_cosmwasm.wasm",
|
||||
|
@ -170,8 +170,8 @@ async function instantiate(contract, inst_msg, label) {
|
|||
|
||||
const addresses = {};
|
||||
|
||||
addresses["wormhole.wasm"] = await instantiate(
|
||||
"wormhole.wasm",
|
||||
addresses["cw_wormhole.wasm"] = await instantiate(
|
||||
"cw_wormhole.wasm",
|
||||
{
|
||||
gov_chain: govChain,
|
||||
gov_address: Buffer.from(govAddress, "hex").toString("base64"),
|
||||
|
@ -190,12 +190,12 @@ addresses["wormhole.wasm"] = await instantiate(
|
|||
"wormhole"
|
||||
);
|
||||
|
||||
addresses["token_bridge_terra_2.wasm"] = await instantiate(
|
||||
"token_bridge_terra_2.wasm",
|
||||
addresses["cw_token_bridge.wasm"] = await instantiate(
|
||||
"cw_token_bridge.wasm",
|
||||
{
|
||||
gov_chain: govChain,
|
||||
gov_address: Buffer.from(govAddress, "hex").toString("base64"),
|
||||
wormhole_contract: addresses["wormhole.wasm"],
|
||||
wormhole_contract: addresses["cw_wormhole.wasm"],
|
||||
wrapped_asset_code_id: codeIds["cw20_wrapped_2.wasm"],
|
||||
chain_id: 28,
|
||||
native_denom: "axpla",
|
||||
|
@ -270,7 +270,7 @@ function sleep(ms) {
|
|||
}
|
||||
|
||||
const contract_registrations = {
|
||||
"token_bridge_terra_2.wasm": [
|
||||
"cw_token_bridge.wasm": [
|
||||
// Solana
|
||||
"01000000020d0005d041155878a79b0c8b48aaf3a6266d85a808df5658de5c77715802ba2e38b54374a5a244b43c1a4129d31b47192cb80a565484e55f171c00df69be3107e32e0001fc342ba5227e2319c36fe7771d4626753960b5f6082770e57120b5057eb56c5066bab012670d532c259f6162f311458e187d7137298fa984a41d469df817f88f010349b730282809e94fdeb125dd30490e116ee6ebffa73296eb10a36848351a12c77e846daa5f6eeb83103a2d7325d7981fa4cae43fb84a91851c400c2573abaad30005ac798fcaddd7090a41b718f5786f02436f30d631e64ac46ccd058e87dabcf20f03dd4c7ca0e71d2bbd9c0cee90809a5cdd0bc72519abb9313a4d81763b48c79c01061cdc7c59590231f6f580c3b002ddfa5f41bd0118c67fcb4cb295ae239b74d0e322775d1e78c252eb605230e040c5af176e9ec5ab5f34dd36fcb202c894b6e4fa00087621ef01365e4d1f2e81ef9ce46f0d620cbf003ded06956df3e87a137640310037e8d605f9208a5e17719001fa662d2dcee1c500f0db1ec99119dd326140cf240109a406c0fffda03ffc741ac06743bc507d2a5bdb95eb1c6e3d24a41d99281ce9af20881add8926faec5ac33d3bf85c61a220dd0f699d713f4a453f18b2ad735b6b010a42fb4729a41b99029d06fc6395e1f676654002a28e08c073fe905e87883726b444aa70742c6c53ee8efdb004e756fae63bfe9a91d20971853cc0a8677ec1b0da000bf472a82642b1a3c7872a6594786fc803c8ed8948719f85d1ecfbf903deaba8505b02ffaa488b09e066a0d7210d8ee0871dd10d23b4249c942c64bd79a08d5f6f010c308bc162680851b2a94a888e068394bf4dcb5d5afab1faa350bb086884c20a535366302c37220db24cf6bf2de5abb904f1ffbb13afa624f0d413049b1cb034bb010df076e04e691e924bc9b4e855cc87ef67c237455e1cc3c96d5325c45f5c6002eb68740692e35a49a9e5147d30e796b184df6e7fc0633aa8286fabce5a1f99f0a00011d9cc70d9239887c638aa5f28f268e1c9993d34b0d33550ec373acd921d461eab31cdf77fb7c08f999d4ea7f32f48396dc1d0c3cb77beffb58e3ab5f57333a4b00012d64e7e0459fad8067a73e7fd0cc5b97e6794b5761db7b3b7d15858843ac044d112d2fa713d9c29d1c79f73434e2af1cd965c93aac3502b0f368652266d09d34200000000003681da22000100000000000000000000000000000000000000000000000000000000000000040d9c82f1591753eb20000000000000000000000000000000000000000000546f6b656e4272696467650100000001ec7372995d5cc8732397fb0ad35c0121e0eaa90d26f828a534cab54391b3a4f5",
|
||||
// Ethereum
|
||||
|
|
|
@ -16,4 +16,4 @@ serde = { version = "1.0.137", default-features = false, features = ["derive"] }
|
|||
serde_wormhole = { version = "0.1.0", optional = true }
|
||||
cw-multi-test = { version = "0.13.2", optional = true }
|
||||
k256 = { version = "0.11", optional = true, features = ["ecdsa", "keccak256"] }
|
||||
wormhole-core = "0.1.0"
|
||||
wormhole-sdk = "0.1.0"
|
||||
|
|
|
@ -7,7 +7,7 @@ use k256::ecdsa::{recoverable, signature::Signer, SigningKey};
|
|||
use schemars::JsonSchema;
|
||||
use serde::de::DeserializeOwned;
|
||||
use serde_wormhole::RawMessage;
|
||||
use wormhole::vaa::{digest, Header, Signature};
|
||||
use wormhole_sdk::vaa::{digest, Header, Signature};
|
||||
|
||||
use crate::WormholeQuery;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use cosmwasm_schema::{cw_serde, QueryResponses};
|
||||
use cosmwasm_std::{Binary, CustomQuery, Empty};
|
||||
use wormhole::vaa::Signature;
|
||||
use wormhole_sdk::vaa::Signature;
|
||||
|
||||
#[cw_serde]
|
||||
#[derive(QueryResponses)]
|
||||
|
|
|
@ -284,7 +284,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
||||
|
||||
[[package]]
|
||||
name = "wormhole-core"
|
||||
name = "wormhole-sdk"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[package]
|
||||
name = "wormhole-core"
|
||||
name = "wormhole-sdk"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
name = "wormhole"
|
||||
name = "wormhole_sdk"
|
||||
|
||||
[features]
|
||||
schemars = ["dep:schemars"]
|
||||
|
|
|
@ -75,7 +75,7 @@ pub enum Message<P = Box<RawMessage>> {
|
|||
///
|
||||
/// ```
|
||||
/// # fn example() -> anyhow::Result<()> {
|
||||
/// # use wormhole::{Address, Amount, Chain, vaa::Signature, GOVERNANCE_EMITTER};
|
||||
/// # use wormhole_sdk::{Address, Amount, Chain, vaa::Signature, GOVERNANCE_EMITTER};
|
||||
/// #
|
||||
/// # let data = [
|
||||
/// # 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xb0, 0x72, 0x50, 0x5b, 0x5b, 0x99, 0x9c, 0x1d,
|
||||
|
@ -102,7 +102,7 @@ pub enum Message<P = Box<RawMessage>> {
|
|||
/// # 0xad, 0x0f, 0x4b, 0xc9, 0x17, 0x1e, 0x91, 0x25, 0x11,
|
||||
/// # ];
|
||||
/// use serde_wormhole::RawMessage;
|
||||
/// use wormhole::{token::Message, Vaa};
|
||||
/// use wormhole_sdk::{token::Message, Vaa};
|
||||
///
|
||||
/// let msg = serde_wormhole::from_slice::<Vaa<Message<&RawMessage>>>(&data)?;
|
||||
/// match msg.payload {
|
||||
|
@ -127,7 +127,7 @@ pub enum Message<P = Box<RawMessage>> {
|
|||
/// ```
|
||||
/// # fn example() -> anyhow::Result<()> {
|
||||
/// # use serde_wormhole::RawMessage;
|
||||
/// # use wormhole::{Address, Amount, Chain, vaa::Signature, GOVERNANCE_EMITTER};
|
||||
/// # use wormhole_sdk::{Address, Amount, Chain, vaa::Signature, GOVERNANCE_EMITTER};
|
||||
/// # let tx_payload = [
|
||||
/// # 0x93, 0xd7, 0xc0, 0x9e, 0xe8, 0x87, 0xae, 0x16, 0xbf, 0xfa, 0x5e, 0x70, 0xea, 0x36, 0xa2,
|
||||
/// # 0x82, 0x37, 0x1d, 0x46, 0x81, 0x94, 0x10, 0x34, 0xb1, 0xad, 0x0f, 0x4b, 0xc9,
|
||||
|
@ -156,7 +156,7 @@ pub enum Message<P = Box<RawMessage>> {
|
|||
/// #
|
||||
/// # let data = serde_json::to_vec(&vaa)?;
|
||||
/// use anyhow::anyhow;
|
||||
/// use wormhole::{token::Message, Vaa};
|
||||
/// use wormhole_sdk::{token::Message, Vaa};
|
||||
///
|
||||
/// let msg = serde_json::from_slice::<Vaa<Message>>(&data)?;
|
||||
/// # assert_eq!(vaa, msg);
|
||||
|
|
Loading…
Reference in New Issue