* homepage: infinite looping logo carousel * split partners logo among two rows on mobile * remove lazy loading from partner logos * Fix partner logo cut off on safari * fade-in logo carousel at the container edge * v1 * v2 * remove temp code changes * switch network *technically* works, and new chains package * Fix src warning in AsyncContractTypeCell * Updated Design for config form, fix metadata error * add initial deployment status modal * Fix contract duplication bug in dashboard * Make RPC url always editable * v3 - middleware + refactor * reset form when selecting custom option * Fix crash on sources tab for unsupported chains * add missing deps in effects * /evm - use SSG with fallback * /evm - add ensQuery dehydration back * /solana - fix program page loading issue * Allow editing details for custom chains * solana program context * fix build crash * fix all the networkOrAddress getters * use chain icons from chains package * separation of fallback and final page * Fix wrong default network type in form * validation improvements in configure network form * disable custom chains from dropdown on On non thirdweb contracts deploy page * Fix wrong network slug * custom chain improvement * Fix Lightmode UI of Network Config Form * UI improvements for network search dropdown * UI tweaks * code review cleanup * UI tweaks * Network Config Form: Better Keyboard UX * fix broken /contracts/release and /contracts/deploy routes * add configure networks button for custom contract deployment page * UI tweaks for network configurator * fix merge * add the icon to the custom chain * Bunch of Improvements * Improve auto chain configuration * Do not allow adding custom network with existing chain id * Show delete default chains with 1-click add * Convert delete dialog to a popover * Retain all fields when selecting a chain from list * Allow configuring chain Icons * Allow using chainId as network slug for custom networks * Remove unnecessary chainInfos object passed in provider * configurable slug + prefill form * improve scrollbar styling * upgrade to newer sdk etc * make it work * Various testjame improvements * Stop form submit event propagation * preselect “testnet” for custom network based on name * Clear form errors when selecting a network from list * Improved UI for Delete network popover * Disable “Add Network” button when on add network page * Change fallback chain icon * custom and search tabs * reduce layout shift when switching tabs * allChains caching with idb * Add IPFS upload button for icon input * Deploy Modal, chain icon, code cleanup * Fix Deploy Modal not working for custom contract deployment * Fix Fantom testnet icon * Remove useDashboardNetwork() * Update Deploy Modal wording in case for 3 prompt scenario * Remove hardhat and localhost from CURRENCIES object * Remove gateway.ipfscdn.io from images.remotePatterns in next config * add chain config tracking * remove useChainInfos() * Remove EVM_RPC_URL_MAP usage as much as possible * Fix Network Switcher for non-default chains * upgrade new dev sdk versions * fix versions * Fix contractInfo.chain not available on contract page of custom chain * Fix contract page links in overview page * Update default chain Icon * bunch of UI improvements for network configuration modal * Better active state for add network button and chains * Suggest a slug for custom network * Show chain id next to network names in list * Allow searching by chain id * Autofocus on first input of the form * Add cross button for clearing search input * Toggle search results open state with chevron icon * Add icons in chain list * handle wallet connected to unsupported network in <SupportedNetworkSelect/> * No reload required after adding a network * revert last commit - reload still required * handle case where wallet is connected to an auto configured chain - show it as unknown network * update dependencies and switch to activeChain and supportedChains * nightly sdk versions * Improved Icon Uploader * always use default chains for polygon registry work * dev version & updated list fetching * Improved Chain ID input in Network Configurator * Improved Network ID validation and prefill * Hide etherscan verification button for non-default chains * Form Refactor + network type toolip * update deps * update package versions * upgrade dependencies * show "create custom" when no search results found * slug calculated from prefillName should not be considered dirty * open edit screen when selecting already configured network from list * fuzzy search with fuse.js * replace thirdweb key with it's value in form * temp fix for getChainRPC throwing error * update to newer chains package * lots of rpc cleanup etc * fix nightly maybe? * upgrade to nightly packages * add initial import contract search input * fix localhost * clean up smoe more stuff * lots of updates * Show "Request Testnet Funds" button in wallet when applicable (#856) * fix crash on events page * Fix Links in Overview page * import contract improvements * Fix wrong explorer tab link in ContractPermissionsPage * make search faster (individual queries) * properly split contract and program routing * remove all via stuff etc * various further improvements * add a proxy and setup storage to hit that proxy * further cleanup --------- Co-authored-by: Jonas Daniels <[email protected]> Co-authored-by: Joaquim Verges <[email protected]>
66 lines
2.5 KiB
TypeScript
66 lines
2.5 KiB
TypeScript
import type { ContractType } from "@thirdweb-dev/sdk/evm";
|
|
import { constants } from "ethers";
|
|
|
|
export const networkKeys = {
|
|
all: ["network"] as const,
|
|
chain: (chainId?: number) => [...networkKeys.all, chainId] as const,
|
|
multiChainRegistry: ["multi-chain-registry"] as const,
|
|
};
|
|
|
|
export const contractKeys = {
|
|
all: ["contract"] as const,
|
|
lists: () => [...contractKeys.all, "list"] as const,
|
|
list: (address = constants.AddressZero) =>
|
|
[...contractKeys.lists(), address] as const,
|
|
listWithFilters: (
|
|
address = constants.AddressZero,
|
|
filters?: ContractType[],
|
|
) => [...contractKeys.list(address), { filters }] as const,
|
|
details: () => [...contractKeys.all, "detail"] as const,
|
|
detail: (address: string = constants.AddressZero) =>
|
|
[...contractKeys.details(), address] as const,
|
|
};
|
|
|
|
export const splitsKeys = {
|
|
all: ["splits"] as const,
|
|
lists: () => [...splitsKeys.all, "list"] as const,
|
|
list: (address = constants.AddressZero) =>
|
|
[...splitsKeys.lists(), address] as const,
|
|
detail: (address = constants.AddressZero) =>
|
|
[...splitsKeys.all, address] as const,
|
|
currencies: (address = constants.AddressZero) =>
|
|
[...splitsKeys.detail(address), "currencies"] as const,
|
|
balances: (address = constants.AddressZero) =>
|
|
[...splitsKeys.detail(address), "balances"] as const,
|
|
};
|
|
|
|
export const voteKeys = {
|
|
all: ["vote"] as const,
|
|
detail: (address = constants.AddressZero) =>
|
|
[...voteKeys.all, address] as const,
|
|
proposals: (address = constants.AddressZero) =>
|
|
[...voteKeys.detail(address), "proposals"] as const,
|
|
proposal: (proposalId = "-1", address = constants.AddressZero) =>
|
|
[...voteKeys.proposals(address), proposalId] as const,
|
|
balances: (address = constants.AddressZero, addresses = [] as string[]) =>
|
|
[...voteKeys.detail(address), "balances", { addresses }] as const,
|
|
delegations: (address = constants.AddressZero) =>
|
|
[...voteKeys.detail(address), "delegations"] as const,
|
|
delegation: (
|
|
address = constants.AddressZero,
|
|
userAddress = constants.AddressZero,
|
|
) => [...voteKeys.delegations(address), userAddress] as const,
|
|
userHasVotedOnProposal: (
|
|
proposalId = "-1",
|
|
address = constants.AddressZero,
|
|
userAddress = constants.AddressZero,
|
|
) =>
|
|
[
|
|
...voteKeys.proposal(proposalId, address),
|
|
"hasVotedOnProposal",
|
|
userAddress,
|
|
] as const,
|
|
canExecuteProposal: (proposalId = "-1", address = constants.AddressZero) =>
|
|
[...voteKeys.proposal(proposalId, address), "canExecute"] as const,
|
|
};
|