axelarnetwork / support

Your source for support with the Axelar Network
3 stars 1 forks source link

is 0xD36aac0c9676e984D72823Fb662ce94D3Ab5E551 refers to the Axelar Relayer same for all chains? #30

Closed Olanetsoft closed 10 months ago

Olanetsoft commented 10 months ago

I am trying to ensure that if I whitelist my smart contract with this address 0xD36aac0c9676e984D72823Fb662ce94D3Ab5E551 to only accept messages from this address that a) This address is the same for all my Satelite smart contracts across all chains b) This Relayer address will not change

All I am trying to establish basically is that a certain function can only be called by the Axelar Relayer. So if there are any addresses for mainnet testnet different chains etc, then I can whitelist these and be sure this will always work.

Olanetsoft commented 10 months ago

The current executor uses the same address across chains, but it is not recommended to rely on this assumption as it may change in the future.

However, the correct architecture is to verify the source chain and address in your `_execute`` method, which is ensured to be true by the verification performed in the execute method by the gateway. You can refer to the code snippet provided in the link below for the implementation: https://github.com/axelarnetwork/axelar-gmp-sdk-solidity/blob/main/contracts/executable/AxelarExecutable.sol#L25-L28