For more information, please go to the README file under the packages/solana/contracts
directory.
Create programId keypair files if not existed
cd packages/solana/contracts
solana-keygen new -o target/deploy/solana_vault-keypair.json
anchor keys sync
yarn && yarn build
-
Make sure the oapp program id is set correctly in source code and Anchor.toml
-
Because the definition of
MessagingFee
is not included in the IDL, please add the following definition to the idl types filetarget/types/solana_vault.ts
.
{
"name": "MessagingFee",
"type": {
"kind": "struct",
"fields": [
{
"name": "nativeFee",
"type": "u64"
},
{
"name": "lzTokenFee",
"type": "u64"
}
]
}
}
- Run the script
anchor run quote_deposit --provider.cluster devnet
- example output
LayerZero cross-chain fee quote:
Native fee: 16768
LZ token fee: 0