feat: bridge

This commit is contained in:
bartosz-lipinski 2021-03-20 18:41:24 -05:00
parent bb27547446
commit 3f2ced7ef4
5 changed files with 8 additions and 26 deletions

View File

@ -160,13 +160,17 @@ export const useCurrencyLeg = (mintAddress: string) => {
const bridgeId = programIds().wormhole.pubkey;
const bridgeAuthority = await bridgeAuthorityKey(bridgeId);
wrappedAssetMintKey(bridgeId, bridgeAuthority, {
const mint = await wrappedAssetMintKey(bridgeId, bridgeAuthority, {
decimals: Math.min(9, info.decimals),
address: info.assetAddress,
chain: info.chainID
})
});
console.log(mint.toBase58());
}
console.log(info);
setInfo(info);
}

View File

@ -1,7 +1,5 @@
import * as BufferLayout from 'buffer-layout';
/// ForeignAddress u8 - 32
// 420
export const GuardianSetLayout: typeof BufferLayout.Structure = BufferLayout.struct(
[

View File

@ -1,15 +1,6 @@
// 1340 - SigState - (VerifySignatures - parameter 4)
// export const NOP = 0;
// pub struct SignatureState {
// /// signatures of validators
// pub signatures: [[u8; 65]; MAX_LEN_GUARDIAN_KEYS],
// /// hash of the data
// pub hash: [u8; 32],
// }
import * as BufferLayout from 'buffer-layout';
// 1184 TransferOutProposal

View File

@ -1,14 +1,4 @@
import {
programIds,
getMultipleAccounts,
sendTransaction,
cache,
TokenAccountParser,
ParsedAccount,
formatAmount,
createAssociatedTokenAccountInstruction,
toLamports,
} from '@oyster/common';
import { programIds, sendTransaction } from '@oyster/common';
import { WalletAdapter } from '@solana/wallet-base';
import { ethers } from 'ethers';
import { WormholeFactory } from '../../../contracts/WormholeFactory';

View File

@ -5,7 +5,6 @@ import {
cache,
TokenAccountParser,
ParsedAccount,
formatAmount,
createAssociatedTokenAccountInstruction,
} from '@oyster/common';
import { ethers } from 'ethers';
@ -140,7 +139,7 @@ export const toSolana = async (
step: counter++,
});
const { txid } = await sendTransaction(
await sendTransaction(
connection,
wallet,
instructions,