Right now, when a universal contract A on ZetaChain makes a gateway.call a contract B on a connected chain, contract B is executed without knowing contract A address.
This makes it virtually impossible to establish a connection for sending custom ERC-20s, NFTs and other valuables between ZetaChain and connected chains, because the message essentially comes without authentication.
The proposal is to allow universal contracts to make calls with original sender information passed as a parameter.
struct messageContext {
bytes origin;
address sender; // not used
uint256 chainID;
}
A simple solution could be to define this onCall interface, the onCall contains caller address, this value is authenticated, onCall is the only method that cannot be called through arbitrary call to prevent spoofing.
Right now, when a universal contract A on ZetaChain makes a
gateway.call
a contract B on a connected chain, contract B is executed without knowing contract A address.This makes it virtually impossible to establish a connection for sending custom ERC-20s, NFTs and other valuables between ZetaChain and connected chains, because the message essentially comes without authentication.
The proposal is to allow universal contracts to make calls with original sender information passed as a parameter.