zeta-chain / protocol-contracts

Protocol contracts implementing the core logic of the protocol, deployed on ZetaChain and on connected chains
MIT License
66 stars 54 forks source link

Replace the `payload` parameter with `message` #233

Open fadeev opened 1 month ago

fadeev commented 1 month ago

https://github.com/zeta-chain/protocol-contracts/blob/a92fb24eef31e017a9488d104664aff93e419802/contracts/prototypes/evm/GatewayEVM.sol#L104

We have "payload" in the depositAndCall and "message" in the onCrossChainCall. For consistency, we should use the same name.

lumtis commented 1 month ago

I think the reasoning of using payload in depositAndCall was to differentiate from message in withdrawAndCall to highlight the difference that withdrawAndCall enable a arbitrary smart contract call while for the payload we call onCrossChainCall And we inadvertently used message in onCrossChainCall

I think it makes sense to continue on this choice and call it payload in onCrossChainCall

fadeev commented 1 month ago

Hm, but it's also very intuitive that messages are being sent to universal contracts, and from universal contracts to contracts on connected chains.