Skip to content

Commit

Permalink
/== typos
Browse files Browse the repository at this point in the history
  • Loading branch information
xxxxxx committed Oct 6, 2024
1 parent 78c372b commit 0a691a5
Show file tree
Hide file tree
Showing 5 changed files with 158 additions and 185 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,8 @@
"secret:clean:instantiateContract": "yarn workspace secret-instantiate-contract clean",
"secret:start:instantiateContract": "yarn workspace secret-instantiate-contract start"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"dependencies": {
"eslint-plugin-react": "^7.37.1"
}
}
4 changes: 2 additions & 2 deletions packages/hardhat/contracts/NunyaBusiness.sol
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ contract NunyaBusiness {
function newSecretUser(uint256 _secret) public payable returns (uint256){
fundGateway(msg.value);
uint256 requestId = secretContract.newSecretUser(_secret);
expectedResult[requestId]==FunctionCallType.NEW_USER;
expectedResult[requestId]=FunctionCallType.NEW_USER;
return(requestId);
}

Expand Down Expand Up @@ -110,7 +110,7 @@ contract NunyaBusiness {
require (_value >= msg.value, "Naughty!");
uint256 gasPaid = fundGateway();
uint256 requestId = secretContract.payWithReceipt(_ref, msg.value-gasPaid, _userPubkey);
expectedResult[requestId]==FunctionCallType.PAY;
expectedResult[requestId]=FunctionCallType.PAY;
return(requestId);
}

Expand Down
177 changes: 0 additions & 177 deletions packages/hardhat/contracts/payWithEth.sol

This file was deleted.

9 changes: 5 additions & 4 deletions packages/hardhat/deploy/00_deploy_your_contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,24 @@ const deployYourContract: DeployFunction = async function (hre: HardhatRuntimeEn
const { deployer } = await hre.getNamedAccounts();
const { deploy } = hre.deployments;

await deploy("YourContract", {
await deploy("NunyaBusiness", {
from: deployer,
// Contract constructor arguments
args: [deployer],
log: true,
gasLimit: 3000000,
// autoMine: can be passed to the deploy function to make the deployment process faster on local networks by
// automatically mining the contract deployment transaction. There is no effect on live networks.
autoMine: true,
});

// Get the deployed contract to interact with it after deploying.
const yourContract = await hre.ethers.getContract<Contract>("YourContract", deployer);
console.log("👋 Initial greeting:", await yourContract.greeting());
const yourContract = await hre.ethers.getContract<Contract>("NunyaBusiness", deployer);
// console.log("👋 Initial greeting:", await NunyaBusiness.greeting());
};

export default deployYourContract;

// Tags are useful if you have multiple deploy files and only want to run one of them.
// e.g. yarn deploy --tags YourContract
deployYourContract.tags = ["YourContract"];
deployYourContract.tags = ["NunyaBusiness"];
148 changes: 147 additions & 1 deletion packages/nextjs/contracts/deployedContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,152 @@
*/
import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract";

const deployedContracts = {} as const;
const deployedContracts = {
31337: {
YourContract: {
address: "0x5FbDB2315678afecb367f032d93F642f64180aa3",
abi: [
{
inputs: [
{
internalType: "address",
name: "_owner",
type: "address",
},
],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "greetingSetter",
type: "address",
},
{
indexed: false,
internalType: "string",
name: "newGreeting",
type: "string",
},
{
indexed: false,
internalType: "bool",
name: "premium",
type: "bool",
},
{
indexed: false,
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "GreetingChange",
type: "event",
},
{
inputs: [],
name: "greeting",
outputs: [
{
internalType: "string",
name: "",
type: "string",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "premium",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "string",
name: "_newGreeting",
type: "string",
},
],
name: "setGreeting",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [],
name: "totalCounter",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
name: "userGreetingCounter",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "withdraw",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
stateMutability: "payable",
type: "receive",
},
],
inheritedFunctions: {},
},
},
} as const;

export default deployedContracts satisfies GenericContractsDeclaration;

0 comments on commit 0a691a5

Please sign in to comment.