Skip to content

Should encodeAddressToBase64(msg.sender) be encodeAddressToBase64(address(this)) in the public gateway? #13

Description

@ltfschoen

In this example https://docs.scrt.network/secret-network-documentation/confidential-computing-layer/ethereum-evm-developer-toolkit/usecases/vrf/using-encrypted-payloads-for-vrf#defining-variables the EVM gateway address publicClientAddress is used as the callbackAddress

const publicClientAddress = '0x3879E146140b627a5C858a08e507B171D9E43139' //EVM gateway contract address

It is assigned here https://docs.scrt.network/secret-network-documentation/confidential-computing-layer/ethereum-evm-developer-toolkit/usecases/vrf/using-encrypted-payloads-for-vrf#define-the-calldata-for-the-secret-contract-and-callback-information

However, in the public Gateway.sol codebase, which still has traces of that VRF_info here https://github.com/SecretSaturn/SecretPath/blob/main/TNLS-Gateways/public-gateway/src/Gateway.sol#L863 associated with that same example, but instead they use a callback address value of encodeAddressToBase64(msg.sender), here
https://github.com/SecretSaturn/SecretPath/blob/main/TNLS-Gateways/public-gateway/src/Gateway.sol#L864, but that wouldn't be the EVM Gateway contract, since msg.sender would be the address of the user or contract that called that requestRandomness function in Gateway.sol where that code is.

Do you think that link of code should be encodeAddressToBase64(address(this)), where address(this) is the EVM Gateway address?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions