From 846513e5c59eb6551d9db6a7df537a76d3136baa Mon Sep 17 00:00:00 2001 From: solimander Date: Sun, 21 Jan 2024 11:42:53 -0700 Subject: [PATCH] Fix errors --- .../NounsAuctionHouseV2.json | 497 ++++++++++++++++++ packages/nouns-contracts/src/index.ts | 2 + packages/nouns-sdk/src/contract/index.ts | 1 + packages/nouns-webapp/src/index.tsx | 4 +- 4 files changed, 502 insertions(+), 2 deletions(-) create mode 100644 packages/nouns-contracts/abi/contracts/NounsAuctionHouseV2.sol/NounsAuctionHouseV2.json diff --git a/packages/nouns-contracts/abi/contracts/NounsAuctionHouseV2.sol/NounsAuctionHouseV2.json b/packages/nouns-contracts/abi/contracts/NounsAuctionHouseV2.sol/NounsAuctionHouseV2.json new file mode 100644 index 0000000000..1fcb09ef49 --- /dev/null +++ b/packages/nouns-contracts/abi/contracts/NounsAuctionHouseV2.sol/NounsAuctionHouseV2.json @@ -0,0 +1,497 @@ +[ + { + "type": "function", + "name": "auction", + "inputs": [], + "outputs": [ + { + "name": "nounId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "startTime", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "endTime", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "bidder", + "type": "address", + "internalType": "address payable" + }, + { + "name": "settled", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "createBid", + "inputs": [ + { + "name": "nounId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "createBidWithComment", + "inputs": [ + { + "name": "nounId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "comment", + "type": "string", + "internalType": "string" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "duration", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "_nouns", + "type": "address", + "internalType": "contract INounsToken" + }, + { + "name": "_weth", + "type": "address", + "internalType": "address" + }, + { + "name": "_timeBuffer", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_reservePrice", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_minBidIncrementPercentage", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "_duration", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "minBidIncrementPercentage", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint8", + "internalType": "uint8" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "nouns", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract INounsToken" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "reservePrice", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "setMinBidIncrementPercentage", + "inputs": [ + { + "name": "_minBidIncrementPercentage", + "type": "uint8", + "internalType": "uint8" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setReservePrice", + "inputs": [ + { + "name": "_reservePrice", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setTimeBuffer", + "inputs": [ + { + "name": "_timeBuffer", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "settleAuction", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "settleCurrentAndCreateNewAuction", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "timeBuffer", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "weth", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "AuctionBid", + "inputs": [ + { + "name": "nounId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "sender", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "extended", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AuctionBidComment", + "inputs": [ + { + "name": "comment", + "type": "string", + "indexed": false, + "internalType": "string" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AuctionCreated", + "inputs": [ + { + "name": "nounId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "startTime", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "endTime", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AuctionExtended", + "inputs": [ + { + "name": "nounId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "endTime", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AuctionMinBidIncrementPercentageUpdated", + "inputs": [ + { + "name": "minBidIncrementPercentage", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AuctionReservePriceUpdated", + "inputs": [ + { + "name": "reservePrice", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AuctionSettled", + "inputs": [ + { + "name": "nounId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "winner", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AuctionTimeBufferUpdated", + "inputs": [ + { + "name": "timeBuffer", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "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": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } +] diff --git a/packages/nouns-contracts/src/index.ts b/packages/nouns-contracts/src/index.ts index 3b91b127a8..c955ca8e8f 100644 --- a/packages/nouns-contracts/src/index.ts +++ b/packages/nouns-contracts/src/index.ts @@ -1,5 +1,6 @@ export { default as NounsTokenABI } from '../abi/contracts/NounsToken.sol/NounsToken.json'; export { default as NounsAuctionHouseABI } from '../abi/contracts/NounsAuctionHouse.sol/NounsAuctionHouse.json'; +export { default as NounsAuctionHouseV2ABI } from '../abi/contracts/NounsAuctionHouseV2.sol/NounsAuctionHouseV2.json'; export { default as NounsDescriptorABI } from '../abi/contracts/NounsDescriptor.sol/NounsDescriptor.json'; export { default as NounsSeederABI } from '../abi/contracts/NounsSeeder.sol/NounsSeeder.json'; export { default as NounsDAOABI } from '../abi/contracts/governance/NounsDAOLogicV1.sol/NounsDAOLogicV1.json'; @@ -9,6 +10,7 @@ export { default as NounsDAODataABI } from '../abi/contracts/governance/data/Nou export { default as NounsDAOExecutorV2ABI } from '../abi/contracts/governance/NounsDAOExecutorV2.sol/NounsDAOExecutorV2.json'; export { NounsToken__factory as NounsTokenFactory } from '../typechain/factories/contracts/NounsToken__factory'; export { NounsAuctionHouse__factory as NounsAuctionHouseFactory } from '../typechain/factories/contracts/NounsAuctionHouse__factory'; +export { NounsAuctionHouseV2__factory as NounsAuctionHouseV2Factory } from '../typechain/factories/contracts/NounsAuctionHouseV2__factory'; export { NounsDescriptor__factory as NounsDescriptorFactory } from '../typechain/factories/contracts/NounsDescriptor__factory'; export { NounsSeeder__factory as NounsSeederFactory } from '../typechain/factories/contracts/NounsSeeder__factory'; export { NounsDAOLogicV1__factory as NounsDaoLogicV1Factory } from '../typechain/factories/contracts/governance/NounsDAOLogicV1__factory'; diff --git a/packages/nouns-sdk/src/contract/index.ts b/packages/nouns-sdk/src/contract/index.ts index 193094c774..e5c1feaa7f 100644 --- a/packages/nouns-sdk/src/contract/index.ts +++ b/packages/nouns-sdk/src/contract/index.ts @@ -12,6 +12,7 @@ export { NounsDAOExecutorV2ABI, NounsTokenFactory, NounsAuctionHouseFactory, + NounsAuctionHouseV2Factory, NounsDescriptorFactory, NounsSeederFactory, NounsDaoLogicV1Factory, diff --git a/packages/nouns-webapp/src/index.tsx b/packages/nouns-webapp/src/index.tsx index 9b40617f4e..ce4e83bb17 100644 --- a/packages/nouns-webapp/src/index.tsx +++ b/packages/nouns-webapp/src/index.tsx @@ -35,7 +35,7 @@ import config, { } from './config'; import { WebSocketProvider } from '@ethersproject/providers'; import { BigNumber, BigNumberish, Event } from 'ethers'; -import { NounsAuctionHouseFactory } from '@nouns/sdk'; +import { NounsAuctionHouseV2Factory } from '@nouns/sdk'; import dotenv from 'dotenv'; import { useAppDispatch, useAppSelector } from './hooks'; import { appendBid } from './state/slices/auction'; @@ -131,7 +131,7 @@ const ChainSubscriber: React.FC = () => { const loadState = async () => { const wsProvider = new WebSocketProvider(config.app.wsRpcUri); - const nounsAuctionHouseContract = NounsAuctionHouseFactory.connect( + const nounsAuctionHouseContract = NounsAuctionHouseV2Factory.connect( config.addresses.nounsAuctionHouseProxy, wsProvider, );