I was integrated SG router to my smart contract, in my smart contract I set address on destination chain based on layerzero chain id, then layerzero changed chain id from 1 to 101 (Ethereum for example), so if I forget to set address again to new chain id and passed 101 as param (from frontend code), that could cause transfer stable amount to address(0) on destination chain.
Hi SG team,
I was integrated SG router to my smart contract, in my smart contract I set address on destination chain based on layerzero chain id, then layerzero changed chain id from 1 to 101 (Ethereum for example), so if I forget to set address again to new chain id and passed 101 as param (from frontend code), that could cause transfer stable amount to
address(0)
on destination chain.I think to prevent it, the Pool contract should validate
_to
address when transfer stable tokens, example inswapRemote
function: https://github.com/stargate-protocol/stargate/blob/main/contracts/Pool.sol#L310