Defined in: admin/src/ProtocolGovernance.ts:20
ProtocolGovernance - L3 Pattern
Responsibilities:
- Global Protocol Parameter Management (Registry, EntryPoint)
- High-level Governance Operations (DAO Transfer, Upgrades)
- SuperPaymaster & Module Approval
new ProtocolGovernance(
config):ProtocolGovernance
Defined in: admin/src/ProtocolGovernance.ts:24
| Parameter | Type |
|---|---|
config |
ClientConfig & object |
ProtocolGovernance
client:
WalletClient
Defined in: core/dist/clients/BaseClient.d.ts:5
entryPointAddress:
`0x${string}`
Defined in: admin/src/ProtocolGovernance.ts:22
protectedoptionalgTokenAddress:`0x${string}`
Defined in: core/dist/clients/BaseClient.d.ts:8
protectedoptionalgTokenStakingAddress:`0x${string}`
Defined in: core/dist/clients/BaseClient.d.ts:9
BaseClient.gTokenStakingAddress
protectedoptionalpaymasterFactoryAddress:`0x${string}`
Defined in: core/dist/clients/BaseClient.d.ts:10
BaseClient.paymasterFactoryAddress
optionalpublicClient:PublicClient
Defined in: core/dist/clients/BaseClient.d.ts:6
registryAddress:
`0x${string}`
Defined in: admin/src/ProtocolGovernance.ts:21
configureRole(
params,options?):Promise<`0x${string}`>
Defined in: admin/src/ProtocolGovernance.ts:95
Configure a Role's parameters (Admin only). Reads the current on-chain config first, then merges the provided overrides and writes back the full struct via configureRole.
| Parameter | Type |
|---|---|
params |
{ exitFeePercent?: bigint; minExitFee?: bigint; minStake?: bigint; roleId: `0x${string}`; ticketPrice?: bigint; } |
params.exitFeePercent? |
bigint |
params.minExitFee? |
bigint |
params.minStake? |
bigint |
params.roleId? |
`0x${string}` |
params.ticketPrice? |
bigint |
options? |
TransactionOptions |
Promise<`0x${string}`>
getAddress():
`0x${string}`
Defined in: core/dist/clients/BaseClient.d.ts:16
Get the account address of the connected wallet
`0x${string}`
getProtocolParams():
Promise<ProtocolParams>
Defined in: admin/src/ProtocolGovernance.ts:137
Promise<ProtocolParams>
getStartPublicClient():
WalletClient<Transport,Chain|undefined,Account|undefined> |PublicClient
Defined in: core/dist/clients/BaseClient.d.ts:20
Helper to ensure public client exists or fallback to wallet client (if it supports read)
WalletClient<Transport, Chain | undefined, Account | undefined> | PublicClient
BaseClient.getStartPublicClient
protectedrequireEntryPoint():`0x${string}`
Defined in: core/dist/clients/BaseClient.d.ts:25
`0x${string}`
protectedrequireGToken():`0x${string}`
Defined in: core/dist/clients/BaseClient.d.ts:22
`0x${string}`
protectedrequireGTokenStaking():`0x${string}`
Defined in: core/dist/clients/BaseClient.d.ts:23
`0x${string}`
BaseClient.requireGTokenStaking
protectedrequirePaymasterFactory():`0x${string}`
Defined in: core/dist/clients/BaseClient.d.ts:24
`0x${string}`
BaseClient.requirePaymasterFactory
protectedrequireRegistry():`0x${string}`
Defined in: core/dist/clients/BaseClient.d.ts:21
`0x${string}`
setStaking(
staking,options?):Promise<`0x${string}`>
Defined in: admin/src/ProtocolGovernance.ts:82
Set the Staking contract address
| Parameter | Type |
|---|---|
staking |
`0x${string}` |
options? |
TransactionOptions |
Promise<`0x${string}`>
setSuperPaymaster(
paymaster,options?):Promise<`0x${string}`>
Defined in: admin/src/ProtocolGovernance.ts:71
Approve a new SuperPaymaster contract address
| Parameter | Type |
|---|---|
paymaster |
`0x${string}` |
options? |
TransactionOptions |
Promise<`0x${string}`>
setTreasury(
treasury,options?):Promise<`0x${string}`>
Defined in: admin/src/ProtocolGovernance.ts:40
Update the Global Treasury Address where protocol fees are collected
| Parameter | Type |
|---|---|
treasury |
`0x${string}` |
options? |
TransactionOptions |
Promise<`0x${string}`>
transferToDAO(
daoAddress,options?):Promise<`0x${string}`>
Defined in: admin/src/ProtocolGovernance.ts:125
Transfer Protocol Ownership to a DAO (Multisig/Timelock) This is the final step of "Protocol Admin" lifecycle.
| Parameter | Type |
|---|---|
daoAddress |
`0x${string}` |
options? |
TransactionOptions |
Promise<`0x${string}`>
updateEntryPoint(
entryPoint,options?):Promise<`0x${string}`>
Defined in: admin/src/ProtocolGovernance.ts:57
Update the supported EntryPoint address
| Parameter | Type |
|---|---|
entryPoint |
`0x${string}` |
options? |
TransactionOptions |
Promise<`0x${string}`>