Skip to content

Commit

Permalink
stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
xxxxxx committed Oct 6, 2024
1 parent 3f7358b commit b4feefc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/hardhat/contracts/payWithEth.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,21 @@ contract NunyaBusiness {

constructor(address _gateway) {
gateway == _gateway;
secretContract.retreivePubkey();
}

modifier onlyGateway {
require (gateway, "No gateway set");
require (gateway!=address(0), "No gateway set");
require (msg.sender==gateway, "Only gateway can call callbacks. Use the user function instead");
_;
}

function setSecretContractPubkey (bytes32 _key) public onlyGateway {
require (secretContractPubkey==bytes32(0), "Key already set");
// TODO: Make sure it's our secret contract setting the key, not some interloper
secretContractPubkey=_key;
}

// Function wrapped in secret network payload encryption
function makeRef(string calldata secret) public returns (string memory){
string memory ref = secretContract.makeRef(secret);
Expand Down

0 comments on commit b4feefc

Please sign in to comment.