This repository contains smart contracts for the Dusk ecosystem:
- Genesis protocol contracts: part of the genesis state and provide core functionality to the Dusk protocol.
- Test contracts: small contracts used for integration tests and host function coverage.
Other parts of the protocol are implemented largely in Rusk.
The transfer contract acts as the entrypoint for any transaction happening on the network and manages the native Dusk token.
The on-chain ContractId for the transfer contract is:
0100000000000000000000000000000000000000000000000000000000000000
The stake contract tracks public key stakes. It allows users to stake Dusk tokens subject to a maturation period before becoming eligible for consensus participation.
The on-chain ContractId for the stake contract is:
0200000000000000000000000000000000000000000000000000000000000000
alice: exercises calls into the transfer contract (deposit/withdraw/contract-to-contract) and staking via the relayer.bob: example contract with an owner-restricted call and aReceiveFromContracthandler.charlie: relayer contract that stakes/unstakes/withdraws on behalf of a contract via the transfer and stake contracts.host_fn: wraps host functions (hashing, signature/proof verification, chain metadata, etc.) for testing.