VerificationKeyUpgradeAuthority
Hierarchy
- SmartContract
- VerificationKeyUpgradeAuthority
Implements
Index
Constructors
externalconstructor
Parameters
externaladdress: PublicKey
externaloptionaltokenId: Field
Returns VerificationKeyUpgradeAuthority
Properties
events
The events emitted by the VerificationKeyUpgradeAuthority contract.
Type declaration
updateDatabase: typeof UpgradeDatabaseState
validatorsList: typeof ValidatorsListEvent
upgradeDatabasePacked
Packed state containing the upgrade database information.
validators
The hash representing the current state of the validators list.
verificationKeyHash
The hash of the verification key.
Methods
checkValidatorsDecision
Checks the validators' decision by verifying the provided proof.
Parameters
proof: ValidatorsVotingProof
The proof to verify.
vk: VerificationKey
The verification key to validate the proof.
decisionType: Field
The type of decision being validated.
Returns Promise<void>
deploy
Deploys the contract and sets the initial state.
Returns Promise<void>
initialize
Initializes the contract with validators and sets the verification key hash.
Parameters
validators: ValidatorsState
The initial validators state.
storage: Storage
Off-chain storage information, e.g., IPFS hash.
verificationKeyHash: Field
The hash of the verification key.
Returns Promise<void>
setValidatorsList
Sets the validators list and emits an event.
Parameters
validators: ValidatorsState
The validators state to set.
storage: Storage
The storage associated with the validators list.
Returns Promise<void>
updateDatabase
Updates the upgrade database after validator consensus.
Parameters
proof: ValidatorsVotingProof
The proof of validators voting.
vk: VerificationKey
The verification key to validate the proof.
Returns Promise<void>
updateValidatorsList
Updates the validators list based on validator votes.
Parameters
validators: ValidatorsState
The new validators state.
storage: Storage
The storage associated with the validators list.
proof: ValidatorsVotingProof
The proof of validators voting.
vk: VerificationKey
The verification key to validate the proof.
Returns Promise<void>
publicverifyUpgradeData
Verifies the upgrade data provided by another contract.
Parameters
data: VerificationKeyUpgradeData
The upgrade data to verify.
Returns Promise<UpgradeAuthorityAnswer>
- The answer indicating verification result.
VerificationKeyUpgradeAuthority is a smart contract that provides a secure mechanism for upgrading the verification keys of other contracts without requiring redeployment. It manages a list of validators who can vote on upgrade proposals, ensuring that only authorized upgrades are applied.
Key Features: