-
Couldn't load subscription status.
- Fork 7
Quorum
-
The contract maintains an administrator, who can update quorum members.
-
Each quorum member is identified by his ipns key, used to publish the head of its events.
-
Quorum is responsible of signing minting, burning and tokens operations.
-
Each quorum member can define a payment address, different from the implicit account associated with his key.
-
The contract for now, also acts as a quorum oracle : it says to the minter contract which signer is entitled for a reward.
|
❗
|
Quorum contract doesn’t store minter contract address. It is passed as a parameter in most methods. |
|
ℹ️
|
Anyone can call this entrypoints, as long as the signatures from the signers are valid, and the threshold is reached. Anti-replay is not implemented here, but rather in the Minter contract |
There is actually only one entrypoint in this section, that acts like a specialized multisig, targeting a specific branch of the minter contract parameter.
This is the actual entrypoint users should call
(pair %minter
(pair %action
(or %entrypoint
(or (pair %add_erc20 (bytes %eth_contract) (pair %token_address address nat))
(pair %add_erc721 (bytes %eth_contract) (address %token_contract)))
(or (pair %mint_erc20
(bytes %erc_20)
(pair (pair %event_id (bytes %block_hash) (nat %log_index))
(pair (address %owner) (nat %amount))))
(pair %mint_erc721
(bytes %erc_721)
(pair (pair %event_id (bytes %block_hash) (nat %log_index))
(pair (address %owner) (nat %token_id))))))
(address %target))
(list %signatures (pair string signature)))The signature scheme is as follow:
(
chain_id *
address (1)
) *
(
minter_entrypoint (2)
* address (3)
)-
Quorum contract address
-
Actual minter contract invocation
-
Minter contract address
%target should be the minter contract address.
That means that the quorum can actually manage several minter compatible contracts (usefull to support several blockchains, and not only ethereum).
It makes impossible to use the signature on any other contract than the one intended, on the chain intended, for the intended target.
Minter entrypoint will check the signatures and threshold, and call the minter contract. Every payment will be passed along. It is required for NFT minting, since fees are collected in XTZ in that case.
|
ℹ️
|
Anyone can call these entrypoints, as the contracts can check for amount and tokens validity. |
For now, quorum contract acts as a signer activity oracles. He must inform minter contract on which signer is entitled for a reward.
(pair %distribute_tokens_with_quorum
(address %minter_contract)
(list %tokens (pair address nat)))Computes the hash of all current quorum signers keys, and call minter contract, passing also the tokens list that was specified. This a kind of very simple oracle, providing the minter contract with quorum members entitled for fees.
These entrypoints are permissionned. Only address identified as admin in the storage can call this methods. The admin should be a multisig.
(pair %change_quorum nat (map string key))Given a map string key and a threshold, updates the current quorum. Will ensure that no duplicated keys are in use, and that threshold is valid
(nat %change_threshold)Change currernt threshold. Will ensure that the value is not 0 and is lesser or equal than quorum size.
(address %set_admin)Change quorum admin. This is a two steps process, so the new admin should call confirm_admin
(pair %set_signer_payment_address
(pair (address %minter_contract) (signature %signature))
(string %signer_id))Let a signer change his payment address. He must sign a payload like so :
(
chain_id *
address (1)
) *
(
nat (2)
*
(
address (3)
* address (4)
)
)-
Quorum contract address
-
Current counter
-
Minter contract address
-
Sender address
The sender address is always used as the new payment address. Contract keeps track of a counter per signer, that will increment with each call. This is an anti-replay protection. If all checks are green, minter contract will be called to update the payment address.