diff --git a/.vscode/settings.json b/.vscode/settings.json index ed2c8d598..59dfdf791 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -30,6 +30,6 @@ }, "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" - } + }, } \ No newline at end of file diff --git a/apps/subgraph/schema.graphql b/apps/subgraph/schema.graphql index 1f829ebbf..0cd7e3579 100644 --- a/apps/subgraph/schema.graphql +++ b/apps/subgraph/schema.graphql @@ -16,6 +16,7 @@ type DAO @entity { totalAuctionSales: BigInt! auctionConfig: AuctionConfig! currentAuction: Auction + metadataProperties: [MetadataProperty!] owners: [DAOTokenOwner!]! @derivedFrom(field: "dao") tokens: [Token!]! @derivedFrom(field: "dao") proposals: [Proposal!]! @derivedFrom(field: "dao") @@ -73,6 +74,7 @@ type Proposal @entity { snapshotBlockNumber: BigInt! transactionHash: Bytes! votes: [ProposalVote!]! @derivedFrom(field: "proposal") + executionHash: Bytes } enum ProposalVoteSupport { @@ -120,3 +122,20 @@ type AuctionBid @entity { auction: Auction! bidTime: BigInt! } + +type MetadataProperty @entity { + id: ID! + dao: DAO! + names: [String!]! + items: [MetadataItem!]! @derivedFrom(field: "property") + ipfsBaseUri: String! + ipfsExtension: String! +} + +type MetadataItem @entity { + id: ID! + property: MetadataProperty! + propertyId: BigInt! + name: String! + isNewProperty: Boolean! +} diff --git a/apps/subgraph/src/governor.ts b/apps/subgraph/src/governor.ts index e87771f9e..46eb2b96b 100644 --- a/apps/subgraph/src/governor.ts +++ b/apps/subgraph/src/governor.ts @@ -83,6 +83,7 @@ export function handleProposalExecuted(event: ProposalExecutedEvent): void { let proposal = new Proposal(event.params.proposalId.toHexString()) proposal.executed = true proposal.queued = false + proposal.executionHash = event.transaction.hash proposal.save() } diff --git a/apps/subgraph/src/metadata.ts b/apps/subgraph/src/metadata.ts index 8e4c6c6a4..266db44d0 100644 --- a/apps/subgraph/src/metadata.ts +++ b/apps/subgraph/src/metadata.ts @@ -1,5 +1,6 @@ -import { DAO } from '../generated/schema' +import { DAO, MetadataItem, MetadataProperty } from '../generated/schema' import { + AddPropertiesCall as AddPropertiesFunctionCall, ContractImageUpdated as ContractImageUpdatedEvent, DescriptionUpdated as DescriptionUpdatedEvent, WebsiteURIUpdated as URIUpdatedEvent, @@ -26,3 +27,36 @@ export function handleDescriptionUpdated(event: DescriptionUpdatedEvent): void { dao.description = event.params.newDescription dao.save() } + +export function handleAddProperties(event: AddPropertiesFunctionCall): void { + let context = dataSource.context() + + let inputs = event.inputs + let dao = DAO.load(context.getString('tokenAddress'))! + let id = dao.id + inputs._ipfsGroup.baseUri + + let property = new MetadataProperty(id) + property.dao = dao.id + property.names = inputs._names + property.ipfsBaseUri = inputs._ipfsGroup.baseUri + property.ipfsExtension = inputs._ipfsGroup.extension + + for (let i = 0; i < inputs._items.length; i++) { + let input = inputs._items[i] + let item = new MetadataItem(id + '-' + i.toString()) + item.name = input.name + item.property = property.id + item.propertyId = input.propertyId + item.isNewProperty = input.isNewProperty + item.save() + } + + property.save() + + let properties: string[] = + dao.metadataProperties === null ? [] : dao.metadataProperties! + + properties.push(property.id) + dao.metadataProperties = properties + dao.save() +} diff --git a/apps/subgraph/subgraph.yaml.mustache b/apps/subgraph/subgraph.yaml.mustache index 6d07ecc4e..f8b10e853 100644 --- a/apps/subgraph/subgraph.yaml.mustache +++ b/apps/subgraph/subgraph.yaml.mustache @@ -104,6 +104,9 @@ templates: handler: handleDescriptionUpdated - event: WebsiteURIUpdated(string,string) handler: handleWebsiteURIUpdated + callHandlers: + - function: addProperties(string[],(uint256,string,bool)[],(string,string)) + handler: handleAddProperties file: ./src/metadata.ts - kind: ethereum name: Auction diff --git a/apps/web/.env b/apps/web/.env index 42056ac78..dab1da861 100644 --- a/apps/web/.env +++ b/apps/web/.env @@ -4,4 +4,4 @@ NEXT_PUBLIC_UPLOAD_API=https://upload-api.zora.co NEXT_PUBLIC_IPFS_GATEWAY=https://ipfs.decentralized-content.com NEXT_PUBLIC_CHAIN_ID=5 -NEXT_PUBLIC_NETWORK_TYPE=mainnet +NEXT_PUBLIC_NETWORK_TYPE=testnet diff --git a/apps/web/codegen.yml b/apps/web/codegen.yml index b91733aec..8e1b0e2ef 100644 --- a/apps/web/codegen.yml +++ b/apps/web/codegen.yml @@ -1,4 +1,4 @@ -schema: https://api.thegraph.com/subgraphs/name/neokry/nouns-builder-goerli +schema: https://api.goldsky.com/api/public/project_clkk1ucdyf6ak38svcatie9tf/subgraphs/nouns-builder-goerli-testnet/1.1.0/gn documents: 'src/data/subgraph/**/*.graphql' generates: src/data/subgraph/sdk.generated.ts: diff --git a/apps/web/package.json b/apps/web/package.json index 02a15aa7b..5f52e2418 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -47,6 +47,7 @@ "ioredis": "^5.2.3", "ipfs-http-client": "^59.0.0", "ipfs-service": "workspace:*", + "lanyard": "^1.1.2", "lodash": "^4.17.21", "multiformats": "9.9.0", "next": "^13.0.3", diff --git a/apps/web/src/constants/addresses.ts b/apps/web/src/constants/addresses.ts index 484487287..1c714ddf8 100644 --- a/apps/web/src/constants/addresses.ts +++ b/apps/web/src/constants/addresses.ts @@ -14,7 +14,7 @@ export const PUBLIC_MANAGER_ADDRESS = { [CHAIN_ID.GOERLI]: '0x0E9F3382Cf2508E3bc83248B5b4707FbA86D7Ee0' as AddressType, [CHAIN_ID.OPTIMISM_GOERLI]: '0x5f9c1e7E31875beAa6ba6B0AB573a4AbEcC95d67' as AddressType, [CHAIN_ID.BASE]: '0x3ac0e64fe2931f8e082c6bb29283540de9b5371c' as AddressType, - [CHAIN_ID.BASE_GOERLI]: '0x550c326d688fD51ae65AC6A2d48749E631023A03' as AddressType, + [CHAIN_ID.BASE_GOERLI]: '0xcce64c2b4c51c2894fe5df0dda3e34e4d850b699' as AddressType, [CHAIN_ID.ZORA]: '0x3ac0E64Fe2931f8e082C6Bb29283540DE9b5371C' as AddressType, [CHAIN_ID.ZORA_GOERLI]: '0xc521f85613985b7e417fccd5b348f64263d79397' as AddressType, [CHAIN_ID.FOUNDRY]: '0xd310a3041dfcf14def5ccbc508668974b5da7174' as AddressType, @@ -52,3 +52,24 @@ export const PUBLIC_ZORA_NFT_CREATOR = { } export const NULL_ADDRESS = '0x0000000000000000000000000000000000000000' as AddressType + +export const MERKLE_RESERVE_MINTER = + '0xa09790dba70fdad041c0901604c09a5c9efe2a9c' as AddressType + +export const MERKLE_METADATA_RENDERER = + '0xc422f3f254a86ee369066007bb3c5751cc29c95c' as AddressType + +export const L2_MIGRATION_DEPLOYER = + '0xed98171590dba48f6596f4743c2b7300a7091f9e' as AddressType + +export const L1_MESSENGERS = { + [CHAIN_ID.ETHEREUM]: '0x0000000000000000000000000000000000000000' as AddressType, + [CHAIN_ID.GOERLI]: '0x0000000000000000000000000000000000000000' as AddressType, + [CHAIN_ID.BASE]: '0x866E82a600A1414e583f7F13623F1aC5d58b0Afa' as AddressType, + [CHAIN_ID.BASE_GOERLI]: '0x8e5693140eA606bcEB98761d9beB1BC87383706D' as AddressType, + [CHAIN_ID.OPTIMISM]: '0xDa2332D0a7608919Cd331B1304Cd179129a90495' as AddressType, + [CHAIN_ID.OPTIMISM_GOERLI]: '0xDa2332D0a7608919Cd331B1304Cd179129a90495' as AddressType, + [CHAIN_ID.ZORA]: '0x363B4B1ADa52E50353f746999bd9E94395190d2C' as AddressType, + [CHAIN_ID.ZORA_GOERLI]: '0x9779A9D2f3B66A4F4d27cB99Ab6cC1266b3Ca9af' as AddressType, + [CHAIN_ID.FOUNDRY]: '0x0000000000000000000000000000000000000000' as AddressType, +} diff --git a/apps/web/src/constants/subgraph.ts b/apps/web/src/constants/subgraph.ts index 4282f3406..feee58151 100644 --- a/apps/web/src/constants/subgraph.ts +++ b/apps/web/src/constants/subgraph.ts @@ -2,17 +2,17 @@ import { CHAIN_ID } from 'src/typings' export const PUBLIC_SUBGRAPH_URL = { [CHAIN_ID.ETHEREUM]: - 'https://api.goldsky.com/api/public/project_clkk1ucdyf6ak38svcatie9tf/subgraphs/nouns-builder-ethereum-mainnet/stable/gn', + 'https://api.goldsky.com/api/public/project_clkk1ucdyf6ak38svcatie9tf/subgraphs/nouns-builder-ethereum-mainnet/1.1.0/gn', [CHAIN_ID.OPTIMISM]: 'https://api.goldsky.com/api/public/project_clkk1ucdyf6ak38svcatie9tf/subgraphs/nouns-builder-optimism-mainnet/stable/gn', [CHAIN_ID.GOERLI]: - 'https://api.goldsky.com/api/public/project_clkk1ucdyf6ak38svcatie9tf/subgraphs/nouns-builder-goerli-testnet/stable/gn', + 'https://api.goldsky.com/api/public/project_clkk1ucdyf6ak38svcatie9tf/subgraphs/nouns-builder-goerli-testnet/1.1.0/gn', [CHAIN_ID.OPTIMISM_GOERLI]: 'https://api.goldsky.com/api/public/project_clkk1ucdyf6ak38svcatie9tf/subgraphs/nouns-builder-optimism-testnet/stable/gn', [CHAIN_ID.BASE]: 'https://api.goldsky.com/api/public/project_clkk1ucdyf6ak38svcatie9tf/subgraphs/nouns-builder-base-mainnet/stable/gn', [CHAIN_ID.BASE_GOERLI]: - 'https://api.goldsky.com/api/public/project_clkk1ucdyf6ak38svcatie9tf/subgraphs/nouns-builder-base-testnet/stable/gn', + 'https://api.goldsky.com/api/public/project_clkk1ucdyf6ak38svcatie9tf/subgraphs/nouns-builder-base-sandbox/1.1.0/gn', [CHAIN_ID.ZORA]: 'https://api.goldsky.com/api/public/project_clkk1ucdyf6ak38svcatie9tf/subgraphs/nouns-builder-zora-mainnet/stable/gn', [CHAIN_ID.ZORA_GOERLI]: diff --git a/apps/web/src/constants/swrKeys.ts b/apps/web/src/constants/swrKeys.ts index e68df7dc8..20a9f7bed 100644 --- a/apps/web/src/constants/swrKeys.ts +++ b/apps/web/src/constants/swrKeys.ts @@ -21,6 +21,10 @@ const SWR_KEYS = { MEMBERS: 'members', TOKEN_IMAGE: 'token-image', DASHBOARD: 'dashboard', + METADATA_ATTRIBUTES_MERKLE_ROOT: 'metadata-attributes-merkle-root', + TOKEN_HOLDERS_MERKLE_ROOT: 'token-holders-merkle-root', + ENCODED_DAO_METADATA: 'encoded-dao-metadata', + DAO_MIGRATED: 'dao-migrated', DYNAMIC: { MY_DAOS(str: string) { return `my-daos-${str}` diff --git a/apps/web/src/data/contract/abis/Auction.ts b/apps/web/src/data/contract/abis/Auction.ts index 9d22284e6..978aef1e7 100644 --- a/apps/web/src/data/contract/abis/Auction.ts +++ b/apps/web/src/data/contract/abis/Auction.ts @@ -6,11 +6,26 @@ export const auctionAbi = [ name: '_manager', type: 'address', }, + { + internalType: 'address', + name: '_rewardsManager', + type: 'address', + }, { internalType: 'address', name: '_weth', type: 'address', }, + { + internalType: 'uint16', + name: '_builderRewardsBPS', + type: 'uint16', + }, + { + internalType: 'uint16', + name: '_referralRewardsBPS', + type: 'uint16', + }, ], stateMutability: 'payable', type: 'constructor', @@ -50,6 +65,11 @@ export const auctionAbi = [ name: 'AUCTION_SETTLED', type: 'error', }, + { + inputs: [], + name: 'CANNOT_CREATE_AUCTION', + type: 'error', + }, { inputs: [], name: 'DELEGATE_CALL_FAILED', @@ -70,6 +90,21 @@ export const auctionAbi = [ name: 'INSOLVENT', type: 'error', }, + { + inputs: [], + name: 'INVALID_REWARDS_BPS', + type: 'error', + }, + { + inputs: [], + name: 'INVALID_REWARDS_RECIPIENT', + type: 'error', + }, + { + inputs: [], + name: 'INVALID_REWARD_TOTAL', + type: 'error', + }, { inputs: [], name: 'INVALID_TARGET', @@ -271,6 +306,31 @@ export const auctionAbi = [ name: 'DurationUpdated', type: 'event', }, + { + anonymous: false, + inputs: [ + { + components: [ + { + internalType: 'address', + name: 'recipient', + type: 'address', + }, + { + internalType: 'uint16', + name: 'percentBps', + type: 'uint16', + }, + ], + indexed: false, + internalType: 'struct AuctionTypesV2.FounderReward', + name: 'reward', + type: 'tuple', + }, + ], + name: 'FounderRewardUpdated', + type: 'event', + }, { anonymous: false, inputs: [ @@ -464,6 +524,19 @@ export const auctionAbi = [ stateMutability: 'view', type: 'function', }, + { + inputs: [], + name: 'builderRewardsBPS', + outputs: [ + { + internalType: 'uint16', + name: '', + type: 'uint16', + }, + ], + stateMutability: 'view', + type: 'function', + }, { inputs: [], name: 'cancelOwnershipTransfer', @@ -497,6 +570,37 @@ export const auctionAbi = [ stateMutability: 'payable', type: 'function', }, + { + inputs: [ + { + internalType: 'uint256', + name: '_tokenId', + type: 'uint256', + }, + { + internalType: 'address', + name: '_referral', + type: 'address', + }, + ], + name: 'createBidWithReferral', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [], + name: 'currentBidReferral', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, { inputs: [], name: 'duration', @@ -510,6 +614,24 @@ export const auctionAbi = [ stateMutability: 'view', type: 'function', }, + { + inputs: [], + name: 'founderReward', + outputs: [ + { + internalType: 'address', + name: 'recipient', + type: 'address', + }, + { + internalType: 'uint16', + name: 'percentBps', + type: 'uint16', + }, + ], + stateMutability: 'view', + type: 'function', + }, { inputs: [ { @@ -537,6 +659,16 @@ export const auctionAbi = [ name: '_reservePrice', type: 'uint256', }, + { + internalType: 'address', + name: '_founderRewardRecipient', + type: 'address', + }, + { + internalType: 'uint16', + name: '_founderRewardBps', + type: 'uint16', + }, ], name: 'initialize', outputs: [], @@ -615,6 +747,19 @@ export const auctionAbi = [ stateMutability: 'view', type: 'function', }, + { + inputs: [], + name: 'referralRewardsBPS', + outputs: [ + { + internalType: 'uint16', + name: '', + type: 'uint16', + }, + ], + stateMutability: 'view', + type: 'function', + }, { inputs: [], name: 'reservePrice', @@ -654,6 +799,31 @@ export const auctionAbi = [ stateMutability: 'nonpayable', type: 'function', }, + { + inputs: [ + { + components: [ + { + internalType: 'address', + name: 'recipient', + type: 'address', + }, + { + internalType: 'uint16', + name: 'percentBps', + type: 'uint16', + }, + ], + internalType: 'struct AuctionTypesV2.FounderReward', + name: 'reward', + type: 'tuple', + }, + ], + name: 'setFounderReward', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, { inputs: [ { diff --git a/apps/web/src/data/contract/abis/Governor.ts b/apps/web/src/data/contract/abis/Governor.ts index b77a72d47..910b994b5 100644 --- a/apps/web/src/data/contract/abis/Governor.ts +++ b/apps/web/src/data/contract/abis/Governor.ts @@ -30,6 +30,11 @@ export const governorAbi = [ name: 'BELOW_PROPOSAL_THRESHOLD', type: 'error', }, + { + inputs: [], + name: 'CANNOT_DELAY_GOVERNANCE', + type: 'error', + }, { inputs: [], name: 'DELEGATE_CALL_FAILED', @@ -50,6 +55,11 @@ export const governorAbi = [ name: 'INVALID_CANCEL', type: 'error', }, + { + inputs: [], + name: 'INVALID_DELAYED_GOVERNANCE_EXPIRATION', + type: 'error', + }, { inputs: [], name: 'INVALID_PROPOSAL_THRESHOLD_BPS', @@ -131,6 +141,11 @@ export const governorAbi = [ name: 'ONLY_PROXY', type: 'error', }, + { + inputs: [], + name: 'ONLY_TOKEN_OWNER', + type: 'error', + }, { inputs: [], name: 'ONLY_UUPS', @@ -203,6 +218,30 @@ export const governorAbi = [ name: 'VOTING_NOT_STARTED', type: 'error', }, + { + inputs: [], + name: 'WAITING_FOR_TOKENS_TO_CLAIM_OR_EXPIRATION', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'prevTimestamp', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newTimestamp', + type: 'uint256', + }, + ], + name: 'DelayedGovernanceExpirationTimestampUpdated', + type: 'event', + }, { anonymous: false, inputs: [ @@ -600,6 +639,19 @@ export const governorAbi = [ stateMutability: 'view', type: 'function', }, + { + inputs: [], + name: 'MAX_DELAYED_GOVERNANCE_EXPIRATION', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, { inputs: [], name: 'MAX_PROPOSAL_THRESHOLD_BPS', @@ -866,6 +918,19 @@ export const governorAbi = [ stateMutability: 'pure', type: 'function', }, + { + inputs: [], + name: 'delayedGovernanceExpirationTimestamp', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, { inputs: [ { @@ -1412,6 +1477,19 @@ export const governorAbi = [ stateMutability: 'view', type: 'function', }, + { + inputs: [ + { + internalType: 'uint256', + name: '_newDelayedTimestamp', + type: 'uint256', + }, + ], + name: 'updateDelayedGovernanceExpirationTimestamp', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, { inputs: [ { diff --git a/apps/web/src/data/contract/abis/L1CrossDomainMessenger.ts b/apps/web/src/data/contract/abis/L1CrossDomainMessenger.ts new file mode 100644 index 000000000..5ef67fadf --- /dev/null +++ b/apps/web/src/data/contract/abis/L1CrossDomainMessenger.ts @@ -0,0 +1,407 @@ +export const messengerABI = [ + { + inputs: [ + { + internalType: 'contract OptimismPortal', + name: '_portal', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'msgHash', + type: 'bytes32', + }, + ], + name: 'FailedRelayedMessage', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint8', + name: 'version', + type: 'uint8', + }, + ], + name: 'Initialized', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'msgHash', + type: 'bytes32', + }, + ], + name: 'RelayedMessage', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'target', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'sender', + type: 'address', + }, + { + indexed: false, + internalType: 'bytes', + name: 'message', + type: 'bytes', + }, + { + indexed: false, + internalType: 'uint256', + name: 'messageNonce', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'gasLimit', + type: 'uint256', + }, + ], + name: 'SentMessage', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'sender', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + ], + name: 'SentMessageExtension1', + type: 'event', + }, + { + inputs: [], + name: 'MESSAGE_VERSION', + outputs: [ + { + internalType: 'uint16', + name: '', + type: 'uint16', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'MIN_GAS_CALLDATA_OVERHEAD', + outputs: [ + { + internalType: 'uint64', + name: '', + type: 'uint64', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR', + outputs: [ + { + internalType: 'uint64', + name: '', + type: 'uint64', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR', + outputs: [ + { + internalType: 'uint64', + name: '', + type: 'uint64', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'OTHER_MESSENGER', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'PORTAL', + outputs: [ + { + internalType: 'contract OptimismPortal', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'RELAY_CALL_OVERHEAD', + outputs: [ + { + internalType: 'uint64', + name: '', + type: 'uint64', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'RELAY_CONSTANT_OVERHEAD', + outputs: [ + { + internalType: 'uint64', + name: '', + type: 'uint64', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'RELAY_GAS_CHECK_BUFFER', + outputs: [ + { + internalType: 'uint64', + name: '', + type: 'uint64', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'RELAY_RESERVED_GAS', + outputs: [ + { + internalType: 'uint64', + name: '', + type: 'uint64', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes', + name: '_message', + type: 'bytes', + }, + { + internalType: 'uint32', + name: '_minGasLimit', + type: 'uint32', + }, + ], + name: 'baseGas', + outputs: [ + { + internalType: 'uint64', + name: '', + type: 'uint64', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + name: 'failedMessages', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'messageNonce', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_nonce', + type: 'uint256', + }, + { + internalType: 'address', + name: '_sender', + type: 'address', + }, + { + internalType: 'address', + name: '_target', + type: 'address', + }, + { + internalType: 'uint256', + name: '_value', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '_minGasLimit', + type: 'uint256', + }, + { + internalType: 'bytes', + name: '_message', + type: 'bytes', + }, + ], + name: 'relayMessage', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_target', + type: 'address', + }, + { + internalType: 'bytes', + name: '_message', + type: 'bytes', + }, + { + internalType: 'uint32', + name: '_minGasLimit', + type: 'uint32', + }, + ], + name: 'sendMessage', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + name: 'successfulMessages', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'version', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'xDomainMessageSender', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, +] as const diff --git a/apps/web/src/data/contract/abis/L2MigrationDeployer.ts b/apps/web/src/data/contract/abis/L2MigrationDeployer.ts new file mode 100644 index 000000000..b558b1d39 --- /dev/null +++ b/apps/web/src/data/contract/abis/L2MigrationDeployer.ts @@ -0,0 +1,371 @@ +export const L2DeployerABI = [ + { + inputs: [ + { + internalType: 'address', + name: '_manager', + type: 'address', + }, + { + internalType: 'address', + name: '_merkleMinter', + type: 'address', + }, + { + internalType: 'address', + name: '_crossDomainMessenger', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + inputs: [], + name: 'DAO_ALREADY_DEPLOYED', + type: 'error', + }, + { + inputs: [], + name: 'METADATA_CALLS_NOT_EXECUTED', + type: 'error', + }, + { + inputs: [], + name: 'METADATA_CALL_FAILED', + type: 'error', + }, + { + inputs: [], + name: 'NOT_CROSS_DOMAIN_MESSENGER', + type: 'error', + }, + { + inputs: [], + name: 'NO_DAO_DEPLOYED', + type: 'error', + }, + { + inputs: [], + name: 'TRANSFER_FAILED', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'token', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'deployer', + type: 'address', + }, + ], + name: 'DeployerSet', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'token', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'deployer', + type: 'address', + }, + ], + name: 'OwnershipRenounced', + type: 'event', + }, + { + inputs: [ + { + internalType: 'address', + name: 'l1Address', + type: 'address', + }, + ], + name: 'applyL1ToL2Alias', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes', + name: '_data', + type: 'bytes', + }, + ], + name: 'callMetadataRenderer', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'crossDomainDeployerToMigration', + outputs: [ + { + internalType: 'address', + name: 'tokenAddress', + type: 'address', + }, + { + internalType: 'uint256', + name: 'minimumMetadataCalls', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'executedMetadataCalls', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'crossDomainMessenger', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + components: [ + { + internalType: 'address', + name: 'wallet', + type: 'address', + }, + { + internalType: 'uint256', + name: 'ownershipPct', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'vestExpiry', + type: 'uint256', + }, + ], + internalType: 'struct IManager.FounderParams[]', + name: '_founderParams', + type: 'tuple[]', + }, + { + components: [ + { + internalType: 'bytes', + name: 'initStrings', + type: 'bytes', + }, + { + internalType: 'address', + name: 'metadataRenderer', + type: 'address', + }, + { + internalType: 'uint256', + name: 'reservedUntilTokenId', + type: 'uint256', + }, + ], + internalType: 'struct IManager.TokenParams', + name: '_tokenParams', + type: 'tuple', + }, + { + components: [ + { + internalType: 'uint256', + name: 'reservePrice', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'duration', + type: 'uint256', + }, + { + internalType: 'address', + name: 'founderRewardRecipent', + type: 'address', + }, + { + internalType: 'uint16', + name: 'founderRewardBps', + type: 'uint16', + }, + ], + internalType: 'struct IManager.AuctionParams', + name: '_auctionParams', + type: 'tuple', + }, + { + components: [ + { + internalType: 'uint256', + name: 'timelockDelay', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'votingDelay', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'votingPeriod', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'proposalThresholdBps', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'quorumThresholdBps', + type: 'uint256', + }, + { + internalType: 'address', + name: 'vetoer', + type: 'address', + }, + ], + internalType: 'struct IManager.GovParams', + name: '_govParams', + type: 'tuple', + }, + { + components: [ + { + internalType: 'uint64', + name: 'mintStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'mintEnd', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'pricePerToken', + type: 'uint64', + }, + { + internalType: 'bytes32', + name: 'merkleRoot', + type: 'bytes32', + }, + ], + internalType: 'struct MerkleReserveMinter.MerkleMinterSettings', + name: '_minterParams', + type: 'tuple', + }, + { + internalType: 'uint256', + name: '_delayedGovernanceAmount', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '_minimumMetadataCalls', + type: 'uint256', + }, + ], + name: 'deploy', + outputs: [ + { + internalType: 'address', + name: 'token', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'depositToTreasury', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [], + name: 'manager', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'merkleMinter', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'resetDeployment', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, +] as const diff --git a/apps/web/src/data/contract/abis/Manager.ts b/apps/web/src/data/contract/abis/Manager.ts index 1edc345cf..e640cef87 100644 --- a/apps/web/src/data/contract/abis/Manager.ts +++ b/apps/web/src/data/contract/abis/Manager.ts @@ -26,6 +26,11 @@ export const managerAbi = [ name: '_governorImpl', type: 'address', }, + { + internalType: 'address', + name: '_builderRewardsRecipient', + type: 'address', + }, ], stateMutability: 'payable', type: 'constructor', @@ -101,6 +106,11 @@ export const managerAbi = [ name: 'ONLY_PROXY', type: 'error', }, + { + inputs: [], + name: 'ONLY_TOKEN_OWNER', + type: 'error', + }, { inputs: [], name: 'ONLY_UUPS', @@ -161,6 +171,25 @@ export const managerAbi = [ name: 'Initialized', type: 'event', }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'sender', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'renderer', + type: 'address', + }, + ], + name: 'MetadataRendererUpdated', + type: 'event', + }, { anonymous: false, inputs: [ @@ -289,6 +318,19 @@ export const managerAbi = [ stateMutability: 'view', type: 'function', }, + { + inputs: [], + name: 'builderRewardsRecipient', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, { inputs: [], name: 'cancelOwnershipTransfer', @@ -340,6 +382,16 @@ export const managerAbi = [ name: 'initStrings', type: 'bytes', }, + { + internalType: 'address', + name: 'metadataRenderer', + type: 'address', + }, + { + internalType: 'uint256', + name: 'reservedUntilTokenId', + type: 'uint256', + }, ], internalType: 'struct IManager.TokenParams', name: '_tokenParams', @@ -357,6 +409,16 @@ export const managerAbi = [ name: 'duration', type: 'uint256', }, + { + internalType: 'address', + name: 'founderRewardRecipent', + type: 'address', + }, + { + internalType: 'uint16', + name: 'founderRewardBps', + type: 'uint16', + }, ], internalType: 'struct IManager.AuctionParams', name: '_auctionParams', @@ -702,6 +764,35 @@ export const managerAbi = [ stateMutability: 'nonpayable', type: 'function', }, + { + inputs: [ + { + internalType: 'address', + name: '_token', + type: 'address', + }, + { + internalType: 'address', + name: '_newRendererImpl', + type: 'address', + }, + { + internalType: 'bytes', + name: '_setupRenderer', + type: 'bytes', + }, + ], + name: 'setMetadataRenderer', + outputs: [ + { + internalType: 'address', + name: 'metadata', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, { inputs: [], name: 'tokenImpl', diff --git a/apps/web/src/data/contract/abis/MerklePropertyMetadata.ts b/apps/web/src/data/contract/abis/MerklePropertyMetadata.ts new file mode 100644 index 000000000..62510d647 --- /dev/null +++ b/apps/web/src/data/contract/abis/MerklePropertyMetadata.ts @@ -0,0 +1,917 @@ +export const merklePropertyMetadataAbi = [ + { + inputs: [ + { + internalType: 'address', + name: '_manager', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + inputs: [ + { + internalType: 'address', + name: 'target', + type: 'address', + }, + ], + name: 'AddressEmptyCode', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'implementation', + type: 'address', + }, + ], + name: 'ERC1967InvalidImplementation', + type: 'error', + }, + { + inputs: [], + name: 'ERC1967NonPayable', + type: 'error', + }, + { + inputs: [], + name: 'FailedInnerCall', + type: 'error', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + { + internalType: 'bytes32[]', + name: '', + type: 'bytes32[]', + }, + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + name: 'INVALID_MERKLE_PROOF', + type: 'error', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'selectedPropertyId', + type: 'uint256', + }, + ], + name: 'INVALID_PROPERTY_SELECTED', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'impl', + type: 'address', + }, + ], + name: 'INVALID_UPGRADE', + type: 'error', + }, + { + inputs: [], + name: 'InvalidInitialization', + type: 'error', + }, + { + inputs: [], + name: 'NotInitializing', + type: 'error', + }, + { + inputs: [], + name: 'ONE_PROPERTY_AND_ITEM_REQUIRED', + type: 'error', + }, + { + inputs: [], + name: 'ONLY_MANAGER', + type: 'error', + }, + { + inputs: [], + name: 'ONLY_OWNER', + type: 'error', + }, + { + inputs: [], + name: 'ONLY_TOKEN', + type: 'error', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'length', + type: 'uint256', + }, + ], + name: 'StringsInsufficientHexLength', + type: 'error', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'TOKEN_NOT_MINTED', + type: 'error', + }, + { + inputs: [], + name: 'TOO_MANY_PROPERTIES', + type: 'error', + }, + { + inputs: [], + name: 'UUPSUnauthorizedCallContext', + type: 'error', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'slot', + type: 'bytes32', + }, + ], + name: 'UUPSUnsupportedProxiableUUID', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + components: [ + { + internalType: 'string', + name: 'key', + type: 'string', + }, + { + internalType: 'string', + name: 'value', + type: 'string', + }, + { + internalType: 'bool', + name: 'quote', + type: 'bool', + }, + ], + indexed: false, + internalType: 'struct IBaseMetadata.AdditionalTokenProperty[]', + name: '_additionalJsonProperties', + type: 'tuple[]', + }, + ], + name: 'AdditionalTokenPropertiesSet', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'string', + name: 'prevImage', + type: 'string', + }, + { + indexed: false, + internalType: 'string', + name: 'newImage', + type: 'string', + }, + ], + name: 'ContractImageUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'string', + name: 'prevDescription', + type: 'string', + }, + { + indexed: false, + internalType: 'string', + name: 'newDescription', + type: 'string', + }, + ], + name: 'DescriptionUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint64', + name: 'version', + type: 'uint64', + }, + ], + name: 'Initialized', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + indexed: false, + internalType: 'string', + name: 'name', + type: 'string', + }, + ], + name: 'PropertyAdded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'string', + name: 'prevRendererBase', + type: 'string', + }, + { + indexed: false, + internalType: 'string', + name: 'newRendererBase', + type: 'string', + }, + ], + name: 'RendererBaseUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'implementation', + type: 'address', + }, + ], + name: 'Upgraded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'string', + name: 'lastURI', + type: 'string', + }, + { + indexed: false, + internalType: 'string', + name: 'newURI', + type: 'string', + }, + ], + name: 'WebsiteURIUpdated', + type: 'event', + }, + { + inputs: [], + name: 'UPGRADE_INTERFACE_VERSION', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string[]', + name: '_names', + type: 'string[]', + }, + { + components: [ + { + internalType: 'uint256', + name: 'propertyId', + type: 'uint256', + }, + { + internalType: 'string', + name: 'name', + type: 'string', + }, + { + internalType: 'bool', + name: 'isNewProperty', + type: 'bool', + }, + ], + internalType: 'struct IPropertyIPFS.ItemParam[]', + name: '_items', + type: 'tuple[]', + }, + { + components: [ + { + internalType: 'string', + name: 'baseUri', + type: 'string', + }, + { + internalType: 'string', + name: 'extension', + type: 'string', + }, + ], + internalType: 'struct IPropertyIPFS.IPFSGroup', + name: '_ipfsGroup', + type: 'tuple', + }, + ], + name: 'addProperties', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'attributeMerkleRoot', + outputs: [ + { + internalType: 'bytes32', + name: 'root', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'contractImage', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'contractURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string[]', + name: '_names', + type: 'string[]', + }, + { + components: [ + { + internalType: 'uint256', + name: 'propertyId', + type: 'uint256', + }, + { + internalType: 'string', + name: 'name', + type: 'string', + }, + { + internalType: 'bool', + name: 'isNewProperty', + type: 'bool', + }, + ], + internalType: 'struct IPropertyIPFS.ItemParam[]', + name: '_items', + type: 'tuple[]', + }, + { + components: [ + { + internalType: 'string', + name: 'baseUri', + type: 'string', + }, + { + internalType: 'string', + name: 'extension', + type: 'string', + }, + ], + internalType: 'struct IPropertyIPFS.IPFSGroup', + name: '_ipfsGroup', + type: 'tuple', + }, + ], + name: 'deleteAndRecreateProperties', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'description', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'getAdditionalTokenProperties', + outputs: [ + { + components: [ + { + internalType: 'string', + name: 'key', + type: 'string', + }, + { + internalType: 'string', + name: 'value', + type: 'string', + }, + { + internalType: 'bool', + name: 'quote', + type: 'bool', + }, + ], + internalType: 'struct IBaseMetadata.AdditionalTokenProperty[]', + name: '_additionalTokenProperties', + type: 'tuple[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_tokenId', + type: 'uint256', + }, + ], + name: 'getAttributes', + outputs: [ + { + internalType: 'string', + name: 'resultAttributes', + type: 'string', + }, + { + internalType: 'string', + name: 'queryString', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_tokenId', + type: 'uint256', + }, + ], + name: 'getRawAttributes', + outputs: [ + { + internalType: 'uint16[16]', + name: 'attributes', + type: 'uint16[16]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes', + name: '_initStrings', + type: 'bytes', + }, + { + internalType: 'address', + name: '_token', + type: 'address', + }, + ], + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'ipfsDataCount', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_propertyId', + type: 'uint256', + }, + ], + name: 'itemsCount', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_tokenId', + type: 'uint256', + }, + ], + name: 'onMinted', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'projectURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'propertiesCount', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'proxiableUUID', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'rendererBase', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + components: [ + { + internalType: 'string', + name: 'key', + type: 'string', + }, + { + internalType: 'string', + name: 'value', + type: 'string', + }, + { + internalType: 'bool', + name: 'quote', + type: 'bool', + }, + ], + internalType: 'struct IBaseMetadata.AdditionalTokenProperty[]', + name: '_additionalTokenProperties', + type: 'tuple[]', + }, + ], + name: 'setAdditionalTokenProperties', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'attributeMerkleRoot_', + type: 'bytes32', + }, + ], + name: 'setAttributeMerkleRoot', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + { + internalType: 'uint16[16]', + name: 'attributes', + type: 'uint16[16]', + }, + { + internalType: 'bytes32[]', + name: 'proof', + type: 'bytes32[]', + }, + ], + internalType: 'struct IMerklePropertyIPFS.SetAttributeParams', + name: '_params', + type: 'tuple', + }, + ], + name: 'setAttributes', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + { + internalType: 'uint16[16]', + name: 'attributes', + type: 'uint16[16]', + }, + { + internalType: 'bytes32[]', + name: 'proof', + type: 'bytes32[]', + }, + ], + internalType: 'struct IMerklePropertyIPFS.SetAttributeParams[]', + name: '_params', + type: 'tuple[]', + }, + ], + name: 'setManyAttributes', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes4', + name: '_interfaceId', + type: 'bytes4', + }, + ], + name: 'supportsInterface', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [], + name: 'token', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_tokenId', + type: 'uint256', + }, + ], + name: 'tokenURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string', + name: '_newContractImage', + type: 'string', + }, + ], + name: 'updateContractImage', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string', + name: '_newDescription', + type: 'string', + }, + ], + name: 'updateDescription', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string', + name: '_newProjectURI', + type: 'string', + }, + ], + name: 'updateProjectURI', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string', + name: '_newRendererBase', + type: 'string', + }, + ], + name: 'updateRendererBase', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'upgradeToAndCall', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, +] as const diff --git a/apps/web/src/data/contract/abis/Token.ts b/apps/web/src/data/contract/abis/Token.ts index 4fe22b5e6..85ba25a90 100644 --- a/apps/web/src/data/contract/abis/Token.ts +++ b/apps/web/src/data/contract/abis/Token.ts @@ -25,6 +25,16 @@ export const tokenAbi = [ name: 'ALREADY_MINTED', type: 'error', }, + { + inputs: [], + name: 'CANNOT_CHANGE_RESERVE', + type: 'error', + }, + { + inputs: [], + name: 'CANNOT_DECREASE_RESERVE', + type: 'error', + }, { inputs: [], name: 'DELEGATE_CALL_FAILED', @@ -156,6 +166,11 @@ export const tokenAbi = [ name: 'REENTRANCY', type: 'error', }, + { + inputs: [], + name: 'TOKEN_NOT_RESERVED', + type: 'error', + }, { inputs: [], name: 'UNSUPPORTED_UUID', @@ -304,6 +319,19 @@ export const tokenAbi = [ name: 'Initialized', type: 'event', }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'renderer', + type: 'address', + }, + ], + name: 'MetadataRendererUpdated', + type: 'event', + }, { anonymous: false, inputs: [ @@ -464,6 +492,19 @@ export const tokenAbi = [ name: 'OwnerUpdated', type: 'event', }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'reservedUntilTokenId', + type: 'uint256', + }, + ], + name: 'ReservedUntilTokenIDUpdated', + type: 'event', + }, { anonymous: false, inputs: [ @@ -881,6 +922,11 @@ export const tokenAbi = [ name: '_initStrings', type: 'bytes', }, + { + internalType: 'uint256', + name: '_reservedUntilTokenId', + type: 'uint256', + }, { internalType: 'address', name: '_metadataRenderer', @@ -995,6 +1041,24 @@ export const tokenAbi = [ stateMutability: 'nonpayable', type: 'function', }, + { + inputs: [ + { + internalType: 'address', + name: 'recipient', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'mintFromReserveTo', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, { inputs: [ { @@ -1130,6 +1194,32 @@ export const tokenAbi = [ stateMutability: 'view', type: 'function', }, + { + inputs: [], + name: 'remainingTokensInReserve', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'reservedUntilTokenId', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, { inputs: [ { @@ -1212,6 +1302,32 @@ export const tokenAbi = [ stateMutability: 'nonpayable', type: 'function', }, + { + inputs: [ + { + internalType: 'contract IBaseMetadata', + name: 'newRenderer', + type: 'address', + }, + ], + name: 'setMetadataRenderer', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'newReservedUntilTokenId', + type: 'uint256', + }, + ], + name: 'setReservedUntilTokenId', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, { inputs: [ { diff --git a/apps/web/src/data/contract/abis/index.ts b/apps/web/src/data/contract/abis/index.ts index d9e21717c..81a4e363c 100644 --- a/apps/web/src/data/contract/abis/index.ts +++ b/apps/web/src/data/contract/abis/index.ts @@ -4,3 +4,4 @@ export { managerAbi } from './Manager' export { tokenAbi } from './Token' export { treasuryAbi } from './Treasury' export { metadataAbi } from './Metadata' +export { merklePropertyMetadataAbi } from './MerklePropertyMetadata' diff --git a/apps/web/src/data/contract/chains.ts b/apps/web/src/data/contract/chains.ts index dd67cb23a..9d43e3aa4 100644 --- a/apps/web/src/data/contract/chains.ts +++ b/apps/web/src/data/contract/chains.ts @@ -7,7 +7,7 @@ import { PUBLIC_IS_TESTNET, base, zora, zoraGoerli } from 'src/constants/default import { RPC_URL } from 'src/constants/rpc' import { CHAIN_ID } from 'src/typings' -const MAINNET_CHAINS = [mainnet, zora, base, optimism] +const MAINNET_CHAINS = [mainnet, zora, base, optimism, baseGoerli] // Mainnet is required here due to hooks like useEnsData that only pull data from mainnet const TESTNET_CHAINS = [mainnet, goerli, optimismGoerli, baseGoerli, zoraGoerli] diff --git a/apps/web/src/data/contract/requests/getMetadataAttributes.ts b/apps/web/src/data/contract/requests/getMetadataAttributes.ts new file mode 100644 index 000000000..af813294c --- /dev/null +++ b/apps/web/src/data/contract/requests/getMetadataAttributes.ts @@ -0,0 +1,75 @@ +import { Address } from 'viem' +import { readContracts } from 'wagmi/actions' + +import { metadataAbi } from 'src/data/contract/abis' +import { CHAIN_ID } from 'src/typings' + +export const getMetadataAttributes = async ( + metadata: Address, + finalTokenId: bigint, + chainId: CHAIN_ID +) => { + let lengthRequests = [] + for (let currentTokenId = 0n; currentTokenId <= finalTokenId; currentTokenId++) { + lengthRequests.push({ + chainId, + address: metadata, + abi: metadataAbi, + functionName: 'attributes', + args: [currentTokenId, 0n], + }) + } + + const lengthResult = (await readContracts({ + contracts: lengthRequests, + allowFailure: false, + })) as number[] + + let attributeRequests = [] + for (let currentTokenId = 0; currentTokenId <= finalTokenId; currentTokenId++) { + for ( + let attributeId = 0; + attributeId <= lengthResult[currentTokenId]; + attributeId++ + ) { + attributeRequests.push({ + chainId, + address: metadata, + abi: metadataAbi, + functionName: 'attributes', + args: [BigInt(currentTokenId), BigInt(attributeId)], + }) + } + } + + const batchSize = 100 + const attributeResult: number[] = [] + + for (let i = 0; i < attributeRequests.length; i += batchSize) { + const batch = attributeRequests.slice(i, i + batchSize) + const batchResult = (await readContracts({ + contracts: batch, + allowFailure: false, + })) as number[] + attributeResult.push(...batchResult) + } + + const finalAttributes: number[][] = [] + + let currentTokenId = 0 + let indexForTokenId = 0 + + for (let i = 0; i < attributeResult.length; i++) { + if (!finalAttributes[currentTokenId]) finalAttributes[currentTokenId] = [] + finalAttributes[currentTokenId].push(attributeResult[i]) + + if (indexForTokenId === lengthResult[currentTokenId]) { + currentTokenId++ + indexForTokenId = 0 + } else { + indexForTokenId++ + } + } + + return finalAttributes +} diff --git a/apps/web/src/data/subgraph/queries/daoMembersList.graphql b/apps/web/src/data/subgraph/queries/daoMembersList.graphql index d57d90523..adf692a32 100644 --- a/apps/web/src/data/subgraph/queries/daoMembersList.graphql +++ b/apps/web/src/data/subgraph/queries/daoMembersList.graphql @@ -16,6 +16,7 @@ query daoMembersList( owner daoTokenCount daoTokens { + tokenId mintedAt } } diff --git a/apps/web/src/data/subgraph/queries/daoMetadata.graphql b/apps/web/src/data/subgraph/queries/daoMetadata.graphql new file mode 100644 index 000000000..f45ded5df --- /dev/null +++ b/apps/web/src/data/subgraph/queries/daoMetadata.graphql @@ -0,0 +1,14 @@ +query daoMetadata($tokenAddress: ID!, $first: Int!) { + dao(id: $tokenAddress) { + metadataProperties(orderBy: createdAt) { + ipfsBaseUri + ipfsExtension + names + items(orderBy: propertyId, first: $first) { + name + propertyId + isNewProperty + } + } + } +} diff --git a/apps/web/src/data/subgraph/requests/daoMetadata.ts b/apps/web/src/data/subgraph/requests/daoMetadata.ts new file mode 100644 index 000000000..0bbd616cc --- /dev/null +++ b/apps/web/src/data/subgraph/requests/daoMetadata.ts @@ -0,0 +1,33 @@ +import { encodeFunctionData } from 'viem' + +import { metadataAbi } from 'src/data/contract/abis' +import { AddressType, CHAIN_ID } from 'src/typings' + +import { SDK } from '../client' + +const allowedChains = [CHAIN_ID.ETHEREUM, CHAIN_ID.GOERLI] + +export const encodedDaoMetadataRequest = async ( + chain: CHAIN_ID, + tokenAddress: AddressType +) => { + if (!allowedChains.find((x) => x === chain)) throw new Error('Chain not supported') + + const res = await SDK.connect(chain) + .daoMetadata({ tokenAddress, first: 1000 }) + .then((x) => x.dao?.metadataProperties) + + if (!res) throw new Error('No metadata found') + + return res.map((property) => + encodeFunctionData({ + abi: metadataAbi, + functionName: 'addProperties', + args: [ + property.names, + property.items, + { baseUri: property.ipfsBaseUri, extension: property.ipfsExtension }, + ], + }) + ) +} diff --git a/apps/web/src/data/subgraph/requests/memberSnapshot.ts b/apps/web/src/data/subgraph/requests/memberSnapshot.ts new file mode 100644 index 000000000..c56c3aa7a --- /dev/null +++ b/apps/web/src/data/subgraph/requests/memberSnapshot.ts @@ -0,0 +1,38 @@ +import { SDK } from 'src/data/subgraph/client' +import { applyL1ToL2Alias } from 'src/modules/create-proposal/utils/applyL1ToL2Alias' +import { CHAIN_ID } from 'src/typings' + +import { DaoTokenOwner_OrderBy, OrderDirection } from '../sdk.generated' + +export type DaoMember = { + address: string + tokens: number[] +} + +export const memberSnapshotRequest = async ( + chainId: CHAIN_ID, + collectionAddress: string +): Promise => { + const data = await SDK.connect(chainId).daoMembersList({ + where: { + dao: collectionAddress, + }, + orderBy: DaoTokenOwner_OrderBy.DaoTokenCount, + orderDirection: OrderDirection.Desc, + }) + + if (!data.daotokenOwners) throw new Error('No token owner found') + + const formattedMembers = await Promise.all( + data.daotokenOwners.map(async (member) => { + let tokenOwner = await applyL1ToL2Alias(chainId, member.owner) + + return { + address: tokenOwner, + tokens: member.daoTokens.map((token) => token.tokenId), + } + }) + ) + + return formattedMembers +} diff --git a/apps/web/src/data/subgraph/sdk.generated.ts b/apps/web/src/data/subgraph/sdk.generated.ts index 5fc5cbf67..2c475fcd9 100644 --- a/apps/web/src/data/subgraph/sdk.generated.ts +++ b/apps/web/src/data/subgraph/sdk.generated.ts @@ -404,6 +404,7 @@ export type Dao = { governorAddress: Scalars['Bytes'] id: Scalars['ID'] metadataAddress: Scalars['Bytes'] + metadataProperties?: Maybe> name: Scalars['String'] ownerCount: Scalars['Int'] owners: Array @@ -426,6 +427,14 @@ export type DaoAuctionsArgs = { where?: InputMaybe } +export type DaoMetadataPropertiesArgs = { + first?: InputMaybe + orderBy?: InputMaybe + orderDirection?: InputMaybe + skip?: InputMaybe + where?: InputMaybe +} + export type DaoOwnersArgs = { first?: InputMaybe orderBy?: InputMaybe @@ -670,6 +679,13 @@ export type Dao_Filter = { metadataAddress_not?: InputMaybe metadataAddress_not_contains?: InputMaybe metadataAddress_not_in?: InputMaybe> + metadataProperties?: InputMaybe> + metadataProperties_?: InputMaybe + metadataProperties_contains?: InputMaybe> + metadataProperties_contains_nocase?: InputMaybe> + metadataProperties_not?: InputMaybe> + metadataProperties_not_contains?: InputMaybe> + metadataProperties_not_contains_nocase?: InputMaybe> name?: InputMaybe name_contains?: InputMaybe name_contains_nocase?: InputMaybe @@ -810,6 +826,7 @@ export enum Dao_OrderBy { GovernorAddress = 'governorAddress', Id = 'id', MetadataAddress = 'metadataAddress', + MetadataProperties = 'metadataProperties', Name = 'name', OwnerCount = 'ownerCount', Owners = 'owners', @@ -824,6 +841,237 @@ export enum Dao_OrderBy { TreasuryAddress = 'treasuryAddress', } +export type MetadataItem = { + __typename?: 'MetadataItem' + id: Scalars['ID'] + isNewProperty: Scalars['Boolean'] + name: Scalars['String'] + propertyId: Scalars['BigInt'] + propertyInfo: MetadataProperty +} + +export type MetadataItem_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe + and?: InputMaybe>> + id?: InputMaybe + id_gt?: InputMaybe + id_gte?: InputMaybe + id_in?: InputMaybe> + id_lt?: InputMaybe + id_lte?: InputMaybe + id_not?: InputMaybe + id_not_in?: InputMaybe> + isNewProperty?: InputMaybe + isNewProperty_in?: InputMaybe> + isNewProperty_not?: InputMaybe + isNewProperty_not_in?: InputMaybe> + name?: InputMaybe + name_contains?: InputMaybe + name_contains_nocase?: InputMaybe + name_ends_with?: InputMaybe + name_ends_with_nocase?: InputMaybe + name_gt?: InputMaybe + name_gte?: InputMaybe + name_in?: InputMaybe> + name_lt?: InputMaybe + name_lte?: InputMaybe + name_not?: InputMaybe + name_not_contains?: InputMaybe + name_not_contains_nocase?: InputMaybe + name_not_ends_with?: InputMaybe + name_not_ends_with_nocase?: InputMaybe + name_not_in?: InputMaybe> + name_not_starts_with?: InputMaybe + name_not_starts_with_nocase?: InputMaybe + name_starts_with?: InputMaybe + name_starts_with_nocase?: InputMaybe + or?: InputMaybe>> + propertyId?: InputMaybe + propertyId_gt?: InputMaybe + propertyId_gte?: InputMaybe + propertyId_in?: InputMaybe> + propertyId_lt?: InputMaybe + propertyId_lte?: InputMaybe + propertyId_not?: InputMaybe + propertyId_not_in?: InputMaybe> + propertyInfo?: InputMaybe + propertyInfo_?: InputMaybe + propertyInfo_contains?: InputMaybe + propertyInfo_contains_nocase?: InputMaybe + propertyInfo_ends_with?: InputMaybe + propertyInfo_ends_with_nocase?: InputMaybe + propertyInfo_gt?: InputMaybe + propertyInfo_gte?: InputMaybe + propertyInfo_in?: InputMaybe> + propertyInfo_lt?: InputMaybe + propertyInfo_lte?: InputMaybe + propertyInfo_not?: InputMaybe + propertyInfo_not_contains?: InputMaybe + propertyInfo_not_contains_nocase?: InputMaybe + propertyInfo_not_ends_with?: InputMaybe + propertyInfo_not_ends_with_nocase?: InputMaybe + propertyInfo_not_in?: InputMaybe> + propertyInfo_not_starts_with?: InputMaybe + propertyInfo_not_starts_with_nocase?: InputMaybe + propertyInfo_starts_with?: InputMaybe + propertyInfo_starts_with_nocase?: InputMaybe +} + +export enum MetadataItem_OrderBy { + Id = 'id', + IsNewProperty = 'isNewProperty', + Name = 'name', + PropertyId = 'propertyId', + PropertyInfo = 'propertyInfo', + PropertyInfoCreatedAt = 'propertyInfo__createdAt', + PropertyInfoDeleted = 'propertyInfo__deleted', + PropertyInfoId = 'propertyInfo__id', + PropertyInfoIpfsBaseUri = 'propertyInfo__ipfsBaseUri', + PropertyInfoIpfsExtension = 'propertyInfo__ipfsExtension', +} + +export type MetadataProperty = { + __typename?: 'MetadataProperty' + createdAt: Scalars['BigInt'] + dao: Dao + deleted: Scalars['Boolean'] + id: Scalars['ID'] + ipfsBaseUri: Scalars['String'] + ipfsExtension: Scalars['String'] + items: Array + names: Array +} + +export type MetadataPropertyItemsArgs = { + first?: InputMaybe + orderBy?: InputMaybe + orderDirection?: InputMaybe + skip?: InputMaybe + where?: InputMaybe +} + +export type MetadataProperty_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe + and?: InputMaybe>> + createdAt?: InputMaybe + createdAt_gt?: InputMaybe + createdAt_gte?: InputMaybe + createdAt_in?: InputMaybe> + createdAt_lt?: InputMaybe + createdAt_lte?: InputMaybe + createdAt_not?: InputMaybe + createdAt_not_in?: InputMaybe> + dao?: InputMaybe + dao_?: InputMaybe + dao_contains?: InputMaybe + dao_contains_nocase?: InputMaybe + dao_ends_with?: InputMaybe + dao_ends_with_nocase?: InputMaybe + dao_gt?: InputMaybe + dao_gte?: InputMaybe + dao_in?: InputMaybe> + dao_lt?: InputMaybe + dao_lte?: InputMaybe + dao_not?: InputMaybe + dao_not_contains?: InputMaybe + dao_not_contains_nocase?: InputMaybe + dao_not_ends_with?: InputMaybe + dao_not_ends_with_nocase?: InputMaybe + dao_not_in?: InputMaybe> + dao_not_starts_with?: InputMaybe + dao_not_starts_with_nocase?: InputMaybe + dao_starts_with?: InputMaybe + dao_starts_with_nocase?: InputMaybe + deleted?: InputMaybe + deleted_in?: InputMaybe> + deleted_not?: InputMaybe + deleted_not_in?: InputMaybe> + id?: InputMaybe + id_gt?: InputMaybe + id_gte?: InputMaybe + id_in?: InputMaybe> + id_lt?: InputMaybe + id_lte?: InputMaybe + id_not?: InputMaybe + id_not_in?: InputMaybe> + ipfsBaseUri?: InputMaybe + ipfsBaseUri_contains?: InputMaybe + ipfsBaseUri_contains_nocase?: InputMaybe + ipfsBaseUri_ends_with?: InputMaybe + ipfsBaseUri_ends_with_nocase?: InputMaybe + ipfsBaseUri_gt?: InputMaybe + ipfsBaseUri_gte?: InputMaybe + ipfsBaseUri_in?: InputMaybe> + ipfsBaseUri_lt?: InputMaybe + ipfsBaseUri_lte?: InputMaybe + ipfsBaseUri_not?: InputMaybe + ipfsBaseUri_not_contains?: InputMaybe + ipfsBaseUri_not_contains_nocase?: InputMaybe + ipfsBaseUri_not_ends_with?: InputMaybe + ipfsBaseUri_not_ends_with_nocase?: InputMaybe + ipfsBaseUri_not_in?: InputMaybe> + ipfsBaseUri_not_starts_with?: InputMaybe + ipfsBaseUri_not_starts_with_nocase?: InputMaybe + ipfsBaseUri_starts_with?: InputMaybe + ipfsBaseUri_starts_with_nocase?: InputMaybe + ipfsExtension?: InputMaybe + ipfsExtension_contains?: InputMaybe + ipfsExtension_contains_nocase?: InputMaybe + ipfsExtension_ends_with?: InputMaybe + ipfsExtension_ends_with_nocase?: InputMaybe + ipfsExtension_gt?: InputMaybe + ipfsExtension_gte?: InputMaybe + ipfsExtension_in?: InputMaybe> + ipfsExtension_lt?: InputMaybe + ipfsExtension_lte?: InputMaybe + ipfsExtension_not?: InputMaybe + ipfsExtension_not_contains?: InputMaybe + ipfsExtension_not_contains_nocase?: InputMaybe + ipfsExtension_not_ends_with?: InputMaybe + ipfsExtension_not_ends_with_nocase?: InputMaybe + ipfsExtension_not_in?: InputMaybe> + ipfsExtension_not_starts_with?: InputMaybe + ipfsExtension_not_starts_with_nocase?: InputMaybe + ipfsExtension_starts_with?: InputMaybe + ipfsExtension_starts_with_nocase?: InputMaybe + items_?: InputMaybe + names?: InputMaybe> + names_contains?: InputMaybe> + names_contains_nocase?: InputMaybe> + names_not?: InputMaybe> + names_not_contains?: InputMaybe> + names_not_contains_nocase?: InputMaybe> + or?: InputMaybe>> +} + +export enum MetadataProperty_OrderBy { + CreatedAt = 'createdAt', + Dao = 'dao', + DaoAuctionAddress = 'dao__auctionAddress', + DaoContractImage = 'dao__contractImage', + DaoDescription = 'dao__description', + DaoGovernorAddress = 'dao__governorAddress', + DaoId = 'dao__id', + DaoMetadataAddress = 'dao__metadataAddress', + DaoName = 'dao__name', + DaoOwnerCount = 'dao__ownerCount', + DaoProjectUri = 'dao__projectURI', + DaoProposalCount = 'dao__proposalCount', + DaoSymbol = 'dao__symbol', + DaoTokenAddress = 'dao__tokenAddress', + DaoTotalAuctionSales = 'dao__totalAuctionSales', + DaoTotalSupply = 'dao__totalSupply', + DaoTreasuryAddress = 'dao__treasuryAddress', + Deleted = 'deleted', + Id = 'id', + IpfsBaseUri = 'ipfsBaseUri', + IpfsExtension = 'ipfsExtension', + Items = 'items', + Names = 'names', +} + /** Defines the order direction, either ascending or descending */ export enum OrderDirection { Asc = 'asc', @@ -1329,6 +1577,10 @@ export type Query = { daos: Array daotokenOwner?: Maybe daotokenOwners: Array + metadataItem?: Maybe + metadataItems: Array + metadataProperties: Array + metadataProperty?: Maybe proposal?: Maybe proposalVote?: Maybe proposalVotes: Array @@ -1421,6 +1673,38 @@ export type QueryDaotokenOwnersArgs = { where?: InputMaybe } +export type QueryMetadataItemArgs = { + block?: InputMaybe + id: Scalars['ID'] + subgraphError?: _SubgraphErrorPolicy_ +} + +export type QueryMetadataItemsArgs = { + block?: InputMaybe + first?: InputMaybe + orderBy?: InputMaybe + orderDirection?: InputMaybe + skip?: InputMaybe + subgraphError?: _SubgraphErrorPolicy_ + where?: InputMaybe +} + +export type QueryMetadataPropertiesArgs = { + block?: InputMaybe + first?: InputMaybe + orderBy?: InputMaybe + orderDirection?: InputMaybe + skip?: InputMaybe + subgraphError?: _SubgraphErrorPolicy_ + where?: InputMaybe +} + +export type QueryMetadataPropertyArgs = { + block?: InputMaybe + id: Scalars['ID'] + subgraphError?: _SubgraphErrorPolicy_ +} + export type QueryProposalArgs = { block?: InputMaybe id: Scalars['ID'] @@ -1483,6 +1767,10 @@ export type Subscription = { daos: Array daotokenOwner?: Maybe daotokenOwners: Array + metadataItem?: Maybe + metadataItems: Array + metadataProperties: Array + metadataProperty?: Maybe proposal?: Maybe proposalVote?: Maybe proposalVotes: Array @@ -1575,6 +1863,38 @@ export type SubscriptionDaotokenOwnersArgs = { where?: InputMaybe } +export type SubscriptionMetadataItemArgs = { + block?: InputMaybe + id: Scalars['ID'] + subgraphError?: _SubgraphErrorPolicy_ +} + +export type SubscriptionMetadataItemsArgs = { + block?: InputMaybe + first?: InputMaybe + orderBy?: InputMaybe + orderDirection?: InputMaybe + skip?: InputMaybe + subgraphError?: _SubgraphErrorPolicy_ + where?: InputMaybe +} + +export type SubscriptionMetadataPropertiesArgs = { + block?: InputMaybe + first?: InputMaybe + orderBy?: InputMaybe + orderDirection?: InputMaybe + skip?: InputMaybe + subgraphError?: _SubgraphErrorPolicy_ + where?: InputMaybe +} + +export type SubscriptionMetadataPropertyArgs = { + block?: InputMaybe + id: Scalars['ID'] + subgraphError?: _SubgraphErrorPolicy_ +} + export type SubscriptionProposalArgs = { block?: InputMaybe id: Scalars['ID'] @@ -2008,10 +2328,34 @@ export type DaoMembersListQuery = { id: string owner: any daoTokenCount: number - daoTokens: Array<{ __typename?: 'Token'; mintedAt: any }> + daoTokens: Array<{ __typename?: 'Token'; tokenId: any; mintedAt: any }> }> } +export type DaoMetadataQueryVariables = Exact<{ + tokenAddress: Scalars['ID'] + first: Scalars['Int'] +}> + +export type DaoMetadataQuery = { + __typename?: 'Query' + dao?: { + __typename?: 'DAO' + metadataProperties?: Array<{ + __typename?: 'MetadataProperty' + ipfsBaseUri: string + ipfsExtension: string + names: Array + items: Array<{ + __typename?: 'MetadataItem' + name: string + propertyId: any + isNewProperty: boolean + }> + }> | null + } | null +} + export type DaoOgMetadataQueryVariables = Exact<{ tokenAddress: Scalars['ID'] }> @@ -2521,11 +2865,28 @@ export const DaoMembersListDocument = gql` owner daoTokenCount daoTokens { + tokenId mintedAt } } } ` +export const DaoMetadataDocument = gql` + query daoMetadata($tokenAddress: ID!, $first: Int!) { + dao(id: $tokenAddress) { + metadataProperties(orderBy: createdAt) { + ipfsBaseUri + ipfsExtension + names + items(orderBy: propertyId, first: $first) { + name + propertyId + isNewProperty + } + } + } + } +` export const DaoOgMetadataDocument = gql` query daoOGMetadata($tokenAddress: ID!) { dao(id: $tokenAddress) { @@ -2826,6 +3187,20 @@ export function getSdk( 'query' ) }, + daoMetadata( + variables: DaoMetadataQueryVariables, + requestHeaders?: Dom.RequestInit['headers'] + ): Promise { + return withWrapper( + (wrappedRequestHeaders) => + client.request(DaoMetadataDocument, variables, { + ...requestHeaders, + ...wrappedRequestHeaders, + }), + 'daoMetadata', + 'query' + ) + }, daoOGMetadata( variables: DaoOgMetadataQueryVariables, requestHeaders?: Dom.RequestInit['headers'] diff --git a/apps/web/src/modules/auction/components/Auction.tsx b/apps/web/src/modules/auction/components/Auction.tsx index 302b7f227..545762ee0 100644 --- a/apps/web/src/modules/auction/components/Auction.tsx +++ b/apps/web/src/modules/auction/components/Auction.tsx @@ -1,4 +1,5 @@ import { Flex, Grid } from '@zoralabs/zord' +import axios from 'axios' import React, { Fragment, ReactNode } from 'react' import useSWR from 'swr' import { formatEther } from 'viem' @@ -7,8 +8,10 @@ import { readContract } from 'wagmi/actions' import SWR_KEYS from 'src/constants/swrKeys' import { auctionAbi } from 'src/data/contract/abis' import { getBids } from 'src/data/subgraph/requests/getBids' +import { useDaoStore } from 'src/modules/dao' +import { L2MigratedResponse } from 'src/pages/api/migrated' import { TokenWithDao } from 'src/pages/dao/[network]/[token]/[tokenId]' -import { AddressType, Chain } from 'src/typings' +import { AddressType, CHAIN_ID, Chain } from 'src/typings' import { unpackOptionalArray } from 'src/utils/helpers' import { useAuctionEvents } from '../hooks' @@ -20,6 +23,7 @@ import { AuctionTokenPicker } from './AuctionTokenPicker' import { BidAmount } from './BidAmount' import { ActionsWrapper, BidHistory } from './BidHistory' import { CurrentAuction } from './CurrentAuction' +import { DaoMigrated } from './DaoMigrated' import { WinningBidder } from './WinningBidder' interface AuctionControllerProps { @@ -30,6 +34,8 @@ interface AuctionControllerProps { viewSwitcher?: ReactNode } +const L1_CHAINS = [CHAIN_ID.ETHEREUM, CHAIN_ID.GOERLI] + export const Auction: React.FC = ({ chain, auctionAddress, @@ -41,6 +47,18 @@ export const Auction: React.FC = ({ const bidAmount = token.auction?.winningBid?.amount const tokenPrice = bidAmount ? formatEther(bidAmount) : undefined + const { treasury } = useDaoStore((x) => x.addresses) + + const { data: migrated } = useSWR( + L1_CHAINS.find((x) => x === chain.id) && treasury + ? [SWR_KEYS.DAO_MIGRATED, treasury] + : null, + (_, treasury) => + axios + .get(`/api/migrated?l1Treasury=${treasury}`) + .then((x) => x.data) + ) + const { data: auction } = useSWR( [SWR_KEYS.AUCTION, chain.id, auctionAddress], (_, chainId, auctionAddress) => @@ -114,7 +132,7 @@ export const Auction: React.FC = ({ - + {migrated ? : } )} diff --git a/apps/web/src/modules/auction/components/DaoMigrated.tsx b/apps/web/src/modules/auction/components/DaoMigrated.tsx new file mode 100644 index 000000000..4126ed305 --- /dev/null +++ b/apps/web/src/modules/auction/components/DaoMigrated.tsx @@ -0,0 +1,30 @@ +import { Box, Stack, atoms } from '@zoralabs/zord' +import Link from 'next/link' + +import { Icon } from 'src/components/Icon' +import { PUBLIC_ALL_CHAINS } from 'src/constants/defaultChains' +import { L2MigratedResponse } from 'src/pages/api/migrated' + +export const DaoMigrated = ({ migrated }: { migrated: L2MigratedResponse }) => { + const migratedToChain = PUBLIC_ALL_CHAINS.find((x) => x.id === migrated.chainId) + + return ( + + + This DAO has been migrated to L2. + + + + View DAO on L2 + + + + + ) +} diff --git a/apps/web/src/modules/create-dao/components/ReviewAndDeploy/ReviewAndDeploy.tsx b/apps/web/src/modules/create-dao/components/ReviewAndDeploy/ReviewAndDeploy.tsx index cd5c6d5e6..cc1de96e0 100644 --- a/apps/web/src/modules/create-dao/components/ReviewAndDeploy/ReviewAndDeploy.tsx +++ b/apps/web/src/modules/create-dao/components/ReviewAndDeploy/ReviewAndDeploy.tsx @@ -106,7 +106,11 @@ export const ReviewAndDeploy: React.FC = ({ title }) => { ] ) - const tokenParams = { initStrings: ethers.utils.hexlify(tokenParamsHex) as AddressType } + const tokenParams = { + initStrings: ethers.utils.hexlify(tokenParamsHex) as AddressType, + metadataRenderer: NULL_ADDRESS, + reservedUntilTokenId: 0n, + } const auctionParams = { reservePrice: auctionSettings.auctionReservePrice @@ -115,6 +119,8 @@ export const ReviewAndDeploy: React.FC = ({ title }) => { duration: auctionSettings?.auctionDuration ? BigInt(toSeconds(auctionSettings?.auctionDuration)) : BigInt('86400'), + founderRewardRecipent: NULL_ADDRESS, + founderRewardBps: 0, } const govParams = { diff --git a/apps/web/src/modules/create-proposal/components/Queue/Queue.tsx b/apps/web/src/modules/create-proposal/components/Queue/Queue.tsx index f09c1fc0e..f5c23ce2e 100644 --- a/apps/web/src/modules/create-proposal/components/Queue/Queue.tsx +++ b/apps/web/src/modules/create-proposal/components/Queue/Queue.tsx @@ -38,6 +38,8 @@ export const Queue: React.FC = ({ setQueueModalOpen }) => { removeAllTransactions() } + console.log(transactions) + return ( diff --git a/apps/web/src/modules/create-proposal/components/ReviewProposalForm/Transactions.tsx b/apps/web/src/modules/create-proposal/components/ReviewProposalForm/Transactions.tsx index c82f89ba4..d81827a50 100644 --- a/apps/web/src/modules/create-proposal/components/ReviewProposalForm/Transactions.tsx +++ b/apps/web/src/modules/create-proposal/components/ReviewProposalForm/Transactions.tsx @@ -49,7 +49,6 @@ export const Transactions = ({ const failedIndexes = simulations.map((result) => result.index) const matrix = createIndexedMatrix(transactions) const mapped = createMap(simulations) - return ( diff --git a/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/MigrateDAOForm.tsx b/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/MigrateDAOForm.tsx new file mode 100644 index 000000000..3e5feeee4 --- /dev/null +++ b/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/MigrateDAOForm.tsx @@ -0,0 +1,98 @@ +import { Box, Button, Flex, Spinner, Text } from '@zoralabs/zord' +import { useState } from 'react' + +import { + defaultHelperTextStyle, + defaultInputLabelStyle, +} from 'src/components/Fields/styles.css' +import { TransactionType } from 'src/modules/create-proposal/constants' +import { usePrepareMigration } from 'src/modules/create-proposal/hooks/usePrepareMigration' +import { useProposalStore } from 'src/modules/create-proposal/stores' +import { CHAIN_ID } from 'src/typings' + +import { DropdownSelect } from '../../DropdownSelect' + +const chainOptions = [{ label: 'BASE_GOERLI', value: CHAIN_ID.BASE_GOERLI }] + +export interface MigrationDAOFormProps { + currentTokenId: bigint + memberMerkleRoot: `0x${string}` +} + +export const MigrateDAOForm = () => { + const [migratingToChainId, setMigratingToChainId] = useState( + CHAIN_ID.BASE_GOERLI + ) + const addTransaction = useProposalStore((state) => state.addTransaction) + + const { transactions, error } = usePrepareMigration({ + migratingToChainId, + }) + + const handleSubmit = () => { + if (!transactions) return + addTransaction({ + type: TransactionType.MIGRATION, + summary: 'Migrate to L2', + transactions, + }) + } + + const handleChainChange = (value: CHAIN_ID) => { + setMigratingToChainId(value) + } + + const loading = !transactions && !error + + return ( + + + This step will deploy a mirror of this DAO on the L2 of your choice, and create a + snapshot for members to claim their tokens.{' '} + + Learn more + + + + + + + + + + {error && ( + + An unexpected error has occured please try again + + )} + + + + ) +} diff --git a/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/Migration.tsx b/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/Migration.tsx new file mode 100644 index 000000000..1aef034b7 --- /dev/null +++ b/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/Migration.tsx @@ -0,0 +1,54 @@ +import { Stack } from '@zoralabs/zord' +import { useBalance, useContractRead } from 'wagmi' + +import { auctionAbi } from 'src/data/contract/abis' +import { useDaoStore } from 'src/modules/dao/stores/useDaoStore' +import { useChainStore } from 'src/stores/useChainStore' +import { AddressType } from 'src/typings' + +import { MigrateDAOForm } from './MigrateDAOForm' +import { MigrationTracker } from './MigrationTracker' +import { PauseAuctionsForm } from './PauseAuctionsForm' + +export enum DAOMigrationProgress { + DEFAULT = 0, + PAUSED = 1, + DEPLOYED = 2, + FINALIZED = 3, +} + +const formComponents = [, ] + +export const Migration: React.FC = () => { + const chain = useChainStore((x) => x.chain) + const { + addresses: { treasury, auction }, + } = useDaoStore() + + const { data: treasuryBalance } = useBalance({ + address: treasury as `0x${string}`, + chainId: chain.id, + }) + + const { data: paused } = useContractRead({ + abi: auctionAbi, + address: auction as AddressType, + functionName: 'paused', + chainId: chain.id, + }) + + const deployed = false + const treasuryMigrated = treasuryBalance && treasuryBalance.value < 1000000000000000 + + let daoProgress = DAOMigrationProgress.FINALIZED + if (!paused) daoProgress = DAOMigrationProgress.DEFAULT + else if (!deployed) daoProgress = DAOMigrationProgress.PAUSED + else if (!treasuryMigrated) daoProgress = DAOMigrationProgress.DEPLOYED + + return ( + + + {formComponents[daoProgress]} + + ) +} diff --git a/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/MigrationTracker.tsx b/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/MigrationTracker.tsx new file mode 100644 index 000000000..2abced516 --- /dev/null +++ b/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/MigrationTracker.tsx @@ -0,0 +1,37 @@ +import { Box, Flex } from '@zoralabs/zord' + +export const MigrationTracker: React.FC<{ checkpoint: number }> = ({ checkpoint }) => { + const sections = ['Pause Auctions', 'Deploy to L2', 'Bridge Treasury'] + return ( + + + {sections.map((section, i) => ( + + i ? 'positive' : 'text1'} + backgroundColor={checkpoint > i ? 'positive' : 'transparent'} + borderRadius={'round'} + borderWidth={'normal'} + height={'x4'} + width={'x4'} + /> + + {section} + + + ))} + + + + ) +} diff --git a/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/PauseAuctionsForm.tsx b/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/PauseAuctionsForm.tsx new file mode 100644 index 000000000..065067d58 --- /dev/null +++ b/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/PauseAuctionsForm.tsx @@ -0,0 +1,125 @@ +import { Box, Button, Flex, Paragraph, Text } from '@zoralabs/zord' +import { useState } from 'react' +import { encodeFunctionData } from 'viem' +import { useContractRead } from 'wagmi' + +import { defaultHelperTextStyle } from 'src/components/Fields/styles.css' +import { Icon } from 'src/components/Icon/Icon' +import { auctionAbi, governorAbi } from 'src/data/contract/abis' +import { useProposalStore } from 'src/modules/create-proposal' +import { TransactionType } from 'src/modules/create-proposal/constants' +import { useDaoStore } from 'src/modules/dao' +import { useChainStore } from 'src/stores/useChainStore' +import { AddressType } from 'src/typings' +import { toSeconds } from 'src/utils/helpers' + +import { checkboxStyleVariants } from '../ReplaceArtwork/ReplaceArtworkForm.css' + +export const PauseAuctionsForm = () => { + const { auction, governor } = useDaoStore((state) => state.addresses) + const addTransaction = useProposalStore((state) => state.addTransaction) + const chain = useChainStore((x) => x.chain) + const { data: paused } = useContractRead({ + abi: auctionAbi, + address: auction, + chainId: chain.id, + functionName: 'paused', + }) + + const [reduceDelay, setReduceDelay] = useState(false) + + const handlePauseAuctionsTransaction = () => { + const pause = { + target: auction as AddressType, + functionSignature: 'pause()', + calldata: encodeFunctionData({ + abi: auctionAbi, + functionName: 'pause', + }), + value: '', + } + + addTransaction({ + type: TransactionType.PAUSE_AUCTIONS, + summary: 'Pause auctions', + transactions: [pause], + }) + + const votingPeriod = { + target: governor as AddressType, + functionSignature: 'updateVotingPeriod', + calldata: encodeFunctionData({ + abi: governorAbi, + functionName: 'updateVotingPeriod', + args: [BigInt(toSeconds({ days: 2 }))], + }), + value: '', + } + + const votingDelay = { + target: governor as AddressType, + functionSignature: 'updateVotingDelay', + calldata: encodeFunctionData({ + abi: governorAbi, + functionName: 'updateVotingDelay', + args: [BigInt(toSeconds({ days: 2 }))], + }), + value: '', + } + + if (reduceDelay) { + addTransaction({ + type: TransactionType.CUSTOM, + summary: 'Change Voting Period to 2 Days', + transactions: [votingPeriod], + }) + addTransaction({ + type: TransactionType.CUSTOM, + summary: 'Change Voting Delay to 2 Days', + transactions: [votingDelay], + }) + } + } + + return ( + + {paused ? ( + + + It looks like auctions are already paused for this DAO. + + + ) : ( + + In order to start the migration, you first need to pause auctions. In parallel, + we also recommend reducing the voting delay and period so you can quickly start + the bridging transaction after this proposal goes through.{' '} + + Learn more + + + )} + + setReduceDelay((bool) => !bool)} + > + {reduceDelay && } + + (OPTIONAL) Reduce voting delay and voting period to 2 days each. + + + + ) +} diff --git a/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/index.ts b/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/index.ts new file mode 100644 index 000000000..81d9aa2e5 --- /dev/null +++ b/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/index.ts @@ -0,0 +1 @@ +export * from './Migration' diff --git a/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/prepareMigrationDeploy.ts b/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/prepareMigrationDeploy.ts new file mode 100644 index 000000000..948de4c28 --- /dev/null +++ b/apps/web/src/modules/create-proposal/components/TransactionForm/Migration/prepareMigrationDeploy.ts @@ -0,0 +1,203 @@ +import { encodeAbiParameters, parseAbiParameters } from 'viem' +import { readContracts } from 'wagmi' + +import { NULL_ADDRESS } from 'src/constants/addresses' +import { + auctionAbi, + governorAbi, + metadataAbi, + tokenAbi, + treasuryAbi, +} from 'src/data/contract/abis' +import { DaoContractAddresses } from 'src/modules/dao' +import { AddressType, BytesType, CHAIN_ID } from 'src/typings' +import { unpackOptionalArray } from 'src/utils/helpers' + +export async function prepareMigrationDeploy( + chainId: CHAIN_ID, + addresses: DaoContractAddresses, + deployer: AddressType, + metadata: AddressType, + merkleRoot: BytesType +) { + const contracts = setupContracts({ + addresses: addresses as Required, + chainId, + }) + const contractData = await fetchContractData({ contracts }) + return transformContractData({ + contractData, + merkleRoot, + metadata, + deployer, + }) +} + +const transformContractData = ({ + contractData, + metadata, + merkleRoot, + deployer, +}: { + contractData: Awaited> + metadata: AddressType + merkleRoot: BytesType + deployer: AddressType +}) => { + const [ + name, + symbol, + existingFounders, + daoImage, + description, + projectURI, + duration, + reservePrice, + auction, + votingDelay, + votingPeriod, + proposalThresholdBps, + quorumThresholdBps, + vetoer, + timelockDelay, + ] = unpackOptionalArray(contractData, 15) + + const [tokenId] = unpackOptionalArray(auction, 6) + + const L2DAOAddressZeroFounder = { + wallet: deployer, + ownershipPct: 0n, + vestExpiry: BigInt(Math.floor(new Date('2040-01-01').getTime() / 1000)), + } + + const founderParams = existingFounders + ? [ + L2DAOAddressZeroFounder, + ...existingFounders.map((x) => ({ + wallet: x.wallet, + ownershipPct: BigInt(x.ownershipPct), + vestExpiry: BigInt(x.vestExpiry), + })), + ] + : [L2DAOAddressZeroFounder] + + const minterParams = { + mintStart: 0n, + mintEnd: 18446744073709551615n, + pricePerToken: 0n, + merkleRoot: merkleRoot, + } + + const tokenInitStrings = encodeAbiParameters( + parseAbiParameters( + 'string name, string symbol, string description, string daoImage, string daoWebsite, string baseRenderer' + ), + [ + name!, + symbol!, + description!, + daoImage!, + projectURI!, + 'https://api.zora.co/renderer/stack-images', + ] + ) + + const tokenParams = { + initStrings: tokenInitStrings as AddressType, + reservedUntilTokenId: tokenId! + 1n, + metadataRenderer: metadata, + } + + const auctionParams = { + reservePrice: reservePrice!, + duration: BigInt(duration!), + founderRewardRecipent: NULL_ADDRESS, + founderRewardBps: 0, + } + + const govParams = { + timelockDelay: timelockDelay!, + votingDelay: votingDelay!, + votingPeriod: votingPeriod!, + proposalThresholdBps: proposalThresholdBps!, + quorumThresholdBps: quorumThresholdBps!, + vetoer: vetoer!, + } + + return { + token: tokenParams, + founder: founderParams, + auction: auctionParams, + gov: govParams, + minter: minterParams, + } +} + +const fetchContractData = async ({ + contracts, +}: { + contracts: ReturnType +}) => { + return await readContracts({ + allowFailure: false, + contracts: [ + { ...contracts.token, functionName: 'name' }, + { ...contracts.token, functionName: 'symbol' }, + { ...contracts.token, functionName: 'getFounders' }, + { ...contracts.metadata, functionName: 'contractImage' }, + { ...contracts.metadata, functionName: 'description' }, + { ...contracts.metadata, functionName: 'projectURI' }, + { ...contracts.auction, functionName: 'duration' }, + { ...contracts.auction, functionName: 'reservePrice' }, + { ...contracts.auction, functionName: 'auction' }, + { ...contracts.governor, functionName: 'votingDelay' }, + { ...contracts.governor, functionName: 'votingPeriod' }, + { ...contracts.governor, functionName: 'proposalThresholdBps' }, + { ...contracts.governor, functionName: 'quorumThresholdBps' }, + { ...contracts.governor, functionName: 'vetoer' }, + { ...contracts.treasury, functionName: 'delay' }, + ] as const, + }) +} + +const setupContracts = ({ + addresses, + chainId, +}: { + addresses: Required + chainId: CHAIN_ID +}) => { + const token = { + abi: tokenAbi, + address: addresses.token, + chainId, + } + const metadata = { + abi: metadataAbi, + address: addresses.metadata, + chainId, + } + const auction = { + abi: auctionAbi, + address: addresses.auction, + chainId, + } + const governor = { + abi: governorAbi, + address: addresses.governor, + chainId, + } + const treasury = { + abi: treasuryAbi, + address: addresses.treasury, + chainId, + } + + return { + token, + metadata, + auction, + governor, + treasury, + } +} diff --git a/apps/web/src/modules/create-proposal/components/TransactionForm/TransactionForm.tsx b/apps/web/src/modules/create-proposal/components/TransactionForm/TransactionForm.tsx index 6dcdb2cf6..683c2e1b4 100644 --- a/apps/web/src/modules/create-proposal/components/TransactionForm/TransactionForm.tsx +++ b/apps/web/src/modules/create-proposal/components/TransactionForm/TransactionForm.tsx @@ -5,6 +5,7 @@ import { TransactionType } from 'src/modules/create-proposal/constants' import { Airdrop } from './Airdrop' import { CustomTransaction } from './CustomTransaction' import { Droposal } from './Droposal' +import { Migration } from './Migration' import { PauseAuctions } from './PauseAuctions' import { ReplaceArtwork } from './ReplaceArtwork' import { SendEth } from './SendEth' @@ -21,6 +22,7 @@ export const TRANSACTION_FORM_OPTIONS = [ TransactionType.PAUSE_AUCTIONS, TransactionType.REPLACE_ARTWORK, TransactionType.DROPOSAL, + TransactionType.MIGRATION, TransactionType.CUSTOM, ] as const @@ -32,6 +34,7 @@ export const TransactionForm = ({ type }: TransactionFormProps) => { [TransactionType.SEND_ETH]: , [TransactionType.PAUSE_AUCTIONS]: , [TransactionType.REPLACE_ARTWORK]: , + [TransactionType.MIGRATION]: , } return <>{FORMS[type]} diff --git a/apps/web/src/modules/create-proposal/constants/transactionType.tsx b/apps/web/src/modules/create-proposal/constants/transactionType.tsx index 72ba231ab..2fffa4059 100644 --- a/apps/web/src/modules/create-proposal/constants/transactionType.tsx +++ b/apps/web/src/modules/create-proposal/constants/transactionType.tsx @@ -11,6 +11,7 @@ export enum TransactionType { PAUSE_AUCTIONS = 'pause-auctions', UPDATE_MINTER = 'update-minter', REPLACE_ARTWORK = 'replace-artwork', + MIGRATION = 'migration', } export interface TransactionTypeProps { @@ -68,4 +69,10 @@ export const TRANSACTION_TYPES = { icon: 'plus', iconBackdrop: color.ghostHover, }, + [TransactionType.MIGRATION]: { + title: 'Migration', + subTitle: 'Migrate from L1 to L2', + icon: 'download', + iconBackdrop: 'rgba(350,100,0,.1)', + }, } as TransactionTypesPropsMap diff --git a/apps/web/src/modules/create-proposal/constants/versions.ts b/apps/web/src/modules/create-proposal/constants/versions.ts index 9386f6749..068c5d30e 100644 --- a/apps/web/src/modules/create-proposal/constants/versions.ts +++ b/apps/web/src/modules/create-proposal/constants/versions.ts @@ -46,6 +46,11 @@ export const CONTRACT_VERSION_ADDRESSES = { } export const CONTRACT_VERSION_DETAILS: ContractVersion = { + '2.0.0': { + description: + 'This release upgrades the DAO to V2 to add several features, improvements and bug fixes.', + date: '2024-01-08', + }, '1.2.0': { description: 'This release upgrades the DAO to V1.2 to add several features, improvements and bug fixes.', diff --git a/apps/web/src/modules/create-proposal/hooks/useFetchCurrentDAOConfig.tsx b/apps/web/src/modules/create-proposal/hooks/useFetchCurrentDAOConfig.tsx new file mode 100644 index 000000000..6b84840b0 --- /dev/null +++ b/apps/web/src/modules/create-proposal/hooks/useFetchCurrentDAOConfig.tsx @@ -0,0 +1,191 @@ +import useSWRImmutable from 'swr/immutable' +import { encodeAbiParameters, parseAbiParameters } from 'viem' +import { useContractReads } from 'wagmi' + +import { + L2_MIGRATION_DEPLOYER, + MERKLE_METADATA_RENDERER, + NULL_ADDRESS, +} from 'src/constants/addresses' +import { + auctionAbi, + governorAbi, + metadataAbi, + tokenAbi, + treasuryAbi, +} from 'src/data/contract/abis' +import { DaoContractAddresses } from 'src/modules/dao' +import { AddressType, CHAIN_ID } from 'src/typings' +import { unpackOptionalArray } from 'src/utils/helpers' + +import { applyL1ToL2Alias } from '../utils/applyL1ToL2Alias' + +export const useFetchCurrentDAOConfig = ({ + chainId, + currentAddresses, +}: { + chainId: CHAIN_ID + currentAddresses: DaoContractAddresses +}) => { + const contracts = setupContracts({ + addresses: currentAddresses as Required, + chainId, + }) + + const { data } = useContractReads({ + allowFailure: false, + contracts: [ + { ...contracts.token, functionName: 'name' }, + { ...contracts.token, functionName: 'symbol' }, + { ...contracts.token, functionName: 'getFounders' }, + { ...contracts.metadata, functionName: 'contractImage' }, + { ...contracts.metadata, functionName: 'description' }, + { ...contracts.metadata, functionName: 'projectURI' }, + { ...contracts.auction, functionName: 'duration' }, + { ...contracts.auction, functionName: 'reservePrice' }, + { ...contracts.auction, functionName: 'auction' }, + { ...contracts.governor, functionName: 'votingDelay' }, + { ...contracts.governor, functionName: 'votingPeriod' }, + { ...contracts.governor, functionName: 'proposalThresholdBps' }, + { ...contracts.governor, functionName: 'quorumThresholdBps' }, + { ...contracts.governor, functionName: 'vetoer' }, + { ...contracts.treasury, functionName: 'delay' }, + ] as const, + }) + + const [ + name, + symbol, + existingFounders, + daoImage, + description, + projectURI, + duration, + reservePrice, + auction, + votingDelay, + votingPeriod, + proposalThresholdBps, + quorumThresholdBps, + vetoer, + timelockDelay, + ] = unpackOptionalArray(data, 15) + + const [tokenId] = unpackOptionalArray(auction, 6) + + const { data: foundersAliased, error: foundersError } = useSWRImmutable( + existingFounders && existingFounders.length > 0 ? [existingFounders] : undefined, + (founders) => { + return Promise.all( + founders.map(async (x) => { + return { ...x, wallet: await applyL1ToL2Alias(chainId, x.wallet) } + }) + ) + } + ) + + if (!data || foundersError) return undefined + + // We need to add the migration helper config as a founder so it can handle setting up metadata on L2 + const L2MigrationDeployerFounderConfig = { + wallet: L2_MIGRATION_DEPLOYER, + ownershipPct: 0n, + vestExpiry: 0n, + } + + const founderParams = foundersAliased + ? [ + L2MigrationDeployerFounderConfig, + ...foundersAliased.map((x) => ({ + wallet: x.wallet, + ownershipPct: BigInt(x.ownershipPct), + vestExpiry: BigInt(x.vestExpiry), + })), + ] + : [L2MigrationDeployerFounderConfig] + + const tokenInitStrings = encodeAbiParameters( + parseAbiParameters( + 'string name, string symbol, string description, string daoImage, string daoWebsite, string baseRenderer' + ), + [ + name!, + symbol!, + description!, + daoImage!, + projectURI!, + 'https://api.zora.co/renderer/stack-images', + ] + ) + + const tokenParams = { + initStrings: tokenInitStrings as AddressType, + reservedUntilTokenId: tokenId! + 1n, + metadataRenderer: MERKLE_METADATA_RENDERER, + } + + const auctionParams = { + reservePrice: reservePrice!, + duration: BigInt(duration!), + founderRewardRecipent: NULL_ADDRESS, + founderRewardBps: 0, + } + + const govParams = { + timelockDelay: timelockDelay!, + votingDelay: votingDelay!, + votingPeriod: votingPeriod!, + proposalThresholdBps: proposalThresholdBps!, + quorumThresholdBps: quorumThresholdBps!, + vetoer: vetoer!, + } + + return { + tokenParams, + founderParams, + auctionParams, + govParams, + } +} + +const setupContracts = ({ + addresses, + chainId, +}: { + addresses: Required + chainId: CHAIN_ID +}) => { + const token = { + abi: tokenAbi, + address: addresses.token, + chainId, + } + const metadata = { + abi: metadataAbi, + address: addresses.metadata, + chainId, + } + const auction = { + abi: auctionAbi, + address: addresses.auction, + chainId, + } + const governor = { + abi: governorAbi, + address: addresses.governor, + chainId, + } + const treasury = { + abi: treasuryAbi, + address: addresses.treasury, + chainId, + } + + return { + token, + metadata, + auction, + governor, + treasury, + } +} diff --git a/apps/web/src/modules/create-proposal/hooks/usePrepareMigration.tsx b/apps/web/src/modules/create-proposal/hooks/usePrepareMigration.tsx new file mode 100644 index 000000000..f5c566223 --- /dev/null +++ b/apps/web/src/modules/create-proposal/hooks/usePrepareMigration.tsx @@ -0,0 +1,219 @@ +import axios from 'axios' +import useSWRImmutable from 'swr/immutable' +import { encodeFunctionData } from 'viem' +import { useContractRead } from 'wagmi' + +import { L1_MESSENGERS, L2_MIGRATION_DEPLOYER } from 'src/constants/addresses' +import SWR_KEYS from 'src/constants/swrKeys' +import { auctionAbi, merklePropertyMetadataAbi } from 'src/data/contract/abis' +import { messengerABI } from 'src/data/contract/abis/L1CrossDomainMessenger' +import { L2DeployerABI } from 'src/data/contract/abis/L2MigrationDeployer' +import { encodedDaoMetadataRequest } from 'src/data/subgraph/requests/daoMetadata' +import { DaoMember } from 'src/data/subgraph/requests/memberSnapshot' +import { Transaction } from 'src/modules/create-proposal/stores' +import { useDaoStore } from 'src/modules/dao' +import { useChainStore } from 'src/stores/useChainStore' +import { AddressType, BytesType, CHAIN_ID } from 'src/typings' +import { unpackOptionalArray } from 'src/utils/helpers' + +import { prepareAttributesMerkleRoot } from '../utils/prepareAttributesMerkleRoot' +import { prepareMemberMerkleRoot } from '../utils/prepareMemberMerkleRoot' +import { useFetchCurrentDAOConfig } from './useFetchCurrentDAOConfig' + +const UINT_64_MAX = 18446744073709551615n + +export const usePrepareMigration = ({ + migratingToChainId, +}: { + migratingToChainId: CHAIN_ID +}): { transactions: Transaction[] | undefined; error: Error | undefined } => { + const { id: currentChainId } = useChainStore((x) => x.chain) + const { addresses: currentAddresses } = useDaoStore() + + const currentDAOConfig = useFetchCurrentDAOConfig({ + chainId: currentChainId, + currentAddresses, + }) + + const { data } = useContractRead({ + abi: auctionAbi, + address: currentAddresses.auction as AddressType, + functionName: 'auction', + chainId: currentChainId, + }) + + const [currentTokenId] = unpackOptionalArray(data, 6) + + const { data: attributesMerkleRoot, error: attributesError } = useSWRImmutable( + currentTokenId && currentAddresses.metadata + ? [ + SWR_KEYS.METADATA_ATTRIBUTES_MERKLE_ROOT, + currentAddresses.metadata, + currentTokenId, + currentChainId, + ] + : undefined, + async (_, metadata, tokenId, chainId) => { + const attributes = await axios + .get( + `/api/migrate/attributes?metadata=${metadata}&chainId=${chainId}&finalTokenId=${tokenId}` + ) + .then((x) => x.data) + return prepareAttributesMerkleRoot(attributes) + } + ) + + const { data: memberMerkleRoot, error: memberError } = useSWRImmutable( + currentAddresses.token + ? [SWR_KEYS.TOKEN_HOLDERS_MERKLE_ROOT, currentAddresses.token, currentChainId] + : undefined, + async () => { + const snapshot = await axios + .get( + `/api/migrate/snapshot?token=${currentAddresses.token}&chainId=${currentChainId}` + ) + .then((x) => x.data) + return prepareMemberMerkleRoot(snapshot) + } + ) + + const { data: encodedMetadata, error: metadataError } = useSWRImmutable( + currentAddresses.token + ? [SWR_KEYS.ENCODED_DAO_METADATA, currentAddresses.token, currentChainId] + : undefined, + async (_, token, chainId) => encodedDaoMetadataRequest(chainId, token) + ) + + if (!attributesMerkleRoot || !memberMerkleRoot || !currentDAOConfig || !encodedMetadata) + return { + transactions: undefined, + error: attributesError || memberError || metadataError, + } + + const minterParams = { + mintStart: 0n, + mintEnd: UINT_64_MAX, + pricePerToken: 0n, + merkleRoot: memberMerkleRoot, + } + + return { + transactions: prepareTransactions({ + l1CrossDomainMessenger: L1_MESSENGERS[migratingToChainId], + currentDAOConfig, + attributesMerkleRoot, + encodedMetadata, + minterParams, + }), + error: undefined, + } +} + +const prepareTransactions = ({ + l1CrossDomainMessenger, + currentDAOConfig, + attributesMerkleRoot, + encodedMetadata, + minterParams, +}: { + l1CrossDomainMessenger: AddressType + currentDAOConfig: ReturnType + attributesMerkleRoot: BytesType + encodedMetadata: BytesType[] + minterParams: { + mintStart: bigint + mintEnd: bigint + pricePerToken: bigint + merkleRoot: BytesType + } +}) => { + const { founderParams, tokenParams, auctionParams, govParams } = currentDAOConfig! + + const delayedGovernanceAmount = 0n + const minimumMetadataCalls = 0n + + const deployerParams = encodeFunctionData({ + abi: L2DeployerABI, + functionName: 'deploy', + args: [ + founderParams, + tokenParams, + auctionParams, + govParams, + minterParams, + delayedGovernanceAmount, + minimumMetadataCalls, + ], + }) + + const metadataParams = encodedMetadata.map((x) => + encodeFunctionData({ + abi: L2DeployerABI, + functionName: 'callMetadataRenderer', + args: [x], + }) + ) + + const metadataAttributesParams = encodeFunctionData({ + abi: L2DeployerABI, + functionName: 'callMetadataRenderer', + args: [ + encodeFunctionData({ + abi: merklePropertyMetadataAbi, + functionName: 'setAttributeMerkleRoot', + args: [attributesMerkleRoot], + }), + ], + }) + + const renounceParams = encodeFunctionData({ + abi: L2DeployerABI, + functionName: 'renounceOwnership', + }) + + const deployTx: Transaction = { + target: l1CrossDomainMessenger, + functionSignature: 'sendMessage', + value: '', + calldata: encodeFunctionData({ + abi: messengerABI, + functionName: 'sendMessage', + args: [L2_MIGRATION_DEPLOYER, deployerParams, 0], + }), + } + + const metadataTxs: Transaction[] = metadataParams.map((x) => ({ + target: l1CrossDomainMessenger, + functionSignature: 'sendMessage', + value: '', + calldata: encodeFunctionData({ + abi: messengerABI, + functionName: 'sendMessage', + args: [L2_MIGRATION_DEPLOYER, x, 0], + }), + })) + + const metadataAttributesTx: Transaction = { + target: l1CrossDomainMessenger, + functionSignature: 'sendMessage', + value: '', + calldata: encodeFunctionData({ + abi: messengerABI, + functionName: 'sendMessage', + args: [L2_MIGRATION_DEPLOYER, metadataAttributesParams, 0], + }), + } + + const renounceTx: Transaction = { + target: l1CrossDomainMessenger, + functionSignature: 'sendMessage', + value: '', + calldata: encodeFunctionData({ + abi: messengerABI, + functionName: 'sendMessage', + args: [L2_MIGRATION_DEPLOYER, renounceParams, 0], + }), + } + + return [deployTx, ...metadataTxs, metadataAttributesTx, renounceTx] +} diff --git a/apps/web/src/modules/create-proposal/utils/applyL1ToL2Alias.ts b/apps/web/src/modules/create-proposal/utils/applyL1ToL2Alias.ts new file mode 100644 index 000000000..1cb217dd1 --- /dev/null +++ b/apps/web/src/modules/create-proposal/utils/applyL1ToL2Alias.ts @@ -0,0 +1,25 @@ +import { getPublicClient, readContract } from 'wagmi/actions' + +import { L2_MIGRATION_DEPLOYER } from 'src/constants/addresses' +import { L2DeployerABI } from 'src/data/contract/abis/L2MigrationDeployer' +import { AddressType, CHAIN_ID } from 'src/typings' + +// We are calling a pure function. the result will be the same on any chain with an L2 deployer +const CHAIN_TO_QUERY = CHAIN_ID.BASE_GOERLI + +export const applyL1ToL2Alias = async (chainId: CHAIN_ID, address: AddressType) => { + const publicClient = getPublicClient({ chainId }) + + const bytecode = await publicClient.getBytecode({ address }) + if (bytecode) { + return await readContract({ + abi: L2DeployerABI, + address: L2_MIGRATION_DEPLOYER, + chainId: CHAIN_TO_QUERY, + functionName: 'applyL1ToL2Alias', + args: [address], + }) + } + + return address +} diff --git a/apps/web/src/modules/create-proposal/utils/prepareAttributesMerkleRoot.ts b/apps/web/src/modules/create-proposal/utils/prepareAttributesMerkleRoot.ts new file mode 100644 index 000000000..993e81be8 --- /dev/null +++ b/apps/web/src/modules/create-proposal/utils/prepareAttributesMerkleRoot.ts @@ -0,0 +1,49 @@ +import { createTree } from 'lanyard' +import { encodeAbiParameters } from 'viem' + +type TupleOf16Numbers = [ + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number +] + +export const prepareAttributesMerkleRoot = async ( + attributeForTokens: number[][] +): Promise<`0x${string}`> => { + const leaves = attributeForTokens + .map((attributes, tokenId) => { + let arr: TupleOf16Numbers = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + + if (attributes.length > 16) throw new Error('Too many attributes') + + for (let i = 0; i < attributes.length; i++) { + arr[i] = attributes[i] + } + + return encodeAbiParameters( + [ + { name: 'tokenId', type: 'uint256' }, + { name: 'attributes', type: 'uint16[16]' }, + ], + [BigInt(tokenId), arr] + ) + }) + .flat() + + return await createTree({ + unhashedLeaves: leaves, + }).then((x) => x.merkleRoot as `0x${string}`) +} diff --git a/apps/web/src/modules/create-proposal/utils/prepareMemberMerkleRoot.ts b/apps/web/src/modules/create-proposal/utils/prepareMemberMerkleRoot.ts new file mode 100644 index 000000000..200cb2620 --- /dev/null +++ b/apps/web/src/modules/create-proposal/utils/prepareMemberMerkleRoot.ts @@ -0,0 +1,26 @@ +import { createTree } from 'lanyard' +import { Address, encodeAbiParameters } from 'viem' + +import { DaoMember } from 'src/data/subgraph/requests/memberSnapshot' + +export const prepareMemberMerkleRoot = async ( + members: DaoMember[] +): Promise<`0x${string}`> => { + const leaves = members + .map((member) => + member.tokens.map((tokenId) => + encodeAbiParameters( + [ + { name: 'owner', type: 'address' }, + { name: 'tokenId', type: 'uint256' }, + ], + [member.address as Address, BigInt(tokenId)] + ) + ) + ) + .flat() + + return await createTree({ + unhashedLeaves: leaves, + }).then((x) => x.merkleRoot as `0x${string}`) +} diff --git a/apps/web/src/modules/dao/components/AdminForm/AdminForm.tsx b/apps/web/src/modules/dao/components/AdminForm/AdminForm.tsx index dc8d9c39f..26af199d9 100644 --- a/apps/web/src/modules/dao/components/AdminForm/AdminForm.tsx +++ b/apps/web/src/modules/dao/components/AdminForm/AdminForm.tsx @@ -259,6 +259,8 @@ export const AdminForm: React.FC = ({ collectionAddress }) => { addresses?.auction as Address ) + console.log(transactionsWithPauseUnpause) + createProposal({ disabled: false, title: undefined, diff --git a/apps/web/src/pages/api/migrate/attributes.ts b/apps/web/src/pages/api/migrate/attributes.ts new file mode 100644 index 000000000..48c37d1ec --- /dev/null +++ b/apps/web/src/pages/api/migrate/attributes.ts @@ -0,0 +1,26 @@ +import { NextApiRequest, NextApiResponse } from 'next' +import { Address } from 'viem' + +import { getMetadataAttributes } from 'src/data/contract/requests/getMetadataAttributes' + +const handler = async (req: NextApiRequest, res: NextApiResponse) => { + try { + const { metadata, chainId, finalTokenId } = req.query as { + metadata: Address + chainId: string + finalTokenId: string + } + + const attribtues = await getMetadataAttributes( + metadata as Address, + BigInt(finalTokenId), + parseInt(chainId) + ) + + res.status(200).send(attribtues) + } catch (e) { + res.status(500).send(e) + } +} + +export default handler diff --git a/apps/web/src/pages/api/migrate/snapshot.ts b/apps/web/src/pages/api/migrate/snapshot.ts new file mode 100644 index 000000000..2b494a442 --- /dev/null +++ b/apps/web/src/pages/api/migrate/snapshot.ts @@ -0,0 +1,21 @@ +import { NextApiRequest, NextApiResponse } from 'next' +import { Address } from 'viem' + +import { memberSnapshotRequest } from 'src/data/subgraph/requests/memberSnapshot' + +const handler = async (req: NextApiRequest, res: NextApiResponse) => { + try { + const { chainId, token } = req.query as { + token: Address + chainId: string + } + + const snapshot = await memberSnapshotRequest(parseInt(chainId), token) + + res.status(200).send(snapshot) + } catch (e) { + res.status(500).send(e) + } +} + +export default handler diff --git a/apps/web/src/pages/api/migrated.ts b/apps/web/src/pages/api/migrated.ts new file mode 100644 index 000000000..bc2a88cc5 --- /dev/null +++ b/apps/web/src/pages/api/migrated.ts @@ -0,0 +1,33 @@ +import { NextApiRequest, NextApiResponse } from 'next' +import { readContract } from 'wagmi/actions' + +import { L2_MIGRATION_DEPLOYER } from 'src/constants/addresses' +import { L2DeployerABI } from 'src/data/contract/abis/L2MigrationDeployer' +import { AddressType, CHAIN_ID } from 'src/typings' +import { unpackOptionalArray } from 'src/utils/helpers' + +export interface L2MigratedResponse { + l2TokenAddress: AddressType + chainId: CHAIN_ID +} + +const handler = async (req: NextApiRequest, res: NextApiResponse) => { + const { l1Treasury } = req.query + + const data = await readContract({ + address: L2_MIGRATION_DEPLOYER, + chainId: CHAIN_ID.BASE_GOERLI, + abi: L2DeployerABI, + functionName: 'crossDomainDeployerToMigration', + args: [l1Treasury as AddressType], + }) + + const [tokenAddress] = unpackOptionalArray(data, 3) + + res.status(200).send({ + l2TokenAddress: tokenAddress, + chainId: CHAIN_ID.BASE_GOERLI, + } as L2MigratedResponse) +} + +export default handler diff --git a/apps/web/src/pages/dao/[network]/[token]/index.tsx b/apps/web/src/pages/dao/[network]/[token]/index.tsx index f0a8754e9..e507d7e4b 100644 --- a/apps/web/src/pages/dao/[network]/[token]/index.tsx +++ b/apps/web/src/pages/dao/[network]/[token]/index.tsx @@ -4,13 +4,15 @@ import { GetServerSideProps } from 'next' import { useRouter } from 'next/router' import React from 'react' import { useAccount, useContractRead } from 'wagmi' -import { readContracts } from 'wagmi/actions' +import { readContract } from 'wagmi/actions' import { Meta } from 'src/components/Meta' import { CACHE_TIMES } from 'src/constants/cacheTimes' import { PUBLIC_DEFAULT_CHAINS } from 'src/constants/defaultChains' import { auctionAbi } from 'src/data/contract/abis' import getDAOAddresses from 'src/data/contract/requests/getDAOAddresses' +import { SDK } from 'src/data/subgraph/client' +import { OrderDirection, Token_OrderBy } from 'src/data/subgraph/sdk.generated' import { getDaoLayout } from 'src/layouts/DaoLayout' import NogglesLogo from 'src/layouts/assets/builder-framed.svg' import { @@ -24,7 +26,6 @@ import { } from 'src/modules/dao' import { NextPageWithLayout } from 'src/pages/_app' import { AddressType, Chain } from 'src/typings' -import { unpackOptionalArray } from 'src/utils/helpers' interface DaoPageProps { chain: Chain @@ -130,29 +131,25 @@ export const getServerSideProps: GetServerSideProps = async (context) => { } } - const [auction, owner] = await readContracts({ - allowFailure: false, - contracts: [ - { - abi: auctionAbi, - address: addresses.auction as AddressType, - functionName: 'auction', - chainId: chain.id, + const latestTokenId = await SDK.connect(chain.id) + .tokens({ + where: { + dao: collectionAddress.toLowerCase(), }, - { - abi: auctionAbi, - address: addresses.auction as AddressType, - functionName: 'owner', - chainId: chain.id, - }, - ], + orderBy: Token_OrderBy.TokenId, + orderDirection: OrderDirection.Desc, + first: 1, + }) + .then((x) => (x.tokens.length > 0 ? x.tokens[0].tokenId : 0)) + + const owner = await readContract({ + abi: auctionAbi, + address: addresses.auction as AddressType, + functionName: 'owner', + chainId: chain.id, }) - const [tokenId, highestBid, highestBidder, startTime, endTime, settled] = - unpackOptionalArray(auction, 6) - - const initialized: boolean = - endTime !== 0 && startTime !== 0 && owner === addresses.treasury + const initialized: boolean = owner === addresses.treasury && latestTokenId > 0 if (!initialized) { return { @@ -166,7 +163,7 @@ export const getServerSideProps: GetServerSideProps = async (context) => { return { redirect: { - destination: `/dao/${network}/${collectionAddress}/${tokenId}${ + destination: `/dao/${network}/${collectionAddress}/${latestTokenId}${ tab ? `?tab=${tab}` : '' }`, permanent: false, diff --git a/apps/web/src/services/simulationService.ts b/apps/web/src/services/simulationService.ts index 7c19e0ee0..4ef90e639 100644 --- a/apps/web/src/services/simulationService.ts +++ b/apps/web/src/services/simulationService.ts @@ -32,8 +32,7 @@ export interface SimulationResult { const { TENDERLY_USER, TENDERLY_PROJECT, TENDERLY_ACCESS_KEY } = process.env const TENDERLY_FORK_API = `https://api.tenderly.co/api/v1/account/${TENDERLY_USER}/project/${TENDERLY_PROJECT}/fork` -const TENDERLY_FORK_V2_BASE_URL = - 'https://api.tenderly.co/api/v2/project/nouns-builder-public/forks' +const TENDERLY_FORK_V2_BASE_URL = `https://api.tenderly.co/api/v2/project/${TENDERLY_PROJECT}/forks` const MOCK_BALANCE = ethers.utils.parseUnits('100', 'ether') diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3045f95ce..b435f534d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,7 +22,7 @@ importers: version: 2.8.0 turbo: specifier: latest - version: 1.10.16 + version: 1.10.14 apps/subgraph: dependencies: @@ -135,6 +135,9 @@ importers: ipfs-service: specifier: workspace:* version: link:../../packages/ipfs-service + lanyard: + specifier: ^1.1.2 + version: 1.1.2 lodash: specifier: ^4.17.21 version: 4.17.21 @@ -351,13 +354,13 @@ importers: version: 5.54.0(eslint@8.34.0)(typescript@4.9.5) eslint-config-next: specifier: latest - version: 13.4.19(eslint@8.34.0)(typescript@4.9.5) + version: 13.5.3(eslint@8.34.0)(typescript@4.9.5) eslint-config-prettier: specifier: ^8.3.0 version: 8.5.0(eslint@8.34.0) eslint-config-turbo: specifier: latest - version: 1.10.13(eslint@8.34.0) + version: 1.10.14(eslint@8.34.0) eslint-plugin-react: specifier: 7.28.0 version: 7.28.0(eslint@8.34.0) @@ -511,7 +514,7 @@ packages: '@babel/core': 7.20.12 '@babel/generator': 7.20.14 '@babel/parser': 7.20.15 - '@babel/runtime': 7.20.1 + '@babel/runtime': 7.23.1 '@babel/traverse': 7.20.13 '@babel/types': 7.20.7 babel-preset-fbjs: 3.4.0(@babel/core@7.20.12) @@ -568,7 +571,7 @@ packages: debug: 4.3.4(supports-color@8.1.1) gensync: 1.0.0-beta.2 json5: 2.2.3 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -615,7 +618,7 @@ packages: '@babel/helper-validator-option': 7.18.6 browserslist: 4.21.5 lru-cache: 5.1.1 - semver: 6.3.0 + semver: 6.3.1 /@babel/helper-create-class-features-plugin@7.20.12(@babel/core@7.20.12): resolution: {integrity: sha512-9OunRkbT0JQcednL0UFvbfXpAsUXiGjUk0a7sN8fUXX7Mue79cUSMjHGDRRi/Vz9vYlpIhLV5fMD5dKoMhhsNQ==} @@ -657,8 +660,8 @@ packages: '@babel/helper-plugin-utils': 7.20.2 debug: 4.3.4(supports-color@8.1.1) lodash.debounce: 4.0.8 - resolve: 1.22.1 - semver: 6.3.0 + resolve: 1.22.6 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true @@ -1739,7 +1742,7 @@ packages: babel-plugin-polyfill-corejs3: 0.6.0(@babel/core@7.20.12) babel-plugin-polyfill-regenerator: 0.4.1(@babel/core@7.20.12) core-js-compat: 3.27.2 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true @@ -1790,19 +1793,17 @@ packages: resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} dev: true - /@babel/runtime-corejs3@7.20.1: - resolution: {integrity: sha512-CGulbEDcg/ND1Im7fUNRZdGXmX2MTWVVZacQi/6DiKE5HNwZ3aVTm5PV4lO8HHz0B2h8WQyvKKjbX5XgTtydsg==} + /@babel/runtime@7.20.1: + resolution: {integrity: sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg==} engines: {node: '>=6.9.0'} dependencies: - core-js-pure: 3.26.1 regenerator-runtime: 0.13.11 - dev: false - /@babel/runtime@7.20.1: - resolution: {integrity: sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg==} + /@babel/runtime@7.23.1: + resolution: {integrity: sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g==} engines: {node: '>=6.9.0'} dependencies: - regenerator-runtime: 0.13.11 + regenerator-runtime: 0.14.0 /@babel/template@7.20.7: resolution: {integrity: sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==} @@ -3581,7 +3582,7 @@ packages: dependencies: '@types/debug': 4.1.7 debug: 4.3.4(supports-color@8.1.1) - semver: 7.5.4 + semver: 7.4.0 superstruct: 1.0.3 transitivePeerDependencies: - supports-color @@ -3694,8 +3695,8 @@ packages: /@next/env@13.1.6: resolution: {integrity: sha512-s+W9Fdqh5MFk6ECrbnVmmAOwxKQuhGMT7xXHrkYIBMBcTiOqNWhv5KbJIboKR5STXxNXl32hllnvKaffzFaWQg==} - /@next/eslint-plugin-next@13.4.19: - resolution: {integrity: sha512-N/O+zGb6wZQdwu6atMZHbR7T9Np5SUFUjZqCbj0sXm+MwQO35M8TazVB4otm87GkXYs2l6OPwARd3/PUWhZBVQ==} + /@next/eslint-plugin-next@13.5.3: + resolution: {integrity: sha512-lbZOoEjzSuTtpk9UgV9rOmxYw+PsSfNR+00mZcInqooiDMZ1u+RqT1YQYLsEZPW1kumZoQe5+exkCBtZ2xn0uw==} dependencies: glob: 7.1.7 dev: false @@ -4208,8 +4209,8 @@ packages: picomatch: 2.3.1 rollup: 2.78.0 - /@rushstack/eslint-patch@1.2.0: - resolution: {integrity: sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==} + /@rushstack/eslint-patch@1.5.0: + resolution: {integrity: sha512-EF3948ckf3f5uPgYbQ6GhyA56Dmv8yg0+ir+BroRjwdxyZJsekhZzawOecC2rOTPCz173t7ZcR1HHZu0dZgOCw==} dev: false /@safe-global/safe-apps-provider@0.18.1(typescript@5.1.6): @@ -4458,7 +4459,7 @@ packages: /@solana/web3.js@1.77.3: resolution: {integrity: sha512-PHaO0BdoiQRPpieC1p31wJsBaxwIOWLh8j2ocXNKX8boCQVldt26Jqm2tZE4KlrvnCIV78owPLv1pEUgqhxZ3w==} dependencies: - '@babel/runtime': 7.20.1 + '@babel/runtime': 7.23.1 '@noble/curves': 1.1.0 '@noble/hashes': 1.3.1 '@solana/buffer-layout': 4.0.1 @@ -6289,7 +6290,7 @@ packages: '@openzeppelin/contracts-upgradeable': 4.8.1 '@types/node': 18.13.0 ds-test: github.com/dapphub/ds-test/e282159d5170298eb2455a6c05280ab5a73a4ef0 - forge-std: github.com/foundry-rs/forge-std/80a8f6ea9362849b2a8f2dc28df40c77a64f9c16 + forge-std: github.com/foundry-rs/forge-std/87a2a0afc5fafd6297538a45a52ac19e71a84562 micro-onchain-metadata-utils: 0.1.1 sol-uriencode: 0.2.0 dev: false @@ -6553,28 +6554,26 @@ packages: /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - /aria-query@4.2.2: - resolution: {integrity: sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==} - engines: {node: '>=6.0'} - dependencies: - '@babel/runtime': 7.20.1 - '@babel/runtime-corejs3': 7.20.1 - dev: false - /aria-query@5.1.3: resolution: {integrity: sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==} dependencies: deep-equal: 2.2.0 - dev: true + + /array-buffer-byte-length@1.0.0: + resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} + dependencies: + call-bind: 1.0.2 + is-array-buffer: 3.0.2 + dev: false /array-includes@3.1.6: resolution: {integrity: sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.4 - get-intrinsic: 1.2.0 + define-properties: 1.2.1 + es-abstract: 1.22.2 + get-intrinsic: 1.2.1 is-string: 1.0.7 dev: false @@ -6582,13 +6581,24 @@ packages: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} + /array.prototype.findlastindex@1.2.3: + resolution: {integrity: sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.1 + es-abstract: 1.22.2 + es-shim-unscopables: 1.0.0 + get-intrinsic: 1.2.1 + dev: false + /array.prototype.flat@1.3.1: resolution: {integrity: sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.4 + define-properties: 1.2.1 + es-abstract: 1.22.2 es-shim-unscopables: 1.0.0 dev: false @@ -6597,8 +6607,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.4 + define-properties: 1.2.1 + es-abstract: 1.22.2 es-shim-unscopables: 1.0.0 dev: false @@ -6606,10 +6616,23 @@ packages: resolution: {integrity: sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ==} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.4 + define-properties: 1.2.1 + es-abstract: 1.22.2 es-shim-unscopables: 1.0.0 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 + dev: false + + /arraybuffer.prototype.slice@1.0.2: + resolution: {integrity: sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.0 + call-bind: 1.0.2 + define-properties: 1.2.1 + es-abstract: 1.22.2 + get-intrinsic: 1.2.1 + is-array-buffer: 3.0.2 + is-shared-array-buffer: 1.0.2 dev: false /asap@2.0.6: @@ -6672,6 +6695,12 @@ packages: resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==} dev: false + /asynciterator.prototype@1.0.0: + resolution: {integrity: sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==} + dependencies: + has-symbols: 1.0.3 + dev: false + /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -6702,8 +6731,8 @@ packages: resolution: {integrity: sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==} dev: false - /axe-core@4.5.2: - resolution: {integrity: sha512-u2MVsXfew5HBvjsczCv+xlwdNnB1oQR9HlAcsejZttNjKKSkeDNVwB1vMThIUIFI9GoT57Vtk8iQLwqOfAkboA==} + /axe-core@4.8.2: + resolution: {integrity: sha512-/dlp0fxyM3R8YW7MFzaHWXrf4zzbr0vaYb23VBFCl83R7nWNPg/yaQw2Dc8jzCMmDVLhSdzH8MjrsuIUuvX+6g==} engines: {node: '>=4'} dev: false @@ -6724,8 +6753,10 @@ packages: - debug dev: false - /axobject-query@2.2.0: - resolution: {integrity: sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==} + /axobject-query@3.2.1: + resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} + dependencies: + dequal: 2.0.3 dev: false /b4a@1.6.4: @@ -6740,7 +6771,7 @@ packages: '@babel/compat-data': 7.20.14 '@babel/core': 7.20.12 '@babel/helper-define-polyfill-provider': 0.3.3(@babel/core@7.20.12) - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true @@ -7082,7 +7113,7 @@ packages: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: function-bind: 1.1.1 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} @@ -7516,11 +7547,6 @@ packages: browserslist: 4.21.5 dev: true - /core-js-pure@3.26.1: - resolution: {integrity: sha512-VVXcDpp/xJ21KdULRq/lXdLzQAtX7+37LzpyfFM973il0tWSsDEoyzG38G14AjTpK9VTfiNM9jnFauq/CpaWGQ==} - requiresBuild: true - dev: false - /core-util-is@1.0.2: resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==} dev: false @@ -7752,17 +7778,6 @@ packages: resolution: {integrity: sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==} dev: true - /debug@2.6.9: - resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.0.0 - dev: false - /debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -7824,9 +7839,9 @@ packages: dependencies: call-bind: 1.0.2 es-get-iterator: 1.1.3 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 is-arguments: 1.1.1 - is-array-buffer: 3.0.1 + is-array-buffer: 3.0.2 is-date-object: 1.0.5 is-regex: 1.1.4 is-shared-array-buffer: 1.0.2 @@ -7834,12 +7849,11 @@ packages: object-is: 1.1.5 object-keys: 1.1.1 object.assign: 4.1.4 - regexp.prototype.flags: 1.4.3 + regexp.prototype.flags: 1.5.1 side-channel: 1.0.4 which-boxed-primitive: 1.0.2 which-collection: 1.0.1 - which-typed-array: 1.1.9 - dev: true + which-typed-array: 1.1.11 /deep-extend@0.6.0: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} @@ -7866,15 +7880,24 @@ packages: dependencies: clone: 1.0.4 + /define-data-property@1.1.0: + resolution: {integrity: sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.1 + gopd: 1.0.1 + has-property-descriptors: 1.0.0 + /define-lazy-prop@2.0.0: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} engines: {node: '>=8'} dev: false - /define-properties@1.1.4: - resolution: {integrity: sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==} + /define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} dependencies: + define-data-property: 1.1.0 has-property-descriptors: 1.0.0 object-keys: 1.1.1 @@ -8236,41 +8259,56 @@ packages: dependencies: is-arrayish: 0.2.1 - /es-abstract@1.20.4: - resolution: {integrity: sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==} + /es-abstract@1.22.2: + resolution: {integrity: sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==} engines: {node: '>= 0.4'} dependencies: + array-buffer-byte-length: 1.0.0 + arraybuffer.prototype.slice: 1.0.2 + available-typed-arrays: 1.0.5 call-bind: 1.0.2 + es-set-tostringtag: 2.0.1 es-to-primitive: 1.2.1 - function-bind: 1.1.1 - function.prototype.name: 1.1.5 - get-intrinsic: 1.2.0 + function.prototype.name: 1.1.6 + get-intrinsic: 1.2.1 get-symbol-description: 1.0.0 + globalthis: 1.0.3 + gopd: 1.0.1 has: 1.0.3 has-property-descriptors: 1.0.0 + has-proto: 1.0.1 has-symbols: 1.0.3 internal-slot: 1.0.5 + is-array-buffer: 3.0.2 is-callable: 1.2.7 is-negative-zero: 2.0.2 is-regex: 1.1.4 is-shared-array-buffer: 1.0.2 is-string: 1.0.7 + is-typed-array: 1.1.12 is-weakref: 1.0.2 - object-inspect: 1.12.2 + object-inspect: 1.12.3 object-keys: 1.1.1 object.assign: 4.1.4 - regexp.prototype.flags: 1.4.3 + regexp.prototype.flags: 1.5.1 + safe-array-concat: 1.0.1 safe-regex-test: 1.0.0 - string.prototype.trimend: 1.0.6 - string.prototype.trimstart: 1.0.6 + string.prototype.trim: 1.2.8 + string.prototype.trimend: 1.0.7 + string.prototype.trimstart: 1.0.7 + typed-array-buffer: 1.0.0 + typed-array-byte-length: 1.0.0 + typed-array-byte-offset: 1.0.0 + typed-array-length: 1.0.4 unbox-primitive: 1.0.2 + which-typed-array: 1.1.11 dev: false /es-get-iterator@1.1.3: resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 has-symbols: 1.0.3 is-arguments: 1.1.1 is-map: 2.0.2 @@ -8278,12 +8316,39 @@ packages: is-string: 1.0.7 isarray: 2.0.5 stop-iteration-iterator: 1.0.0 - dev: true + + /es-iterator-helpers@1.0.15: + resolution: {integrity: sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==} + dependencies: + asynciterator.prototype: 1.0.0 + call-bind: 1.0.2 + define-properties: 1.2.1 + es-abstract: 1.22.2 + es-set-tostringtag: 2.0.1 + function-bind: 1.1.1 + get-intrinsic: 1.2.1 + globalthis: 1.0.3 + has-property-descriptors: 1.0.0 + has-proto: 1.0.1 + has-symbols: 1.0.3 + internal-slot: 1.0.5 + iterator.prototype: 1.1.2 + safe-array-concat: 1.0.1 + dev: false /es-module-lexer@0.9.3: resolution: {integrity: sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==} dev: false + /es-set-tostringtag@2.0.1: + resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.1 + has: 1.0.3 + has-tostringtag: 1.0.0 + dev: false + /es-shim-unscopables@1.0.0: resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} dependencies: @@ -8613,8 +8678,8 @@ packages: source-map: 0.6.1 dev: true - /eslint-config-next@13.4.19(eslint@8.34.0)(typescript@4.9.5): - resolution: {integrity: sha512-WE8367sqMnjhWHvR5OivmfwENRQ1ixfNE9hZwQqNCsd+iM3KnuMc1V8Pt6ytgjxjf23D+xbesADv9x3xaKfT3g==} + /eslint-config-next@13.5.3(eslint@8.34.0)(typescript@4.9.5): + resolution: {integrity: sha512-VN2qbCpq2DMWgs7SVF8KTmc8bVaWz3s4nmcFqRLs7PNBt5AXejOhJuZ4zg2sCEHOvz5RvqdwLeI++NSCV6qHVg==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 typescript: '>=3.3.1' @@ -8622,15 +8687,15 @@ packages: typescript: optional: true dependencies: - '@next/eslint-plugin-next': 13.4.19 - '@rushstack/eslint-patch': 1.2.0 + '@next/eslint-plugin-next': 13.5.3 + '@rushstack/eslint-patch': 1.5.0 '@typescript-eslint/parser': 5.54.0(eslint@8.34.0)(typescript@4.9.5) eslint: 8.34.0 - eslint-import-resolver-node: 0.3.6 - eslint-import-resolver-typescript: 3.5.2(eslint-plugin-import@2.26.0)(eslint@8.34.0) - eslint-plugin-import: 2.26.0(@typescript-eslint/parser@5.54.0)(eslint-import-resolver-typescript@3.5.2)(eslint@8.34.0) - eslint-plugin-jsx-a11y: 6.6.1(eslint@8.34.0) - eslint-plugin-react: 7.31.11(eslint@8.34.0) + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.5.2(eslint-plugin-import@2.28.1)(eslint@8.34.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@5.54.0)(eslint-import-resolver-typescript@3.5.2)(eslint@8.34.0) + eslint-plugin-jsx-a11y: 6.7.1(eslint@8.34.0) + eslint-plugin-react: 7.33.2(eslint@8.34.0) eslint-plugin-react-hooks: 4.6.0(eslint@8.34.0) typescript: 4.9.5 transitivePeerDependencies: @@ -8647,25 +8712,26 @@ packages: eslint: 8.34.0 dev: false - /eslint-config-turbo@1.10.13(eslint@8.34.0): - resolution: {integrity: sha512-Ffa0SxkRCPMtfUX/HDanEqsWoLwZTQTAXO9W4IsOtycb2MzJDrVcLmoFW5sMwCrg7gjqbrC4ZJoD+1SPPzIVqg==} + /eslint-config-turbo@1.10.14(eslint@8.34.0): + resolution: {integrity: sha512-ZeB+IcuFXy1OICkLuAplVa0euoYbhK+bMEQd0nH9+Lns18lgZRm33mVz/iSoH9VdUzl/1ZmFmoK+RpZc+8R80A==} peerDependencies: eslint: '>6.6.0' dependencies: eslint: 8.34.0 - eslint-plugin-turbo: 1.10.13(eslint@8.34.0) + eslint-plugin-turbo: 1.10.14(eslint@8.34.0) dev: false - /eslint-import-resolver-node@0.3.6: - resolution: {integrity: sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==} + /eslint-import-resolver-node@0.3.9: + resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} dependencies: debug: 3.2.7 - resolve: 1.22.1 + is-core-module: 2.13.0 + resolve: 1.22.6 transitivePeerDependencies: - supports-color dev: false - /eslint-import-resolver-typescript@3.5.2(eslint-plugin-import@2.26.0)(eslint@8.34.0): + /eslint-import-resolver-typescript@3.5.2(eslint-plugin-import@2.28.1)(eslint@8.34.0): resolution: {integrity: sha512-zX4ebnnyXiykjhcBvKIf5TNvt8K7yX6bllTRZ14MiurKPjDpCAZujlszTdB8pcNXhZcOf+god4s9SjQa5GnytQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -8675,18 +8741,18 @@ packages: debug: 4.3.4(supports-color@8.1.1) enhanced-resolve: 5.12.0 eslint: 8.34.0 - eslint-plugin-import: 2.26.0(@typescript-eslint/parser@5.54.0)(eslint-import-resolver-typescript@3.5.2)(eslint@8.34.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@5.54.0)(eslint-import-resolver-typescript@3.5.2)(eslint@8.34.0) get-tsconfig: 4.3.0 globby: 13.1.3 - is-core-module: 2.11.0 + is-core-module: 2.13.0 is-glob: 4.0.3 synckit: 0.8.4 transitivePeerDependencies: - supports-color dev: false - /eslint-module-utils@2.7.4(@typescript-eslint/parser@5.54.0)(eslint-import-resolver-node@0.3.6)(eslint-import-resolver-typescript@3.5.2)(eslint@8.34.0): - resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} + /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.54.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.5.2)(eslint@8.34.0): + resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -8709,14 +8775,14 @@ packages: '@typescript-eslint/parser': 5.54.0(eslint@8.34.0)(typescript@4.9.5) debug: 3.2.7 eslint: 8.34.0 - eslint-import-resolver-node: 0.3.6 - eslint-import-resolver-typescript: 3.5.2(eslint-plugin-import@2.26.0)(eslint@8.34.0) + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.5.2(eslint-plugin-import@2.28.1)(eslint@8.34.0) transitivePeerDependencies: - supports-color dev: false - /eslint-plugin-import@2.26.0(@typescript-eslint/parser@5.54.0)(eslint-import-resolver-typescript@3.5.2)(eslint@8.34.0): - resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} + /eslint-plugin-import@2.28.1(@typescript-eslint/parser@5.54.0)(eslint-import-resolver-typescript@3.5.2)(eslint@8.34.0): + resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -8727,37 +8793,42 @@ packages: dependencies: '@typescript-eslint/parser': 5.54.0(eslint@8.34.0)(typescript@4.9.5) array-includes: 3.1.6 + array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.1 - debug: 2.6.9 + array.prototype.flatmap: 1.3.1 + debug: 3.2.7 doctrine: 2.1.0 eslint: 8.34.0 - eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.54.0)(eslint-import-resolver-node@0.3.6)(eslint-import-resolver-typescript@3.5.2)(eslint@8.34.0) + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.54.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.5.2)(eslint@8.34.0) has: 1.0.3 - is-core-module: 2.11.0 + is-core-module: 2.13.0 is-glob: 4.0.3 minimatch: 3.1.2 + object.fromentries: 2.0.6 + object.groupby: 1.0.1 object.values: 1.1.6 - resolve: 1.22.1 - tsconfig-paths: 3.14.1 + semver: 6.3.1 + tsconfig-paths: 3.14.2 transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color dev: false - /eslint-plugin-jsx-a11y@6.6.1(eslint@8.34.0): - resolution: {integrity: sha512-sXgFVNHiWffBq23uiS/JaP6eVR622DqwB4yTzKvGZGcPq6/yZ3WmOZfuBks/vHWo9GaFOqC2ZK4i6+C35knx7Q==} + /eslint-plugin-jsx-a11y@6.7.1(eslint@8.34.0): + resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==} engines: {node: '>=4.0'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - '@babel/runtime': 7.20.1 - aria-query: 4.2.2 + '@babel/runtime': 7.23.1 + aria-query: 5.1.3 array-includes: 3.1.6 + array.prototype.flatmap: 1.3.1 ast-types-flow: 0.0.7 - axe-core: 4.5.2 - axobject-query: 2.2.0 + axe-core: 4.8.2 + axobject-query: 3.2.1 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 eslint: 8.34.0 @@ -8765,7 +8836,9 @@ packages: jsx-ast-utils: 3.3.3 language-tags: 1.0.5 minimatch: 3.1.2 - semver: 6.3.0 + object.entries: 1.1.6 + object.fromentries: 2.0.6 + semver: 6.3.1 dev: false /eslint-plugin-react-hooks@4.6.0(eslint@8.34.0): @@ -8800,8 +8873,8 @@ packages: string.prototype.matchall: 4.0.8 dev: false - /eslint-plugin-react@7.31.11(eslint@8.34.0): - resolution: {integrity: sha512-TTvq5JsT5v56wPa9OYHzsrOlHzKZKjV+aLgS+55NJP/cuzdiQPC7PfYoUjMoxlffKtvijpk7vA/jmuqRb9nohw==} + /eslint-plugin-react@7.33.2(eslint@8.34.0): + resolution: {integrity: sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 @@ -8810,6 +8883,7 @@ packages: array.prototype.flatmap: 1.3.1 array.prototype.tosorted: 1.1.1 doctrine: 2.1.0 + es-iterator-helpers: 1.0.15 eslint: 8.34.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.3 @@ -8820,12 +8894,12 @@ packages: object.values: 1.1.6 prop-types: 15.8.1 resolve: 2.0.0-next.4 - semver: 6.3.0 + semver: 6.3.1 string.prototype.matchall: 4.0.8 dev: false - /eslint-plugin-turbo@1.10.13(eslint@8.34.0): - resolution: {integrity: sha512-el4AAmn0zXmvHEyp1h0IQMfse10Vy8g5Vbg4IU3+vD9CSj5sDbX07iFVt8sCKg7og9Q5FAa9mXzlCf7t4vYgzg==} + /eslint-plugin-turbo@1.10.14(eslint@8.34.0): + resolution: {integrity: sha512-sBdBDnYr9AjT1g4lR3PBkZDonTrMnR4TvuGv5W0OiF7z9az1rI68yj2UHJZvjkwwcGu5mazWA1AfB0oaagpmfg==} peerDependencies: eslint: '>6.6.0' dependencies: @@ -9573,13 +9647,13 @@ packages: /function-bind@1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - /function.prototype.name@1.1.5: - resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} + /function.prototype.name@1.1.6: + resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.4 + define-properties: 1.2.1 + es-abstract: 1.22.2 functions-have-names: 1.2.3 dev: false @@ -9615,11 +9689,12 @@ packages: resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} dev: true - /get-intrinsic@1.2.0: - resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==} + /get-intrinsic@1.2.1: + resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} dependencies: function-bind: 1.1.1 has: 1.0.3 + has-proto: 1.0.1 has-symbols: 1.0.3 /get-iterator@1.0.2: @@ -9654,7 +9729,7 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 dev: false /get-tsconfig@4.3.0: @@ -9756,6 +9831,13 @@ packages: dependencies: type-fest: 0.20.2 + /globalthis@1.0.3: + resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} + engines: {node: '>= 0.4'} + dependencies: + define-properties: 1.2.1 + dev: false + /globalyzer@0.1.0: resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} dev: false @@ -9827,7 +9909,7 @@ packages: /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 /graceful-fs@4.2.10: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} @@ -9976,7 +10058,11 @@ packages: /has-property-descriptors@1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} dependencies: - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 + + /has-proto@1.0.1: + resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} + engines: {node: '>= 0.4'} /has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} @@ -10345,7 +10431,7 @@ packages: resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 has: 1.0.3 side-channel: 1.0.4 @@ -10599,13 +10685,12 @@ packages: call-bind: 1.0.2 has-tostringtag: 1.0.0 - /is-array-buffer@3.0.1: - resolution: {integrity: sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==} + /is-array-buffer@3.0.2: + resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.2.0 - is-typed-array: 1.1.10 - dev: true + get-intrinsic: 1.2.1 + is-typed-array: 1.1.12 /is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} @@ -10614,6 +10699,13 @@ packages: resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} dev: false + /is-async-function@2.0.0: + resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: false + /is-bigint@1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} dependencies: @@ -10641,8 +10733,8 @@ packages: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} - /is-core-module@2.11.0: - resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==} + /is-core-module@2.13.0: + resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} dependencies: has: 1.0.3 @@ -10666,6 +10758,12 @@ packages: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} + /is-finalizationregistry@1.0.2: + resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} + dependencies: + call-bind: 1.0.2 + dev: false + /is-fullwidth-code-point@1.0.0: resolution: {integrity: sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==} engines: {node: '>=0.10.0'} @@ -10714,7 +10812,6 @@ packages: /is-map@2.0.2: resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==} - dev: true /is-negative-zero@2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} @@ -10771,7 +10868,6 @@ packages: /is-set@2.0.2: resolution: {integrity: sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==} - dev: true /is-shared-array-buffer@1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} @@ -10794,15 +10890,11 @@ packages: dependencies: has-symbols: 1.0.3 - /is-typed-array@1.1.10: - resolution: {integrity: sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==} + /is-typed-array@1.1.12: + resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} engines: {node: '>= 0.4'} dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.0 + which-typed-array: 1.1.11 /is-typedarray@1.0.0: resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} @@ -10828,7 +10920,6 @@ packages: /is-weakmap@2.0.1: resolution: {integrity: sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==} - dev: true /is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} @@ -10840,8 +10931,7 @@ packages: resolution: {integrity: sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.2.0 - dev: true + get-intrinsic: 1.2.1 /is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} @@ -10865,7 +10955,6 @@ packages: /isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} - dev: true /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -10882,7 +10971,6 @@ packages: whatwg-fetch: 3.6.2 transitivePeerDependencies: - encoding - dev: true /isomorphic-ws@4.0.1(ws@7.5.9): resolution: {integrity: sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==} @@ -10984,6 +11072,16 @@ packages: readable-stream: 3.6.0 dev: false + /iterator.prototype@1.1.2: + resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} + dependencies: + define-properties: 1.2.1 + get-intrinsic: 1.2.1 + has-symbols: 1.0.3 + reflect.getprototypeof: 1.0.4 + set-function-name: 2.0.1 + dev: false + /jake@10.8.7: resolution: {integrity: sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==} engines: {node: '>=10'} @@ -11238,8 +11336,8 @@ packages: remove-trailing-spaces: 1.0.8 dev: true - /json5@1.0.1: - resolution: {integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==} + /json5@1.0.2: + resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} hasBin: true dependencies: minimist: 1.2.7 @@ -11342,6 +11440,14 @@ packages: language-subtag-registry: 0.3.22 dev: false + /lanyard@1.1.2: + resolution: {integrity: sha512-nuo7gkPl2hatMKHfVwtY+o1zJlUmforLREmzA7jT45/gvH59kwo7xpAMyRNUzeOgfjZRGhm5cAZ/z4YlVNKqUw==} + dependencies: + isomorphic-fetch: 3.0.0 + transitivePeerDependencies: + - encoding + dev: false + /levn@0.3.0: resolution: {integrity: sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==} engines: {node: '>= 0.8.0'} @@ -12276,10 +12382,6 @@ packages: engines: {node: '>=10'} dev: true - /ms@2.0.0: - resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} - dev: false - /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -12601,16 +12703,15 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} - /object-inspect@1.12.2: - resolution: {integrity: sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==} + /object-inspect@1.12.3: + resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} /object-is@1.1.5: resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - dev: true + define-properties: 1.2.1 /object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} @@ -12626,7 +12727,7 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 + define-properties: 1.2.1 has-symbols: 1.0.3 object-keys: 1.1.1 @@ -12635,8 +12736,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.4 + define-properties: 1.2.1 + es-abstract: 1.22.2 dev: false /object.fromentries@2.0.6: @@ -12644,15 +12745,24 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.4 + define-properties: 1.2.1 + es-abstract: 1.22.2 + dev: false + + /object.groupby@1.0.1: + resolution: {integrity: sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.1 + es-abstract: 1.22.2 + get-intrinsic: 1.2.1 dev: false /object.hasown@1.1.2: resolution: {integrity: sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw==} dependencies: - define-properties: 1.1.4 - es-abstract: 1.20.4 + define-properties: 1.2.1 + es-abstract: 1.22.2 dev: false /object.values@1.1.6: @@ -12660,8 +12770,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.4 + define-properties: 1.2.1 + es-abstract: 1.22.2 dev: false /ofetch@1.3.3: @@ -13618,6 +13728,18 @@ packages: redis-errors: 1.2.0 dev: false + /reflect.getprototypeof@1.0.4: + resolution: {integrity: sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.1 + es-abstract: 1.22.2 + get-intrinsic: 1.2.1 + globalthis: 1.0.3 + which-builtin-type: 1.1.3 + dev: false + /regenerate-unicode-properties@10.1.0: resolution: {integrity: sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==} engines: {node: '>=4'} @@ -13632,19 +13754,22 @@ packages: /regenerator-runtime@0.13.11: resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} + /regenerator-runtime@0.14.0: + resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} + /regenerator-transform@0.15.1: resolution: {integrity: sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==} dependencies: - '@babel/runtime': 7.20.1 + '@babel/runtime': 7.23.1 dev: true - /regexp.prototype.flags@1.4.3: - resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==} + /regexp.prototype.flags@1.5.1: + resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - functions-have-names: 1.2.3 + define-properties: 1.2.1 + set-function-name: 2.0.1 /regexpp@3.2.0: resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} @@ -13688,7 +13813,7 @@ packages: /relay-runtime@12.0.0: resolution: {integrity: sha512-QU6JKr1tMsry22DXNy9Whsq5rmvwr3LSZiiWV/9+DFpuTWvp+WFhobWMc8TC4OjKFfNhEZy7mOiqUAn5atQtug==} dependencies: - '@babel/runtime': 7.20.1 + '@babel/runtime': 7.23.1 fbjs: 3.0.4 invariant: 2.2.4 transitivePeerDependencies: @@ -13791,7 +13916,16 @@ packages: resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} hasBin: true dependencies: - is-core-module: 2.11.0 + is-core-module: 2.13.0 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + + /resolve@1.22.6: + resolution: {integrity: sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==} + hasBin: true + dependencies: + is-core-module: 2.13.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 @@ -13799,7 +13933,7 @@ packages: resolution: {integrity: sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==} hasBin: true dependencies: - is-core-module: 2.11.0 + is-core-module: 2.13.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: false @@ -13884,7 +14018,7 @@ packages: /rpc-websockets@7.5.1: resolution: {integrity: sha512-kGFkeTsmd37pHPMaHIgN1LVKXMi0JD782v4Ds9ZKtLlwdTKjn+CxM9A9/gLT2LaOuEcEFGL98h1QWQtlOIdW0w==} dependencies: - '@babel/runtime': 7.20.1 + '@babel/runtime': 7.23.1 eventemitter3: 4.0.7 uuid: 8.3.2 ws: 8.12.0(bufferutil@4.0.7)(utf-8-validate@5.0.10) @@ -13923,6 +14057,16 @@ packages: mri: 1.2.0 dev: false + /safe-array-concat@1.0.1: + resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==} + engines: {node: '>=0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + has-symbols: 1.0.3 + isarray: 2.0.5 + dev: false + /safe-buffer@5.1.2: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} dev: false @@ -13938,7 +14082,7 @@ packages: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 is-regex: 1.1.4 dev: false @@ -14010,6 +14154,11 @@ packages: /semver@6.3.0: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} hasBin: true + dev: false + + /semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true /semver@7.3.5: resolution: {integrity: sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==} @@ -14059,6 +14208,14 @@ packages: /set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + /set-function-name@2.0.1: + resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.0 + functions-have-names: 1.2.3 + has-property-descriptors: 1.0.0 + /setimmediate@1.0.5: resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} @@ -14115,8 +14272,8 @@ packages: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.2.0 - object-inspect: 1.12.2 + get-intrinsic: 1.2.1 + object-inspect: 1.12.3 /siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} @@ -14303,7 +14460,6 @@ packages: engines: {node: '>= 0.4'} dependencies: internal-slot: 1.0.5 - dev: true /stream-browserify@3.0.0: resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==} @@ -14367,29 +14523,38 @@ packages: resolution: {integrity: sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.4 - get-intrinsic: 1.2.0 + define-properties: 1.2.1 + es-abstract: 1.22.2 + get-intrinsic: 1.2.1 has-symbols: 1.0.3 internal-slot: 1.0.5 - regexp.prototype.flags: 1.4.3 + regexp.prototype.flags: 1.5.1 side-channel: 1.0.4 dev: false - /string.prototype.trimend@1.0.6: - resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} + /string.prototype.trim@1.2.8: + resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.1 + es-abstract: 1.22.2 + dev: false + + /string.prototype.trimend@1.0.7: + resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.4 + define-properties: 1.2.1 + es-abstract: 1.22.2 dev: false - /string.prototype.trimstart@1.0.6: - resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} + /string.prototype.trimstart@1.0.7: + resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.4 + define-properties: 1.2.1 + es-abstract: 1.22.2 dev: false /string_decoder@0.10.31: @@ -14991,11 +15156,11 @@ packages: yn: 3.1.1 dev: true - /tsconfig-paths@3.14.1: - resolution: {integrity: sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==} + /tsconfig-paths@3.14.2: + resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} dependencies: '@types/json5': 0.0.29 - json5: 1.0.1 + json5: 1.0.2 minimist: 1.2.7 strip-bom: 3.0.0 dev: false @@ -15067,64 +15232,64 @@ packages: safe-buffer: 5.2.1 dev: false - /turbo-darwin-64@1.10.16: - resolution: {integrity: sha512-+Jk91FNcp9e9NCLYlvDDlp2HwEDp14F9N42IoW3dmHI5ZkGSXzalbhVcrx3DOox3QfiNUHxzWg4d7CnVNCuuMg==} + /turbo-darwin-64@1.10.14: + resolution: {integrity: sha512-I8RtFk1b9UILAExPdG/XRgGQz95nmXPE7OiGb6ytjtNIR5/UZBS/xVX/7HYpCdmfriKdVwBKhalCoV4oDvAGEg==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@1.10.16: - resolution: {integrity: sha512-jqGpFZipIivkRp/i+jnL8npX0VssE6IAVNKtu573LXtssZdV/S+fRGYA16tI46xJGxSAivrZ/IcgZrV6Jk80bw==} + /turbo-darwin-arm64@1.10.14: + resolution: {integrity: sha512-KAdUWryJi/XX7OD0alOuOa0aJ5TLyd4DNIYkHPHYcM6/d7YAovYvxRNwmx9iv6Vx6IkzTnLeTiUB8zy69QkG9Q==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@1.10.16: - resolution: {integrity: sha512-PpqEZHwLoizQ6sTUvmImcRmACyRk9EWLXGlqceogPZsJ1jTRK3sfcF9fC2W56zkSIzuLEP07k5kl+ZxJd8JMcg==} + /turbo-linux-64@1.10.14: + resolution: {integrity: sha512-BOBzoREC2u4Vgpap/WDxM6wETVqVMRcM8OZw4hWzqCj2bqbQ6L0wxs1LCLWVrghQf93JBQtIGAdFFLyCSBXjWQ==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@1.10.16: - resolution: {integrity: sha512-TMjFYz8to1QE0fKVXCIvG/4giyfnmqcQIwjdNfJvKjBxn22PpbjeuFuQ5kNXshUTRaTJihFbuuCcb5OYFNx4uw==} + /turbo-linux-arm64@1.10.14: + resolution: {integrity: sha512-D8T6XxoTdN5D4V5qE2VZG+/lbZX/89BkAEHzXcsSUTRjrwfMepT3d2z8aT6hxv4yu8EDdooZq/2Bn/vjMI32xw==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@1.10.16: - resolution: {integrity: sha512-+jsf68krs0N66FfC4/zZvioUap/Tq3sPFumnMV+EBo8jFdqs4yehd6+MxIwYTjSQLIcpH8KoNMB0gQYhJRLZzw==} + /turbo-windows-64@1.10.14: + resolution: {integrity: sha512-zKNS3c1w4i6432N0cexZ20r/aIhV62g69opUn82FLVs/zk3Ie0GVkSB6h0rqIvMalCp7enIR87LkPSDGz9K4UA==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@1.10.16: - resolution: {integrity: sha512-sKm3hcMM1bl0B3PLG4ifidicOGfoJmOEacM5JtgBkYM48ncMHjkHfFY7HrJHZHUnXM4l05RQTpLFoOl/uIo2HQ==} + /turbo-windows-arm64@1.10.14: + resolution: {integrity: sha512-rkBwrTPTxNSOUF7of8eVvvM+BkfkhA2OvpHM94if8tVsU+khrjglilp8MTVPHlyS9byfemPAmFN90oRIPB05BA==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@1.10.16: - resolution: {integrity: sha512-2CEaK4FIuSZiP83iFa9GqMTQhroW2QryckVqUydmg4tx78baftTOS0O+oDAhvo9r9Nit4xUEtC1RAHoqs6ZEtg==} + /turbo@1.10.14: + resolution: {integrity: sha512-hr9wDNYcsee+vLkCDIm8qTtwhJ6+UAMJc3nIY6+PNgUTtXcQgHxCq8BGoL7gbABvNWv76CNbK5qL4Lp9G3ZYRA==} hasBin: true optionalDependencies: - turbo-darwin-64: 1.10.16 - turbo-darwin-arm64: 1.10.16 - turbo-linux-64: 1.10.16 - turbo-linux-arm64: 1.10.16 - turbo-windows-64: 1.10.16 - turbo-windows-arm64: 1.10.16 + turbo-darwin-64: 1.10.14 + turbo-darwin-arm64: 1.10.14 + turbo-linux-64: 1.10.14 + turbo-linux-arm64: 1.10.14 + turbo-windows-64: 1.10.14 + turbo-windows-arm64: 1.10.14 dev: true /tweetnacl@0.14.5: @@ -15157,6 +15322,44 @@ packages: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} + /typed-array-buffer@1.0.0: + resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + is-typed-array: 1.1.12 + dev: false + + /typed-array-byte-length@1.0.0: + resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.12 + dev: false + + /typed-array-byte-offset@1.0.0: + resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.12 + dev: false + + /typed-array-length@1.0.4: + resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} + dependencies: + call-bind: 1.0.2 + for-each: 0.3.3 + is-typed-array: 1.1.12 + dev: false + /typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} dependencies: @@ -15525,8 +15728,8 @@ packages: inherits: 2.0.4 is-arguments: 1.1.1 is-generator-function: 1.0.10 - is-typed-array: 1.1.10 - which-typed-array: 1.1.9 + is-typed-array: 1.1.12 + which-typed-array: 1.1.11 dev: false /uuid@3.4.0: @@ -15728,7 +15931,7 @@ packages: '@types/node': 18.13.0 esbuild: 0.15.18 postcss: 8.4.24 - resolve: 1.22.1 + resolve: 1.22.6 rollup: 2.79.1 optionalDependencies: fsevents: 2.3.2 @@ -16059,7 +16262,6 @@ packages: /whatwg-fetch@3.6.2: resolution: {integrity: sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==} - dev: true /whatwg-mimetype@3.0.0: resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} @@ -16097,6 +16299,24 @@ packages: is-string: 1.0.7 is-symbol: 1.0.4 + /which-builtin-type@1.1.3: + resolution: {integrity: sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==} + engines: {node: '>= 0.4'} + dependencies: + function.prototype.name: 1.1.6 + has-tostringtag: 1.0.0 + is-async-function: 2.0.0 + is-date-object: 1.0.5 + is-finalizationregistry: 1.0.2 + is-generator-function: 1.0.10 + is-regex: 1.1.4 + is-weakref: 1.0.2 + isarray: 2.0.5 + which-boxed-primitive: 1.0.2 + which-collection: 1.0.1 + which-typed-array: 1.1.11 + dev: false + /which-collection@1.0.1: resolution: {integrity: sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==} dependencies: @@ -16104,13 +16324,12 @@ packages: is-set: 2.0.2 is-weakmap: 2.0.1 is-weakset: 2.0.2 - dev: true /which-module@2.0.0: resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==} - /which-typed-array@1.1.9: - resolution: {integrity: sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==} + /which-typed-array@1.1.11: + resolution: {integrity: sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==} engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.5 @@ -16118,7 +16337,6 @@ packages: for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.0 - is-typed-array: 1.1.10 /which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} @@ -16391,8 +16609,8 @@ packages: version: 1.0.0 dev: false - github.com/foundry-rs/forge-std/80a8f6ea9362849b2a8f2dc28df40c77a64f9c16: - resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/80a8f6ea9362849b2a8f2dc28df40c77a64f9c16} + github.com/foundry-rs/forge-std/87a2a0afc5fafd6297538a45a52ac19e71a84562: + resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/87a2a0afc5fafd6297538a45a52ac19e71a84562} name: forge-std - version: 1.7.3 + version: 1.7.4 dev: false