mirror of https://github.com/certusone/oyster.git
feat: bridge
This commit is contained in:
parent
bb27547446
commit
3f2ced7ef4
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import * as BufferLayout from 'buffer-layout';
|
||||
|
||||
/// ForeignAddress u8 - 32
|
||||
|
||||
// 420
|
||||
export const GuardianSetLayout: typeof BufferLayout.Structure = BufferLayout.struct(
|
||||
[
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue