A contract that allows the minting and burning of tokens if and only if they satisfy the transformation equation
where
and the token name equation
where
A detailed docs folder exists for further explaination.
The start_info.json
file holds the starter token information.
{
"__comment1__": "This is the starter token for the lock contract",
"starterPid": "ac74c28dcc6b051133f28ebb38cebfaf569f73a0b19ac8b9752c3796",
"starterTkn": "01c0350934754552b043184ca68df84b9359dbff2fd410a5eef03f7611ebc9df"
}
Run the complete_build.sh
script to build the contract and autopopulate the datum. This script requires aiken
on path to work.
./complete_build.sh
I will try to keep the tests up-to-date. Run the test suite with the command below.
aiken check
A scripts folder exists for more information on how to use the contract. There are two endpoints inside the contract, injection and extraction. These endpoints handle injection and extraction of lovelace and the minting and burning of tokens.
The inject ADA endpoint will send ADA into the contract and mint N tokens back to your wallet. The larger the N the harder it is to guess the values the tokens represent.
The extract ADA endpoint will burn M tokens and extract K ADA then mint N tokens back to your wallet. The contract expects tokens to be burned to extract value out of the contract but for security more tokens must also be minted.
These tokens can be traded like normal tokens but the token information needs to be communicated in a secure off-chain channel. Without the token information a token can not be burned.
This contract is research purposes only. Do not use.