Skip to content

policy.useWatchCreate

Watches for policy creation events on the TIP403 Registry.

Usage

ts
import { 
Hooks
} from 'wagmi/tempo'
Hooks
.
policy
.
useWatchCreate
({
onPolicyCreated
: (
args
,
log
) => {
console
.
log
('args:',
args
)
}, })
ts
import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { tempoWallet } from 'wagmi/tempo'

export const config = createConfig({
  connectors: [tempoWallet()],
  chains: [tempo],
  multiInjectedProviderDiscovery: false,
  transports: {
    [tempo.id]: http(),
  },
})

Parameters

See Wagmi Action policy.watchCreate Parameters

config

Config | undefined

Config to use instead of retrieving from the nearest WagmiProvider.

Action

Released under the MIT License.