Skip to content

Latest commit

 

History

History
375 lines (200 loc) · 11.2 KB

File metadata and controls

375 lines (200 loc) · 11.2 KB

Defined in: packages/operator/src/ProtocolClient.ts:25

Client for Protocol Governors and Validators (Infrastructure)

Extends

Constructors

Constructor

new ProtocolClient(config): ProtocolClient

Defined in: packages/operator/src/ProtocolClient.ts:30

Parameters

Parameter Type
config ProtocolClientConfig

Returns

ProtocolClient

Overrides

BaseClient.constructor

Properties

blsAggregatorAddress?

optional blsAggregatorAddress: `0x${string}`

Defined in: packages/operator/src/ProtocolClient.ts:27


client

client: WalletClient

Defined in: packages/core/src/clients/BaseClient.ts:6

Inherited from

BaseClient.client


dvtValidatorAddress

dvtValidatorAddress: `0x${string}`

Defined in: packages/operator/src/ProtocolClient.ts:26


entryPointAddress?

protected optional entryPointAddress: `0x${string}`

Defined in: packages/core/src/clients/BaseClient.ts:12

Inherited from

BaseClient.entryPointAddress


gTokenAddress?

protected optional gTokenAddress: `0x${string}`

Defined in: packages/core/src/clients/BaseClient.ts:9

Inherited from

BaseClient.gTokenAddress


gTokenStakingAddress?

protected optional gTokenStakingAddress: `0x${string}`

Defined in: packages/core/src/clients/BaseClient.ts:10

Inherited from

BaseClient.gTokenStakingAddress


paymasterFactoryAddress?

protected optional paymasterFactoryAddress: `0x${string}`

Defined in: packages/core/src/clients/BaseClient.ts:11

Inherited from

BaseClient.paymasterFactoryAddress


publicClient?

optional publicClient: PublicClient

Defined in: packages/core/src/clients/BaseClient.ts:7

Inherited from

BaseClient.publicClient


registryAddress?

protected optional registryAddress: `0x${string}`

Defined in: packages/core/src/clients/BaseClient.ts:8

Inherited from

BaseClient.registryAddress


superPaymasterAddress?

optional superPaymasterAddress: `0x${string}`

Defined in: packages/operator/src/ProtocolClient.ts:28

Methods

createProposal()

createProposal(target, calldata, description, options?): Promise<`0x${string}`>

Defined in: packages/operator/src/ProtocolClient.ts:44

Create a new proposal

Parameters

Parameter Type
target `0x${string}`
calldata `0x${string}`
description string
options? TransactionOptions

Returns

Promise<`0x${string}`>


executeWithProof()

executeWithProof(proposalId, signatures, options?): Promise<`0x${string}`>

Defined in: packages/operator/src/ProtocolClient.ts:78

Execute a proposal with collected signatures

Parameters

Parameter Type
proposalId bigint
signatures `0x${string}`[]
options? TransactionOptions

Returns

Promise<`0x${string}`>


getAddress()

getAddress(): `0x${string}`

Defined in: packages/core/src/clients/BaseClient.ts:34

Get the account address of the connected wallet

Returns

`0x${string}`

Inherited from

BaseClient.getAddress


getStartPublicClient()

getStartPublicClient(): PublicClient | WalletClient<Transport, Chain | undefined, Account | undefined>

Defined in: packages/core/src/clients/BaseClient.ts:41

Helper to ensure public client exists or fallback to wallet client (if it supports read)

Returns

PublicClient | WalletClient<Transport, Chain | undefined, Account | undefined>

Inherited from

BaseClient.getStartPublicClient


registerBLSKey()

registerBLSKey(publicKey, options?): Promise<`0x${string}`>

Defined in: packages/operator/src/ProtocolClient.ts:101

Parameters

Parameter Type
publicKey `0x${string}`
options? TransactionOptions

Returns

Promise<`0x${string}`>


requireEntryPoint()

protected requireEntryPoint(): `0x${string}`

Defined in: packages/core/src/clients/BaseClient.ts:73

Returns

`0x${string}`

Inherited from

BaseClient.requireEntryPoint


requireGToken()

protected requireGToken(): `0x${string}`

Defined in: packages/core/src/clients/BaseClient.ts:52

Returns

`0x${string}`

Inherited from

BaseClient.requireGToken


requireGTokenStaking()

protected requireGTokenStaking(): `0x${string}`

Defined in: packages/core/src/clients/BaseClient.ts:59

Returns

`0x${string}`

Inherited from

BaseClient.requireGTokenStaking


requirePaymasterFactory()

protected requirePaymasterFactory(): `0x${string}`

Defined in: packages/core/src/clients/BaseClient.ts:66

Returns

`0x${string}`

Inherited from

BaseClient.requirePaymasterFactory


requireRegistry()

protected requireRegistry(): `0x${string}`

Defined in: packages/core/src/clients/BaseClient.ts:45

Returns

`0x${string}`

Inherited from

BaseClient.requireRegistry


setProtocolFee()

setProtocolFee(bps, options?): Promise<`0x${string}`>

Defined in: packages/operator/src/ProtocolClient.ts:123

Parameters

Parameter Type
bps bigint
options? TransactionOptions

Returns

Promise<`0x${string}`>


setTreasury()

setTreasury(treasury, options?): Promise<`0x${string}`>

Defined in: packages/operator/src/ProtocolClient.ts:139

Parameters

Parameter Type
treasury `0x${string}`
options? TransactionOptions

Returns

Promise<`0x${string}`>


signProposal()

signProposal(proposalId, signature, options?): Promise<`0x${string}`>

Defined in: packages/operator/src/ProtocolClient.ts:62

Parameters

Parameter Type Default value
proposalId bigint undefined
signature `0x${string}` '0x'
options? TransactionOptions undefined

Returns

Promise<`0x${string}`>