CDKDataCommittee.sol
## Functions ### ### Allows the admin to setup members of the committee. - The system requires N/M signatures where N => and M => . - The number of urls must be
Functions
initialize
function initialize(
) externalsetupCommittee
Allows the admin to setup members of the committee.
function setupCommittee(
uint256 _requiredAmountOfSignatures,
string[] urls,
bytes addrsBytes
) external- The system requires N/M signatures where N =>
_requiredAmountOfSignaturesand M =>urls.length. - The number of urls must be the same as the addresses encoded in the
addrsBytes. - A member is represented by a url and the address contained in
urls[i]andaddrsBytes[i*_ADDR_SIZE : i*_ADDR_SIZE + _ADDR_SIZE].
Parameters
| Name | Type | Description |
|---|---|---|
_requiredAmountOfSignatures | uint256 | Required amount of signatures |
urls | string[] | List of urls of the members of the committee |
addrsBytes | bytes | Byte array that contains the addressess of the members of the committee |
getAmountOfMembers
function getAmountOfMembers(
) public returns (uint256)verifySignatures
Verifies that the given signedHash has been signed by requiredAmountOfSignatures committee members.
function verifySignatures(
bytes32 signedHash,
bytes signaturesAndAddrs
) externalParameters
| Name | Type | Description |
|---|---|---|
signedHash | bytes32 | Hash that must have been signed by requiredAmountOfSignatures of committee members |
signaturesAndAddrs | bytes | Byte array containing the signatures and all the addresses of the committee in ascending order |
| [signature 0, ..., signature requiredAmountOfSignatures -1, address 0, ... address N] | ||
| note that each ECDSA signatures are used, therefore each one must be 65 bytes |
Events
CommitteeUpdated
Emitted when the committee is updated.
event CommitteeUpdated(
bytes32 committeeHash
)Parameters
| Name | Type | Description |
|---|---|---|
committeeHash | bytes32 | hash of the addresses of the committee members |
Edit on GitHub
Last updated on
PolygonZkEVMGlobalExitRootV2.sol
Contract responsible for managing the exit roots across multiple networks. ## Functions ### ##### Parameters | Name | Type | Description | | :--- | :--- | :----
PolygonDataComittee.sol
## Functions ### ##### Parameters | Name | Type | Description | | :--- | :--- | :------------------------------------------------------------------- | | | contr