Skip to content

Commit

Permalink
deploy HumanOracleWithVault
Browse files Browse the repository at this point in the history
  • Loading branch information
lorbke committed Nov 16, 2024
1 parent 22573b2 commit 7d57a6b
Show file tree
Hide file tree
Showing 6 changed files with 647 additions and 30 deletions.
77 changes: 77 additions & 0 deletions packages/foundry/broadcast/Deploy.s.sol/480/run-1731787162.json

Large diffs are not rendered by default.

63 changes: 41 additions & 22 deletions packages/foundry/broadcast/Deploy.s.sol/480/run-latest.json

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions packages/foundry/script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@ pragma solidity ^0.8.19;
import "./DeployHelpers.s.sol";
import { DeployMockHumanOracle } from "./DeployMockHumanOracle.s.sol";
import { DeployHumanOracle } from "./DeployHumanOracle.s.sol";
import { DeployHumanOracleWithVault } from "./DeployHumanOracleWithVault.s.sol";

contract DeployScript is ScaffoldETHDeploy {
function run() external {
// DeployMockHumanOracle deployMockHumanOracle = new DeployMockHumanOracle();
// deployMockHumanOracle.run();

DeployHumanOracle deployHumanOracle = new DeployHumanOracle();
deployHumanOracle.run();
// DeployHumanOracle deployHumanOracle = new DeployHumanOracle();
// deployHumanOracle.run();

DeployHumanOracleWithVault deployHumanOracleWithVault = new DeployHumanOracleWithVault();
deployHumanOracleWithVault.run();

// deploy more contracts here
// DeployMyContract deployMyContract = new DeployMyContract();
// deployMyContract.run();
Expand Down
25 changes: 25 additions & 0 deletions packages/foundry/script/DeployHumanOracleWithVault.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import "../contracts/HumanOracleWithVault.sol";
import "./DeployHelpers.s.sol";

contract DeployHumanOracleWithVault is ScaffoldETHDeploy {

address public worldIdAddr = 0x17B354dD2595411ff79041f930e491A4Df39A278;
address public worldToken = 0x2cFc85d8E48F8EAB294be644d9E25C3030863003;
address public permit2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;
address public owner = 0x4639B9F663C14Bad89Ddcc16966e85Bc81dCCD40;
uint256 public groupId = 1;
string public appId = "app_485be80eb191bba1e603c1aeb6743660";
string public action = "registration";

function run() external ScaffoldEthDeployerRunner {
HumanOracleWithVault humanOracleWithVault = new HumanOracleWithVault(worldIdAddr, worldToken, groupId, appId, action, permit2, owner);
console.logString(
string.concat(
"HumanOracle deployed at: ", vm.toString(address(humanOracleWithVault))
)
);
}
}
252 changes: 249 additions & 3 deletions packages/nextjs-app/src/contracts/deployedContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ const deployedContracts = {
},
},
480: {
HumanOracle: {
address: "0xaacd5df051fe64da91422a0a2bf4f99a14732bda",
HumanOracleWithVault: {
address: "0x41c7f21d9e3936912f3c96ba8002bbfb1e57db90",
abi: [
{
type: "constructor",
Expand All @@ -299,6 +299,11 @@ const deployedContracts = {
type: "address",
internalType: "address",
},
{
name: "_worldTokenAddr",
type: "address",
internalType: "address",
},
{
name: "_groupId",
type: "uint256",
Expand All @@ -314,9 +319,32 @@ const deployedContracts = {
type: "string",
internalType: "string",
},
{
name: "_permit",
type: "address",
internalType: "address",
},
{
name: "_owner",
type: "address",
internalType: "address",
},
],
stateMutability: "nonpayable",
},
{
type: "function",
name: "PERMIT2",
inputs: [],
outputs: [
{
name: "",
type: "address",
internalType: "contract IPermit2",
},
],
stateMutability: "view",
},
{
type: "function",
name: "claimRewardForVote",
Expand Down Expand Up @@ -369,6 +397,39 @@ const deployedContracts = {
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "depositERC20",
inputs: [
{
name: "token",
type: "address",
internalType: "contract IERC20",
},
{
name: "amount",
type: "uint256",
internalType: "uint256",
},
{
name: "nonce",
type: "uint256",
internalType: "uint256",
},
{
name: "deadline",
type: "uint256",
internalType: "uint256",
},
{
name: "signature",
type: "bytes",
internalType: "bytes",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "getUserPayoutForVote",
Expand Down Expand Up @@ -536,6 +597,44 @@ const deployedContracts = {
],
stateMutability: "view",
},
{
type: "function",
name: "owner",
inputs: [],
outputs: [
{
name: "",
type: "address",
internalType: "address",
},
],
stateMutability: "view",
},
{
type: "function",
name: "renounceOwnership",
inputs: [],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "rescueTokens",
inputs: [
{
name: "token",
type: "address",
internalType: "contract IERC20",
},
{
name: "recipient",
type: "address",
internalType: "address",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "signUpWithWorldId",
Expand Down Expand Up @@ -597,6 +696,71 @@ const deployedContracts = {
type: "uint256",
internalType: "uint256",
},
{
name: "nonce",
type: "uint256",
internalType: "uint256",
},
{
name: "deadline",
type: "uint256",
internalType: "uint256",
},
{
name: "signature",
type: "bytes",
internalType: "bytes",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "tokenBalancesByUser",
inputs: [
{
name: "",
type: "address",
internalType: "address",
},
{
name: "",
type: "address",
internalType: "contract IERC20",
},
],
outputs: [
{
name: "",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "view",
},
{
type: "function",
name: "totalBalance",
inputs: [],
outputs: [
{
name: "",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "view",
},
{
type: "function",
name: "transferOwnership",
inputs: [
{
name: "newOwner",
type: "address",
internalType: "address",
},
],
outputs: [],
stateMutability: "nonpayable",
Expand Down Expand Up @@ -625,6 +789,24 @@ const deployedContracts = {
],
stateMutability: "view",
},
{
type: "function",
name: "withdrawERC20",
inputs: [
{
name: "token",
type: "address",
internalType: "contract IERC20",
},
{
name: "amount",
type: "uint256",
internalType: "uint256",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "worldId",
Expand All @@ -638,6 +820,38 @@ const deployedContracts = {
],
stateMutability: "view",
},
{
type: "function",
name: "worldToken",
inputs: [],
outputs: [
{
name: "",
type: "address",
internalType: "contract IERC20",
},
],
stateMutability: "view",
},
{
type: "event",
name: "OwnershipTransferred",
inputs: [
{
name: "previousOwner",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "newOwner",
type: "address",
indexed: true,
internalType: "address",
},
],
anonymous: false,
},
{
type: "event",
name: "RewardClaimed",
Expand Down Expand Up @@ -750,8 +964,40 @@ const deployedContracts = {
],
anonymous: false,
},
{
type: "error",
name: "OwnableInvalidOwner",
inputs: [
{
name: "owner",
type: "address",
internalType: "address",
},
],
},
{
type: "error",
name: "OwnableUnauthorizedAccount",
inputs: [
{
name: "account",
type: "address",
internalType: "address",
},
],
},
],
inheritedFunctions: {},
inheritedFunctions: {
PERMIT2: "contracts/Permit2Vault.sol",
depositERC20: "contracts/Permit2Vault.sol",
owner: "contracts/Permit2Vault.sol",
renounceOwnership: "contracts/Permit2Vault.sol",
rescueTokens: "contracts/Permit2Vault.sol",
tokenBalancesByUser: "contracts/Permit2Vault.sol",
totalBalance: "contracts/Permit2Vault.sol",
transferOwnership: "contracts/Permit2Vault.sol",
withdrawERC20: "contracts/Permit2Vault.sol",
},
},
},
4801: {
Expand Down
Loading

0 comments on commit 7d57a6b

Please sign in to comment.