Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ltfschoen opened this issue Dec 22, 2024 · 0 comments

Comments

@ltfschoen
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant