From 4fecfc47190936e5a6e7b3158ef38ab7867c12d4 Mon Sep 17 00:00:00 2001 From: ochikov Date: Sat, 23 Apr 2022 16:16:01 +0300 Subject: [PATCH] added contract abis and new network rpcs --- constants/index.ts | 5 + contracts/Factory.json | 141 ++ contracts/JointVenture.json | 798 +++++++++++ contracts/MockVentureCalls.json | 111 ++ contracts/types/ERC20.ts | 342 +++++ contracts/types/Factory.ts | 278 ++++ contracts/types/JointVenture.ts | 1163 +++++++++++++++++ contracts/types/common.ts | 44 + contracts/types/factories/ERC20__factory.ts | 240 ++++ contracts/types/factories/Factory__factory.ts | 162 +++ .../types/factories/JointVenture__factory.ts | 817 ++++++++++++ contracts/types/index.ts | 10 + pages/index.tsx | 2 - 13 files changed, 4111 insertions(+), 2 deletions(-) create mode 100644 contracts/Factory.json create mode 100644 contracts/JointVenture.json create mode 100644 contracts/MockVentureCalls.json create mode 100644 contracts/types/ERC20.ts create mode 100644 contracts/types/Factory.ts create mode 100644 contracts/types/JointVenture.ts create mode 100644 contracts/types/common.ts create mode 100644 contracts/types/factories/ERC20__factory.ts create mode 100644 contracts/types/factories/Factory__factory.ts create mode 100644 contracts/types/factories/JointVenture__factory.ts create mode 100644 contracts/types/index.ts diff --git a/constants/index.ts b/constants/index.ts index feaa103..16ce936 100644 --- a/constants/index.ts +++ b/constants/index.ts @@ -6,6 +6,9 @@ import { NETWORK_CONFIG } from "../config/network"; export const walletConnectSupportedNetworks: Networks = { // Ethereum mainnet 4: 'https://rinkeby.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161', + 97: 'https://data-seed-prebsc-1-s1.binance.org:8545/', + 80001: 'https://rpc-mumbai.maticvigil.com', + 69: 'https://kovan.optimism.io/' }; // Network chain ids @@ -13,6 +16,8 @@ import { NETWORK_CONFIG } from "../config/network"; NETWORK_CONFIG )?.map((config: any): number => config.network.chainId); + export const ALBT_TOKEN_ADDRESS = ""; + export const FACTORY_ADDRESS = ""; export const localStorageKeys: { [key: string]: string } = { walletConnection: "ventures:connected", }; diff --git a/contracts/Factory.json b/contracts/Factory.json new file mode 100644 index 0000000..8325655 --- /dev/null +++ b/contracts/Factory.json @@ -0,0 +1,141 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "instantiation", + "type": "address" + } + ], + "name": "ContractInstantiation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_description", + "type": "string" + }, + { + "internalType": "address[]", + "name": "_voters", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "_proposers", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_required", + "type": "uint256" + } + ], + "name": "create", + "outputs": [ + { + "internalType": "address", + "name": "wallet", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "creator", + "type": "address" + } + ], + "name": "getInstantiationCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "creator", + "type": "address" + } + ], + "name": "getInstantiations", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "instantiations", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isInstantiation", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ] \ No newline at end of file diff --git a/contracts/JointVenture.json b/contracts/JointVenture.json new file mode 100644 index 0000000..1790a25 --- /dev/null +++ b/contracts/JointVenture.json @@ -0,0 +1,798 @@ + +[ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_description", + "type": "string" + }, + { + "internalType": "address[]", + "name": "_voters", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "_proposers", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_required", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "Confirmation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "Execution", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ExecutionFailure", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "ProposerAddition", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "ProposerRemoval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "required", + "type": "uint256" + } + ], + "name": "RequirementChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "revenue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "voters", + "type": "address[]" + } + ], + "name": "RevenueSplit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "Revocation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "Submission", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "VoterAddition", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "VoterRemoval", + "type": "event" + }, + { + "inputs": [], + "name": "MAX_OWNER_COUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "addProposer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "addVoter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_required", + "type": "uint256" + } + ], + "name": "changeRequirement", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "confirmProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "confirmations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "description", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "executeProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "getConfirmationCount", + "outputs": [ + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "getConfirmations", + "outputs": [ + { + "internalType": "address[]", + "name": "_confirmations", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "pending", + "type": "bool" + }, + { + "internalType": "bool", + "name": "executed", + "type": "bool" + } + ], + "name": "getProposalCount", + "outputs": [ + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "from", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "to", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "pending", + "type": "bool" + }, + { + "internalType": "bool", + "name": "executed", + "type": "bool" + } + ], + "name": "getProposalIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "_proposalIds", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "from", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "to", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "pending", + "type": "bool" + }, + { + "internalType": "bool", + "name": "executed", + "type": "bool" + } + ], + "name": "getProposals", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "executed", + "type": "bool" + } + ], + "internalType": "struct JointVenture.Proposal[]", + "name": "_proposals", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getProposers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "getRevenueSplit", + "outputs": [ + { + "internalType": "uint256", + "name": "split", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVoters", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "isConfirmed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isProposer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isVoter", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposals", + "outputs": [ + { + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "executed", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposers", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "removeProposer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "removeVoter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "address", + "name": "newVoter", + "type": "address" + } + ], + "name": "replaceVoter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "required", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "revokeConfirmation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "splitRevenue", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "submitProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "voters", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] + \ No newline at end of file diff --git a/contracts/MockVentureCalls.json b/contracts/MockVentureCalls.json new file mode 100644 index 0000000..16371d8 --- /dev/null +++ b/contracts/MockVentureCalls.json @@ -0,0 +1,111 @@ +[ + { + "inputs": [], + "name": "byteArray1", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastMsgDataLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastMsgValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "c", + "type": "bytes" + } + ], + "name": "receive1bytes", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "a", + "type": "uint256" + } + ], + "name": "receive1uint", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "a", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "b", + "type": "uint256" + } + ], + "name": "receive2uints", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "uint1", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "uint2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/contracts/types/ERC20.ts b/contracts/types/ERC20.ts new file mode 100644 index 0000000..53d153f --- /dev/null +++ b/contracts/types/ERC20.ts @@ -0,0 +1,342 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + BaseContract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "./common"; + +export interface ERC20Interface extends ethers.utils.Interface { + functions: { + "name()": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "totalSupply()": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "decimals()": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "symbol()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "allowance(address,address)": FunctionFragment; + }; + + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + { owner: string; spender: string; value: BigNumber } +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + { from: string; to: string; value: BigNumber } +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface ERC20 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ERC20Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + name(overrides?: CallOverrides): Promise<[string]>; + + approve( + _spender: string, + _value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + balanceOf( + _owner: string, + overrides?: CallOverrides + ): Promise<[BigNumber] & { balance: BigNumber }>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + transfer( + _to: string, + _value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + allowance( + _owner: string, + _spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + }; + + name(overrides?: CallOverrides): Promise; + + approve( + _spender: string, + _value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + balanceOf(_owner: string, overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + transfer( + _to: string, + _value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + allowance( + _owner: string, + _spender: string, + overrides?: CallOverrides + ): Promise; + + callStatic: { + name(overrides?: CallOverrides): Promise; + + approve( + _spender: string, + _value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + balanceOf(_owner: string, overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + transfer( + _to: string, + _value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + allowance( + _owner: string, + _spender: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Approval(address,address,uint256)"( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + + "Transfer(address,address,uint256)"( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + }; + + estimateGas: { + name(overrides?: CallOverrides): Promise; + + approve( + _spender: string, + _value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + balanceOf(_owner: string, overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + transfer( + _to: string, + _value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + allowance( + _owner: string, + _spender: string, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + name(overrides?: CallOverrides): Promise; + + approve( + _spender: string, + _value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + balanceOf( + _owner: string, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + transfer( + _to: string, + _value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + allowance( + _owner: string, + _spender: string, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/contracts/types/Factory.ts b/contracts/types/Factory.ts new file mode 100644 index 0000000..f3ae6a7 --- /dev/null +++ b/contracts/types/Factory.ts @@ -0,0 +1,278 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + BaseContract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "./common"; + +export interface FactoryInterface extends ethers.utils.Interface { + functions: { + "create(string,string,address[],address[],uint256)": FunctionFragment; + "getInstantiationCount(address)": FunctionFragment; + "getInstantiations(address)": FunctionFragment; + "instantiations(address,uint256)": FunctionFragment; + "isInstantiation(address)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "create", + values: [string, string, string[], string[], BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getInstantiationCount", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "getInstantiations", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "instantiations", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isInstantiation", + values: [string] + ): string; + + decodeFunctionResult(functionFragment: "create", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getInstantiationCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getInstantiations", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "instantiations", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isInstantiation", + data: BytesLike + ): Result; + + events: { + "ContractInstantiation(address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ContractInstantiation"): EventFragment; +} + +export type ContractInstantiationEvent = TypedEvent< + [string, string], + { sender: string; instantiation: string } +>; + +export type ContractInstantiationEventFilter = + TypedEventFilter; + +export interface Factory extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: FactoryInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + create( + _name: string, + _description: string, + _voters: string[], + _proposers: string[], + _required: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getInstantiationCount( + creator: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getInstantiations( + creator: string, + overrides?: CallOverrides + ): Promise<[string[]]>; + + instantiations( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + isInstantiation( + arg0: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + }; + + create( + _name: string, + _description: string, + _voters: string[], + _proposers: string[], + _required: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getInstantiationCount( + creator: string, + overrides?: CallOverrides + ): Promise; + + getInstantiations( + creator: string, + overrides?: CallOverrides + ): Promise; + + instantiations( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isInstantiation(arg0: string, overrides?: CallOverrides): Promise; + + callStatic: { + create( + _name: string, + _description: string, + _voters: string[], + _proposers: string[], + _required: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getInstantiationCount( + creator: string, + overrides?: CallOverrides + ): Promise; + + getInstantiations( + creator: string, + overrides?: CallOverrides + ): Promise; + + instantiations( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isInstantiation(arg0: string, overrides?: CallOverrides): Promise; + }; + + filters: { + "ContractInstantiation(address,address)"( + sender?: null, + instantiation?: null + ): ContractInstantiationEventFilter; + ContractInstantiation( + sender?: null, + instantiation?: null + ): ContractInstantiationEventFilter; + }; + + estimateGas: { + create( + _name: string, + _description: string, + _voters: string[], + _proposers: string[], + _required: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getInstantiationCount( + creator: string, + overrides?: CallOverrides + ): Promise; + + getInstantiations( + creator: string, + overrides?: CallOverrides + ): Promise; + + instantiations( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isInstantiation( + arg0: string, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + create( + _name: string, + _description: string, + _voters: string[], + _proposers: string[], + _required: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getInstantiationCount( + creator: string, + overrides?: CallOverrides + ): Promise; + + getInstantiations( + creator: string, + overrides?: CallOverrides + ): Promise; + + instantiations( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isInstantiation( + arg0: string, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/contracts/types/JointVenture.ts b/contracts/types/JointVenture.ts new file mode 100644 index 0000000..ec4943b --- /dev/null +++ b/contracts/types/JointVenture.ts @@ -0,0 +1,1163 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + BaseContract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "./common"; + +export type ProposalStruct = { + destination: string; + value: BigNumberish; + data: BytesLike; + executed: boolean; +}; + +export type ProposalStructOutput = [string, BigNumber, string, boolean] & { + destination: string; + value: BigNumber; + data: string; + executed: boolean; +}; + +export interface JointVentureInterface extends ethers.utils.Interface { + functions: { + "MAX_OWNER_COUNT()": FunctionFragment; + "addProposer(address)": FunctionFragment; + "addVoter(address)": FunctionFragment; + "changeRequirement(uint256)": FunctionFragment; + "confirmProposal(uint256)": FunctionFragment; + "confirmations(uint256,address)": FunctionFragment; + "description()": FunctionFragment; + "executeProposal(uint256)": FunctionFragment; + "getConfirmationCount(uint256)": FunctionFragment; + "getConfirmations(uint256)": FunctionFragment; + "getProposalCount(bool,bool)": FunctionFragment; + "getProposalIds(uint256,uint256,bool,bool)": FunctionFragment; + "getProposals(uint256,uint256,bool,bool)": FunctionFragment; + "getProposers()": FunctionFragment; + "getRevenueSplit(address)": FunctionFragment; + "getVoters()": FunctionFragment; + "isConfirmed(uint256)": FunctionFragment; + "isProposer(address)": FunctionFragment; + "isVoter(address)": FunctionFragment; + "name()": FunctionFragment; + "proposalCount()": FunctionFragment; + "proposals(uint256)": FunctionFragment; + "proposers(uint256)": FunctionFragment; + "removeProposer(address)": FunctionFragment; + "removeVoter(address)": FunctionFragment; + "replaceVoter(address,address)": FunctionFragment; + "required()": FunctionFragment; + "revokeConfirmation(uint256)": FunctionFragment; + "splitRevenue(address)": FunctionFragment; + "submitProposal(address,uint256,bytes)": FunctionFragment; + "voters(uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "MAX_OWNER_COUNT", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "addProposer", values: [string]): string; + encodeFunctionData(functionFragment: "addVoter", values: [string]): string; + encodeFunctionData( + functionFragment: "changeRequirement", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "confirmProposal", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "confirmations", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "description", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "executeProposal", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getConfirmationCount", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getConfirmations", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getProposalCount", + values: [boolean, boolean] + ): string; + encodeFunctionData( + functionFragment: "getProposalIds", + values: [BigNumberish, BigNumberish, boolean, boolean] + ): string; + encodeFunctionData( + functionFragment: "getProposals", + values: [BigNumberish, BigNumberish, boolean, boolean] + ): string; + encodeFunctionData( + functionFragment: "getProposers", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getRevenueSplit", + values: [string] + ): string; + encodeFunctionData(functionFragment: "getVoters", values?: undefined): string; + encodeFunctionData( + functionFragment: "isConfirmed", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "isProposer", values: [string]): string; + encodeFunctionData(functionFragment: "isVoter", values: [string]): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "proposalCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposals", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposers", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "removeProposer", + values: [string] + ): string; + encodeFunctionData(functionFragment: "removeVoter", values: [string]): string; + encodeFunctionData( + functionFragment: "replaceVoter", + values: [string, string] + ): string; + encodeFunctionData(functionFragment: "required", values?: undefined): string; + encodeFunctionData( + functionFragment: "revokeConfirmation", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "splitRevenue", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "submitProposal", + values: [string, BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "voters", + values: [BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "MAX_OWNER_COUNT", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "addProposer", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "addVoter", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "changeRequirement", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "confirmProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "confirmations", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "description", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getConfirmationCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getConfirmations", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProposalCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProposalIds", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProposals", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProposers", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getRevenueSplit", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getVoters", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "isConfirmed", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "isProposer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isVoter", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalCount", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "proposals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "proposers", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "removeProposer", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeVoter", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "replaceVoter", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "required", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "revokeConfirmation", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "splitRevenue", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "submitProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "voters", data: BytesLike): Result; + + events: { + "Confirmation(address,uint256)": EventFragment; + "Deposit(address,uint256)": EventFragment; + "Execution(uint256)": EventFragment; + "ExecutionFailure(uint256)": EventFragment; + "ProposerAddition(address)": EventFragment; + "ProposerRemoval(address)": EventFragment; + "RequirementChange(uint256)": EventFragment; + "RevenueSplit(uint256,address[])": EventFragment; + "Revocation(address,uint256)": EventFragment; + "Submission(uint256)": EventFragment; + "VoterAddition(address)": EventFragment; + "VoterRemoval(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Confirmation"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Deposit"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Execution"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutionFailure"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposerAddition"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposerRemoval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RequirementChange"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RevenueSplit"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Revocation"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Submission"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoterAddition"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoterRemoval"): EventFragment; +} + +export type ConfirmationEvent = TypedEvent< + [string, BigNumber], + { sender: string; proposalId: BigNumber } +>; + +export type ConfirmationEventFilter = TypedEventFilter; + +export type DepositEvent = TypedEvent< + [string, BigNumber], + { sender: string; value: BigNumber } +>; + +export type DepositEventFilter = TypedEventFilter; + +export type ExecutionEvent = TypedEvent<[BigNumber], { proposalId: BigNumber }>; + +export type ExecutionEventFilter = TypedEventFilter; + +export type ExecutionFailureEvent = TypedEvent< + [BigNumber], + { proposalId: BigNumber } +>; + +export type ExecutionFailureEventFilter = + TypedEventFilter; + +export type ProposerAdditionEvent = TypedEvent<[string], { proposer: string }>; + +export type ProposerAdditionEventFilter = + TypedEventFilter; + +export type ProposerRemovalEvent = TypedEvent<[string], { proposer: string }>; + +export type ProposerRemovalEventFilter = TypedEventFilter; + +export type RequirementChangeEvent = TypedEvent< + [BigNumber], + { required: BigNumber } +>; + +export type RequirementChangeEventFilter = + TypedEventFilter; + +export type RevenueSplitEvent = TypedEvent< + [BigNumber, string[]], + { revenue: BigNumber; voters: string[] } +>; + +export type RevenueSplitEventFilter = TypedEventFilter; + +export type RevocationEvent = TypedEvent< + [string, BigNumber], + { sender: string; proposalId: BigNumber } +>; + +export type RevocationEventFilter = TypedEventFilter; + +export type SubmissionEvent = TypedEvent< + [BigNumber], + { proposalId: BigNumber } +>; + +export type SubmissionEventFilter = TypedEventFilter; + +export type VoterAdditionEvent = TypedEvent<[string], { voter: string }>; + +export type VoterAdditionEventFilter = TypedEventFilter; + +export type VoterRemovalEvent = TypedEvent<[string], { voter: string }>; + +export type VoterRemovalEventFilter = TypedEventFilter; + +export interface JointVenture extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: JointVentureInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + MAX_OWNER_COUNT(overrides?: CallOverrides): Promise<[BigNumber]>; + + addProposer( + proposer: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + addVoter( + voter: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + changeRequirement( + _required: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + confirmProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + confirmations( + arg0: BigNumberish, + arg1: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + description(overrides?: CallOverrides): Promise<[string]>; + + executeProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getConfirmationCount( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getConfirmations( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[string[]] & { _confirmations: string[] }>; + + getProposalCount( + pending: boolean, + executed: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getProposalIds( + from: BigNumberish, + to: BigNumberish, + pending: boolean, + executed: boolean, + overrides?: CallOverrides + ): Promise<[BigNumber[]] & { _proposalIds: BigNumber[] }>; + + getProposals( + from: BigNumberish, + to: BigNumberish, + pending: boolean, + executed: boolean, + overrides?: CallOverrides + ): Promise< + [ProposalStructOutput[]] & { _proposals: ProposalStructOutput[] } + >; + + getProposers(overrides?: CallOverrides): Promise<[string[]]>; + + getRevenueSplit( + token: string, + overrides?: CallOverrides + ): Promise<[BigNumber] & { split: BigNumber }>; + + getVoters(overrides?: CallOverrides): Promise<[string[]]>; + + isConfirmed( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isProposer(arg0: string, overrides?: CallOverrides): Promise<[boolean]>; + + isVoter(arg0: string, overrides?: CallOverrides): Promise<[boolean]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + proposalCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, string, boolean] & { + destination: string; + value: BigNumber; + data: string; + executed: boolean; + } + >; + + proposers(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>; + + removeProposer( + proposer: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeVoter( + voter: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + replaceVoter( + voter: string, + newVoter: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + required(overrides?: CallOverrides): Promise<[BigNumber]>; + + revokeConfirmation( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + splitRevenue( + token: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + submitProposal( + destination: string, + value: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + voters(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>; + }; + + MAX_OWNER_COUNT(overrides?: CallOverrides): Promise; + + addProposer( + proposer: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + addVoter( + voter: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + changeRequirement( + _required: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + confirmProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + confirmations( + arg0: BigNumberish, + arg1: string, + overrides?: CallOverrides + ): Promise; + + description(overrides?: CallOverrides): Promise; + + executeProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getConfirmationCount( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getConfirmations( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalCount( + pending: boolean, + executed: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getProposalIds( + from: BigNumberish, + to: BigNumberish, + pending: boolean, + executed: boolean, + overrides?: CallOverrides + ): Promise; + + getProposals( + from: BigNumberish, + to: BigNumberish, + pending: boolean, + executed: boolean, + overrides?: CallOverrides + ): Promise; + + getProposers(overrides?: CallOverrides): Promise; + + getRevenueSplit(token: string, overrides?: CallOverrides): Promise; + + getVoters(overrides?: CallOverrides): Promise; + + isConfirmed( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isProposer(arg0: string, overrides?: CallOverrides): Promise; + + isVoter(arg0: string, overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, string, boolean] & { + destination: string; + value: BigNumber; + data: string; + executed: boolean; + } + >; + + proposers(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + removeProposer( + proposer: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeVoter( + voter: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + replaceVoter( + voter: string, + newVoter: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + required(overrides?: CallOverrides): Promise; + + revokeConfirmation( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + splitRevenue( + token: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + submitProposal( + destination: string, + value: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + voters(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + callStatic: { + MAX_OWNER_COUNT(overrides?: CallOverrides): Promise; + + addProposer(proposer: string, overrides?: CallOverrides): Promise; + + addVoter(voter: string, overrides?: CallOverrides): Promise; + + changeRequirement( + _required: BigNumberish, + overrides?: CallOverrides + ): Promise; + + confirmProposal( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + confirmations( + arg0: BigNumberish, + arg1: string, + overrides?: CallOverrides + ): Promise; + + description(overrides?: CallOverrides): Promise; + + executeProposal( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getConfirmationCount( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getConfirmations( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalCount( + pending: boolean, + executed: boolean, + overrides?: CallOverrides + ): Promise; + + getProposalIds( + from: BigNumberish, + to: BigNumberish, + pending: boolean, + executed: boolean, + overrides?: CallOverrides + ): Promise; + + getProposals( + from: BigNumberish, + to: BigNumberish, + pending: boolean, + executed: boolean, + overrides?: CallOverrides + ): Promise; + + getProposers(overrides?: CallOverrides): Promise; + + getRevenueSplit( + token: string, + overrides?: CallOverrides + ): Promise; + + getVoters(overrides?: CallOverrides): Promise; + + isConfirmed( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isProposer(arg0: string, overrides?: CallOverrides): Promise; + + isVoter(arg0: string, overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, string, boolean] & { + destination: string; + value: BigNumber; + data: string; + executed: boolean; + } + >; + + proposers(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + removeProposer(proposer: string, overrides?: CallOverrides): Promise; + + removeVoter(voter: string, overrides?: CallOverrides): Promise; + + replaceVoter( + voter: string, + newVoter: string, + overrides?: CallOverrides + ): Promise; + + required(overrides?: CallOverrides): Promise; + + revokeConfirmation( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + splitRevenue(token: string, overrides?: CallOverrides): Promise; + + submitProposal( + destination: string, + value: BigNumberish, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + + voters(arg0: BigNumberish, overrides?: CallOverrides): Promise; + }; + + filters: { + "Confirmation(address,uint256)"( + sender?: string | null, + proposalId?: BigNumberish | null + ): ConfirmationEventFilter; + Confirmation( + sender?: string | null, + proposalId?: BigNumberish | null + ): ConfirmationEventFilter; + + "Deposit(address,uint256)"( + sender?: string | null, + value?: null + ): DepositEventFilter; + Deposit(sender?: string | null, value?: null): DepositEventFilter; + + "Execution(uint256)"( + proposalId?: BigNumberish | null + ): ExecutionEventFilter; + Execution(proposalId?: BigNumberish | null): ExecutionEventFilter; + + "ExecutionFailure(uint256)"( + proposalId?: BigNumberish | null + ): ExecutionFailureEventFilter; + ExecutionFailure( + proposalId?: BigNumberish | null + ): ExecutionFailureEventFilter; + + "ProposerAddition(address)"( + proposer?: string | null + ): ProposerAdditionEventFilter; + ProposerAddition(proposer?: string | null): ProposerAdditionEventFilter; + + "ProposerRemoval(address)"( + proposer?: string | null + ): ProposerRemovalEventFilter; + ProposerRemoval(proposer?: string | null): ProposerRemovalEventFilter; + + "RequirementChange(uint256)"(required?: null): RequirementChangeEventFilter; + RequirementChange(required?: null): RequirementChangeEventFilter; + + "RevenueSplit(uint256,address[])"( + revenue?: null, + voters?: null + ): RevenueSplitEventFilter; + RevenueSplit(revenue?: null, voters?: null): RevenueSplitEventFilter; + + "Revocation(address,uint256)"( + sender?: string | null, + proposalId?: BigNumberish | null + ): RevocationEventFilter; + Revocation( + sender?: string | null, + proposalId?: BigNumberish | null + ): RevocationEventFilter; + + "Submission(uint256)"( + proposalId?: BigNumberish | null + ): SubmissionEventFilter; + Submission(proposalId?: BigNumberish | null): SubmissionEventFilter; + + "VoterAddition(address)"(voter?: string | null): VoterAdditionEventFilter; + VoterAddition(voter?: string | null): VoterAdditionEventFilter; + + "VoterRemoval(address)"(voter?: string | null): VoterRemovalEventFilter; + VoterRemoval(voter?: string | null): VoterRemovalEventFilter; + }; + + estimateGas: { + MAX_OWNER_COUNT(overrides?: CallOverrides): Promise; + + addProposer( + proposer: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + addVoter( + voter: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + changeRequirement( + _required: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + confirmProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + confirmations( + arg0: BigNumberish, + arg1: string, + overrides?: CallOverrides + ): Promise; + + description(overrides?: CallOverrides): Promise; + + executeProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getConfirmationCount( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getConfirmations( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalCount( + pending: boolean, + executed: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getProposalIds( + from: BigNumberish, + to: BigNumberish, + pending: boolean, + executed: boolean, + overrides?: CallOverrides + ): Promise; + + getProposals( + from: BigNumberish, + to: BigNumberish, + pending: boolean, + executed: boolean, + overrides?: CallOverrides + ): Promise; + + getProposers(overrides?: CallOverrides): Promise; + + getRevenueSplit( + token: string, + overrides?: CallOverrides + ): Promise; + + getVoters(overrides?: CallOverrides): Promise; + + isConfirmed( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isProposer(arg0: string, overrides?: CallOverrides): Promise; + + isVoter(arg0: string, overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposers( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + removeProposer( + proposer: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeVoter( + voter: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + replaceVoter( + voter: string, + newVoter: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + required(overrides?: CallOverrides): Promise; + + revokeConfirmation( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + splitRevenue( + token: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + submitProposal( + destination: string, + value: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + voters(arg0: BigNumberish, overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + MAX_OWNER_COUNT(overrides?: CallOverrides): Promise; + + addProposer( + proposer: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + addVoter( + voter: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + changeRequirement( + _required: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + confirmProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + confirmations( + arg0: BigNumberish, + arg1: string, + overrides?: CallOverrides + ): Promise; + + description(overrides?: CallOverrides): Promise; + + executeProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getConfirmationCount( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getConfirmations( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalCount( + pending: boolean, + executed: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getProposalIds( + from: BigNumberish, + to: BigNumberish, + pending: boolean, + executed: boolean, + overrides?: CallOverrides + ): Promise; + + getProposals( + from: BigNumberish, + to: BigNumberish, + pending: boolean, + executed: boolean, + overrides?: CallOverrides + ): Promise; + + getProposers(overrides?: CallOverrides): Promise; + + getRevenueSplit( + token: string, + overrides?: CallOverrides + ): Promise; + + getVoters(overrides?: CallOverrides): Promise; + + isConfirmed( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isProposer( + arg0: string, + overrides?: CallOverrides + ): Promise; + + isVoter( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposers( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + removeProposer( + proposer: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + removeVoter( + voter: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + replaceVoter( + voter: string, + newVoter: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + required(overrides?: CallOverrides): Promise; + + revokeConfirmation( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + splitRevenue( + token: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + submitProposal( + destination: string, + value: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + voters( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/contracts/types/common.ts b/contracts/types/common.ts new file mode 100644 index 0000000..2fc40c7 --- /dev/null +++ b/contracts/types/common.ts @@ -0,0 +1,44 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { Listener } from "@ethersproject/providers"; +import type { Event, EventFilter } from "ethers"; + +export interface TypedEvent< + TArgsArray extends Array = any, + TArgsObject = any +> extends Event { + args: TArgsArray & TArgsObject; +} + +export interface TypedEventFilter<_TEvent extends TypedEvent> + extends EventFilter {} + +export interface TypedListener { + (...listenerArg: [...__TypechainArgsArray, TEvent]): void; +} + +type __TypechainArgsArray = T extends TypedEvent ? U : never; + +export interface OnEvent { + ( + eventFilter: TypedEventFilter, + listener: TypedListener + ): TRes; + (eventName: string, listener: Listener): TRes; +} + +export type MinEthersFactory = { + deploy(...a: ARGS[]): Promise; +}; + +export type GetContractTypeFromFactory = F extends MinEthersFactory< + infer C, + any +> + ? C + : never; + +export type GetARGsTypeFromFactory = F extends MinEthersFactory + ? Parameters + : never; diff --git a/contracts/types/factories/ERC20__factory.ts b/contracts/types/factories/ERC20__factory.ts new file mode 100644 index 0000000..179019f --- /dev/null +++ b/contracts/types/factories/ERC20__factory.ts @@ -0,0 +1,240 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { ERC20, ERC20Interface } from "../ERC20"; + +const _abi = [ + { + constant: true, + inputs: [], + name: "name", + outputs: [ + { + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_spender", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_from", + type: "address", + }, + { + name: "_to", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [ + { + name: "", + type: "uint8", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + name: "balance", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [ + { + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_to", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_owner", + type: "address", + }, + { + name: "_spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + payable: true, + stateMutability: "payable", + type: "fallback", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "owner", + type: "address", + }, + { + indexed: true, + name: "spender", + type: "address", + }, + { + indexed: false, + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "from", + type: "address", + }, + { + indexed: true, + name: "to", + type: "address", + }, + { + indexed: false, + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, +]; + +export class ERC20__factory { + static readonly abi = _abi; + static createInterface(): ERC20Interface { + return new utils.Interface(_abi) as ERC20Interface; + } + static connect(address: string, signerOrProvider: Signer | Provider): ERC20 { + return new Contract(address, _abi, signerOrProvider) as ERC20; + } +} diff --git a/contracts/types/factories/Factory__factory.ts b/contracts/types/factories/Factory__factory.ts new file mode 100644 index 0000000..9444282 --- /dev/null +++ b/contracts/types/factories/Factory__factory.ts @@ -0,0 +1,162 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { Factory, FactoryInterface } from "../Factory"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "instantiation", + type: "address", + }, + ], + name: "ContractInstantiation", + type: "event", + }, + { + inputs: [ + { + internalType: "string", + name: "_name", + type: "string", + }, + { + internalType: "string", + name: "_description", + type: "string", + }, + { + internalType: "address[]", + name: "_voters", + type: "address[]", + }, + { + internalType: "address[]", + name: "_proposers", + type: "address[]", + }, + { + internalType: "uint256", + name: "_required", + type: "uint256", + }, + ], + name: "create", + outputs: [ + { + internalType: "address", + name: "wallet", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "creator", + type: "address", + }, + ], + name: "getInstantiationCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "creator", + type: "address", + }, + ], + name: "getInstantiations", + outputs: [ + { + internalType: "address[]", + name: "", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "instantiations", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "isInstantiation", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +export class Factory__factory { + static readonly abi = _abi; + static createInterface(): FactoryInterface { + return new utils.Interface(_abi) as FactoryInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Factory { + return new Contract(address, _abi, signerOrProvider) as Factory; + } +} diff --git a/contracts/types/factories/JointVenture__factory.ts b/contracts/types/factories/JointVenture__factory.ts new file mode 100644 index 0000000..5a4b1c9 --- /dev/null +++ b/contracts/types/factories/JointVenture__factory.ts @@ -0,0 +1,817 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { JointVenture, JointVentureInterface } from "../JointVenture"; + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "_name", + type: "string", + }, + { + internalType: "string", + name: "_description", + type: "string", + }, + { + internalType: "address[]", + name: "_voters", + type: "address[]", + }, + { + internalType: "address[]", + name: "_proposers", + type: "address[]", + }, + { + internalType: "uint256", + name: "_required", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "Confirmation", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Deposit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "Execution", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ExecutionFailure", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "proposer", + type: "address", + }, + ], + name: "ProposerAddition", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "proposer", + type: "address", + }, + ], + name: "ProposerRemoval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "required", + type: "uint256", + }, + ], + name: "RequirementChange", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "revenue", + type: "uint256", + }, + { + indexed: false, + internalType: "address[]", + name: "voters", + type: "address[]", + }, + ], + name: "RevenueSplit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "Revocation", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "Submission", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + ], + name: "VoterAddition", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + ], + name: "VoterRemoval", + type: "event", + }, + { + inputs: [], + name: "MAX_OWNER_COUNT", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "proposer", + type: "address", + }, + ], + name: "addProposer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "voter", + type: "address", + }, + ], + name: "addVoter", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_required", + type: "uint256", + }, + ], + name: "changeRequirement", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "confirmProposal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "confirmations", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "description", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "executeProposal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "getConfirmationCount", + outputs: [ + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "getConfirmations", + outputs: [ + { + internalType: "address[]", + name: "_confirmations", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bool", + name: "pending", + type: "bool", + }, + { + internalType: "bool", + name: "executed", + type: "bool", + }, + ], + name: "getProposalCount", + outputs: [ + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "from", + type: "uint256", + }, + { + internalType: "uint256", + name: "to", + type: "uint256", + }, + { + internalType: "bool", + name: "pending", + type: "bool", + }, + { + internalType: "bool", + name: "executed", + type: "bool", + }, + ], + name: "getProposalIds", + outputs: [ + { + internalType: "uint256[]", + name: "_proposalIds", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "from", + type: "uint256", + }, + { + internalType: "uint256", + name: "to", + type: "uint256", + }, + { + internalType: "bool", + name: "pending", + type: "bool", + }, + { + internalType: "bool", + name: "executed", + type: "bool", + }, + ], + name: "getProposals", + outputs: [ + { + components: [ + { + internalType: "address", + name: "destination", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "bool", + name: "executed", + type: "bool", + }, + ], + internalType: "struct JointVenture.Proposal[]", + name: "_proposals", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getProposers", + outputs: [ + { + internalType: "address[]", + name: "", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "getRevenueSplit", + outputs: [ + { + internalType: "uint256", + name: "split", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getVoters", + outputs: [ + { + internalType: "address[]", + name: "", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "isConfirmed", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "isProposer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "isVoter", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proposalCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "proposals", + outputs: [ + { + internalType: "address", + name: "destination", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "bool", + name: "executed", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "proposers", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "proposer", + type: "address", + }, + ], + name: "removeProposer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "voter", + type: "address", + }, + ], + name: "removeVoter", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "voter", + type: "address", + }, + { + internalType: "address", + name: "newVoter", + type: "address", + }, + ], + name: "replaceVoter", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "required", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "revokeConfirmation", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "splitRevenue", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destination", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "submitProposal", + outputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "voters", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +]; + +export class JointVenture__factory { + static readonly abi = _abi; + static createInterface(): JointVentureInterface { + return new utils.Interface(_abi) as JointVentureInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): JointVenture { + return new Contract(address, _abi, signerOrProvider) as JointVenture; + } +} diff --git a/contracts/types/index.ts b/contracts/types/index.ts new file mode 100644 index 0000000..1ac85f7 --- /dev/null +++ b/contracts/types/index.ts @@ -0,0 +1,10 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ERC20 } from "./ERC20"; +export type { Factory } from "./Factory"; +export type { JointVenture } from "./JointVenture"; + +export { ERC20__factory } from "./factories/ERC20__factory"; +export { Factory__factory } from "./factories/Factory__factory"; +export { JointVenture__factory } from "./factories/JointVenture__factory"; diff --git a/pages/index.tsx b/pages/index.tsx index c792ace..9c6300f 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,11 +1,9 @@ -import { useWeb3React } from "@web3-react/core"; import Head from "next/head"; import Link from "next/link"; import Button from "../components/Shared/Button"; import { useRouter } from "next/dist/client/router"; function Home() { - const { account, library, deactivate, chainId, error } = useWeb3React(); const router = useRouter();