Skip to content

Commit

Permalink
contract deploys :)
Browse files Browse the repository at this point in the history
  • Loading branch information
xxxxxx committed Oct 6, 2024
1 parent 0a691a5 commit dacfd69
Show file tree
Hide file tree
Showing 2 changed files with 380 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hardhat/contracts/NunyaBusiness.sol
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ contract NunyaBusiness {
secretContract = SecretContract(_gateway);
fundGateway(msg.value);

secretContract.retrievePubkey();
// secretContract.retrievePubkey();
// Lock secretContractPubkey to Owner. After it is set it cannot be reset.
secretContractPubkey = uint256(uint160(msg.sender));
}
Expand Down
379 changes: 379 additions & 0 deletions packages/nextjs/contracts/deployedContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,385 @@ import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract";

const deployedContracts = {
31337: {
NunyaBusiness: {
address: "0x0165878A594ca255338adfa4d48449f69242Eb8F",
abi: [
{
inputs: [
{
internalType: "address payable",
name: "_gateway",
type: "address",
},
],
stateMutability: "payable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "uint256",
name: "requestId",
type: "uint256",
},
],
name: "HackingAttemptError",
type: "event",
},
{
anonymous: false,
inputs: [
{
components: [
{
internalType: "uint256",
name: "paymentRef",
type: "uint256",
},
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
internalType: "bytes32",
name: "sig",
type: "bytes32",
},
],
indexed: false,
internalType: "struct NunyaBusiness.Receipt",
name: "",
type: "tuple",
},
],
name: "ReceiptEmitted",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "uint256",
name: "requestId",
type: "uint256",
},
],
name: "Request_success",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "uint256",
name: "requestId",
type: "uint256",
},
{
indexed: false,
internalType: "string",
name: "message",
type: "string",
},
],
name: "SecretNetworkError",
type: "event",
},
{
inputs: [
{
internalType: "uint256",
name: "_requestId",
type: "uint256",
},
{
internalType: "string",
name: "_message",
type: "string",
},
],
name: "emitSecretNetworkError",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "_secret",
type: "uint256",
},
{
internalType: "string",
name: "_ref",
type: "string",
},
],
name: "linkPaymentRef",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "payable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "_requestId",
type: "uint256",
},
{
internalType: "bool",
name: "_success",
type: "bool",
},
],
name: "linkPaymentRefCallback",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "_secret",
type: "uint256",
},
],
name: "newSecretUser",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "payable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "_requestId",
type: "uint256",
},
{
internalType: "bool",
name: "_success",
type: "bool",
},
],
name: "newSecretUserCallback",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "string",
name: "_ref",
type: "string",
},
{
internalType: "uint256",
name: "_value",
type: "uint256",
},
{
internalType: "uint256",
name: "_userPubkey",
type: "uint256",
},
],
name: "pay",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "payable",
type: "function",
},
{
inputs: [
{
internalType: "string",
name: "_ref",
type: "string",
},
{
internalType: "uint256",
name: "_value",
type: "uint256",
},
],
name: "pay",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "payable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "_requestId",
type: "uint256",
},
{
internalType: "bool",
name: "_success",
type: "bool",
},
{
components: [
{
internalType: "uint256",
name: "paymentRef",
type: "uint256",
},
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
internalType: "bytes32",
name: "sig",
type: "bytes32",
},
],
internalType: "struct NunyaBusiness.Receipt",
name: "_receipt",
type: "tuple",
},
],
name: "payCallback",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "_requestId",
type: "uint256",
},
{
internalType: "bool",
name: "_success",
type: "bool",
},
],
name: "payCallback",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "_requestId",
type: "uint256",
},
{
internalType: "uint256",
name: "_key",
type: "uint256",
},
],
name: "setSecretContractPubkeyCallback",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "string",
name: "_secret",
type: "string",
},
{
internalType: "uint256",
name: "_amount",
type: "uint256",
},
{
internalType: "address",
name: "_withdrawalAddress",
type: "address",
},
],
name: "withdrawTo",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "payable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "_requestId",
type: "uint256",
},
{
internalType: "bool",
name: "_success",
type: "bool",
},
{
internalType: "uint256",
name: "_amount",
type: "uint256",
},
{
internalType: "address payable",
name: "_withdrawalAddress",
type: "address",
},
],
name: "withdrawToCallback",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
stateMutability: "payable",
type: "receive",
},
],
inheritedFunctions: {},
},
YourContract: {
address: "0x5FbDB2315678afecb367f032d93F642f64180aa3",
abi: [
Expand Down

0 comments on commit dacfd69

Please sign in to comment.