-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layerzero OFT #2
base: dev
Are you sure you want to change the base?
Conversation
Here worked better with APE delivered successully https://testnet.layerzeroscan.com/tx/0xfe08e0d46b05a04416531e806413d8a8d66feabcdd81bc222fc1975b6a2e0e90 Here there is the reverse ( |
SendParam calldata _sendParam, | ||
MessagingFee calldata _fee, | ||
address _refundAddress | ||
) external payable virtual override returns (MessagingReceipt memory msgReceipt, OFTReceipt memory oftReceipt) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious why we are overriding some of these functions if they are inherited from LayerZero's OFT contract
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, it's because we invoke the custom _lzSendWithAmount
instead of _lsZend
I can't simply override the _lzSend`` because I had to add the parameter amount, that it was not explicitely inserted before. Same for
_payNative, the original one doesn't check that
msg.value` is amount + fee because the original isn't developed for auto-wrapping native tokens.
Similar for _credit
, it is overriden since it has to send native token instead of minting erc20 token
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense. just curious why we need to pass the amount
explicitly and not use msg.sender
?
https://horizenlabs.atlassian.net/browse/HZN-2116
Chain is: APECHAIN CURTIS TESTNET
Other chain is: ARBITRUM SEPOLIA TESTNET
─$ npx hardhat run ./scripts/deploy-multichain.ts --network curtis
─$ npx hardhat run ./scripts/demo-transfer.ts --network curtis
tx on layer zero scan
https://testnet.layerzeroscan.com/address/0x742ae08ab454b3022c6e5f90c53073c2b8741feb