Commit cfc3a81b authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

Merge pull request #7644 from ethereum-optimism/10-12-chore_Remove_niche_hooks_and_actions

chore(contracts-ts): Remove niche hooks and actions
parents 2f523fbb 6d9568e0
---
'@eth-optimism/contracts-ts': minor
---
Removed unused hooks and actions
This diff is collapsed.
......@@ -54,24 +54,18 @@
"420": "0x4200000000000000000000000000000000000015"
},
"L1CrossDomainMessenger": {
"1": "0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1"
},
"L1CrossDomainMessenger_goerli": {
"1": "0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1",
"5": "0x5086d1eEF304eb5284A0f6720f79403b4e9bE294"
},
"L1ERC721Bridge": {
"1": "0x5a7749f83b81B301cAb5f48EB8516B986DAef23D"
},
"L1ERC721Bridge_goerli": {
"1": "0x5a7749f83b81B301cAb5f48EB8516B986DAef23D",
"5": "0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9"
},
"L1FeeVault": {
"420": "0x420000000000000000000000000000000000001a"
},
"L1StandardBridge": {
"1": "0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"
},
"L1StandardBridge_goerli": {
"1": "0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1",
"5": "0x636Af16bf2f682dD3109e60102b8E1A089FedAa8"
},
"L2CrossDomainMessenger": {
......@@ -84,9 +78,7 @@
"420": "0x4200000000000000000000000000000000000014"
},
"L2OutputOracle": {
"1": "0xdfe97868233d1aa22e815a266982f2cf17685a27"
},
"L2OutputOracle_goerli": {
"1": "0xdfe97868233d1aa22e815a266982f2cf17685a27",
"5": "0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0"
},
"L2StandardBridge": {
......@@ -115,9 +107,7 @@
"420": "0x4200000000000000000000000000000000000017"
},
"OptimismPortal": {
"1": "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"
},
"OptimismPortal_goerli": {
"1": "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed",
"5": "0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383"
},
"Optimist": {
......@@ -151,9 +141,7 @@
"420": "0x4200000000000000000000000000000000000011"
},
"SystemConfig": {
"1": "0x229047fed2591dbec1eF1118d64F7aF3dB9EB290"
},
"SystemConfig_goerli": {
"1": "0x229047fed2591dbec1eF1118d64F7aF3dB9EB290",
"5": "0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60"
},
"SystemDictator": {
......
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@ import matchers from '@testing-library/jest-dom/matchers'
import { cleanup, waitFor } from '@testing-library/react'
import { renderHook } from '@testing-library/react-hooks'
import { afterEach, expect, test } from 'vitest'
import { useMintManagerOwner } from './react'
import { useMintManagerRead } from './react'
import { configureChains, createConfig, WagmiConfig } from 'wagmi'
import * as React from 'react'
import { optimism } from 'viem/chains'
......@@ -35,7 +35,8 @@ const blockNumber = BigInt(106806163)
test('react hooks should work', async () => {
const hook = renderHook(
() => useMintManagerOwner({ chainId: 10, blockNumber }),
() =>
useMintManagerRead({ chainId: 10, blockNumber, functionName: 'owner' }),
{
wrapper: ({ children }) => (
<WagmiConfig config={config}>{children}</WagmiConfig>
......
This diff is collapsed.
......@@ -372,11 +372,34 @@ export default defineConfig([
{
out: 'src/actions.ts',
contracts: contractsWithFilteredDuplicates,
plugins: [eslintIgnorePlugin, actions()],
plugins: [
eslintIgnorePlugin,
actions({
getContract: true,
// don't include actions because they can be more simply done via getContract
prepareWriteContract: false,
readContract: false,
watchContractEvent: false,
writeContract: false,
}),
],
},
{
out: 'src/react.ts',
contracts: contractsWithFilteredDuplicates,
plugins: [eslintIgnorePlugin, react()],
plugins: [
eslintIgnorePlugin,
react({
useContractRead: true,
useContractWrite: true,
useContractEvent: true,
// don't include more niche actions to keep api more simple
useContractFunctionRead: false,
useContractFunctionWrite: false,
useContractItemEvent: false,
usePrepareContractFunctionWrite: false,
usePrepareContractWrite: false,
}),
],
},
])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment