Skip to content

Commit

Permalink
change default for unwrap native to true
Browse files Browse the repository at this point in the history
  • Loading branch information
barnjamin committed Jan 2, 2024
1 parent 8f7607b commit 46b01d5
Show file tree
Hide file tree
Showing 25 changed files with 158 additions and 385 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.0-beta.8
0.3.0-beta.9
6 changes: 3 additions & 3 deletions connect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wormhole-foundation/connect-sdk",
"version": "0.3.0-beta.8",
"version": "0.3.0-beta.9",
"repository": {
"type": "git",
"url": "git+https://github.com/wormhole-foundation/connect-sdk.git"
Expand Down Expand Up @@ -45,7 +45,7 @@
},
"dependencies": {
"axios": "^1.4.0",
"@wormhole-foundation/sdk-base": "^0.3.0-beta.8",
"@wormhole-foundation/sdk-definitions": "^0.3.0-beta.8"
"@wormhole-foundation/sdk-base": "^0.3.0-beta.9",
"@wormhole-foundation/sdk-definitions": "^0.3.0-beta.9"
}
}
2 changes: 1 addition & 1 deletion core/base/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wormhole-foundation/sdk-base",
"version": "0.3.0-beta.8",
"version": "0.3.0-beta.9",
"repository": {
"type": "git",
"url": "git+https://github.com/wormhole-foundation/connect-sdk.git"
Expand Down
4 changes: 2 additions & 2 deletions core/definitions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wormhole-foundation/sdk-definitions",
"version": "0.3.0-beta.8",
"version": "0.3.0-beta.9",
"repository": {
"type": "git",
"url": "git+https://github.com/wormhole-foundation/connect-sdk.git"
Expand Down Expand Up @@ -30,6 +30,6 @@
},
"dependencies": {
"@noble/hashes": "^1.3.1",
"@wormhole-foundation/sdk-base": "^0.3.0-beta.8"
"@wormhole-foundation/sdk-base": "^0.3.0-beta.9"
}
}
28 changes: 14 additions & 14 deletions examples/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wormhole-foundation/connect-sdk-examples",
"version": "0.3.0-beta.8",
"version": "0.3.0-beta.9",
"repository": {
"type": "git",
"url": "git+https://github.com/wormhole-foundation/connect-sdk.git"
Expand Down Expand Up @@ -52,18 +52,18 @@
"algosdk": "^2.7.0"
},
"dependencies": {
"@wormhole-foundation/connect-sdk": "^0.3.0-beta.8",
"@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.8",
"@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.8",
"@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.8",
"@wormhole-foundation/connect-sdk-evm-core": "^0.3.0-beta.8",
"@wormhole-foundation/connect-sdk-solana-core": "^0.3.0-beta.8",
"@wormhole-foundation/connect-sdk-cosmwasm-core": "^0.3.0-beta.8",
"@wormhole-foundation/connect-sdk-evm-tokenbridge": "^0.3.0-beta.8",
"@wormhole-foundation/connect-sdk-solana-tokenbridge": "^0.3.0-beta.8",
"@wormhole-foundation/connect-sdk-cosmwasm-tokenbridge": "^0.3.0-beta.8",
"@wormhole-foundation/connect-sdk-evm-cctp": "^0.3.0-beta.8",
"@wormhole-foundation/connect-sdk-solana-cctp": "^0.3.0-beta.8",
"@wormhole-foundation/connect-sdk-cosmwasm-ibc": "^0.3.0-beta.8"
"@wormhole-foundation/connect-sdk": "^0.3.0-beta.9",
"@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.9",
"@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.9",
"@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.9",
"@wormhole-foundation/connect-sdk-evm-core": "^0.3.0-beta.9",
"@wormhole-foundation/connect-sdk-solana-core": "^0.3.0-beta.9",
"@wormhole-foundation/connect-sdk-cosmwasm-core": "^0.3.0-beta.9",
"@wormhole-foundation/connect-sdk-evm-tokenbridge": "^0.3.0-beta.9",
"@wormhole-foundation/connect-sdk-solana-tokenbridge": "^0.3.0-beta.9",
"@wormhole-foundation/connect-sdk-cosmwasm-tokenbridge": "^0.3.0-beta.9",
"@wormhole-foundation/connect-sdk-evm-cctp": "^0.3.0-beta.9",
"@wormhole-foundation/connect-sdk-solana-cctp": "^0.3.0-beta.9",
"@wormhole-foundation/connect-sdk-cosmwasm-ibc": "^0.3.0-beta.9"
}
}
232 changes: 0 additions & 232 deletions examples/src/multiTokenBridge.ts

This file was deleted.

13 changes: 8 additions & 5 deletions examples/src/tokenBridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,27 @@ import "@wormhole-foundation/connect-sdk-algorand-tokenbridge";

// Grab chain Contexts -- these hold a reference to a cached rpc client
const sendChain = wh.getChain("Avalanche");
const rcvChain = wh.getChain("Algorand");
const rcvChain = wh.getChain("Solana");

// Shortcut to allow transferring native gas token
// const token: TokenId | "native" = "native";
//const token: TokenId | "native" = "native";

// A TokenId is just a `{chain, address}` pair and an alias for ChainAddress
// The `address` field must be a parsed address.
// You can get a TokenId (or ChainAddress) prepared for you
// by calling the static `chainAddress` method on the Wormhole class.
// e.g.
// const token = Wormhole.chainAddress("Solana", "9rU2jFrzA5zDDmt9yR7vEABvXCUNJ1YgGigdTb9oCaTv");
const token = Wormhole.chainAddress("Avalanche", "0x3bE4bce46442F5E85c47257145578E724E40cF97");
// wAvax on Solana
// const token = Wormhole.chainAddress("Solana", "3Ftc5hTz9sG4huk79onufGiebJNDMZNL8HYgdMJ9E7JR");

// wSol on Avax
const token = Wormhole.chainAddress("Avalanche", "0xb10563644a6AB8948ee6d7f5b0a1fb15AaEa1E03");

// Normalized given token decimals later but can just pass bigints as base units
// Note: The Token bridge will dedust past 8 decimals
// this means any amount specified past that point will be returned
// to the caller
const amount = "0.0001";
const amount = "0.001";

// With automatic set to true, perform an automatic transfer. This will invoke a relayer
// contract intermediary that knows to pick up the transfers
Expand Down
Loading

0 comments on commit 46b01d5

Please sign in to comment.