Bytom Reveal Preimage Contract

BytomDAO
3 min readSep 13, 2018

--

preparation

  1. Install all node wallet V1.0.5 and fully sync
  2. have issued an asset:https://medium.com/@Bytom_Official/how-to-issue-asset-on-bytom-e3ef310bc433
  3. prepare gas

lock asset

  1. open wallet,click Equity contract;

2.enter the Equity contract page,load and you can see the Reveal Preimage:

3.click and enter this template

4.in the “valueto lock” page,choose the reward(now it doesn't support lock BTM directly,so we need to create a new asset)

choose your asset amount(1=1neu=0.00000001,enter your password and Gas)

5.Set the correct answer of Reveal Preimage,for example I filled “Computing is power” and then lock value

6.Reveal Preimage is a special transaction and wait for transaction on chain

7.successfully set contract

8.view details and find the asset ID of this asset ,send this asset ID to someong else to participate in the activity

unlock contract asset

1.acquire the ID of asset ,take the above for example:9795e24cd617d04f2482f1c884b9cd7a65424926f9ce25ef6e66e884ce1d378d

2.enter the Equity contract page and then the “unlock value” page,enter the asset ID:

3.If the contract is on chain then enter unlock page ,you can see the content and locked asset and its number

4.enter password to appoint unlock account ,password and gas(0.4BTM),click “unlock value”

5.unlock value successfully,wait for verification and asset will be sent to your account

If you are interested in this contract,you can also develop a DApp:)

--

--

BytomDAO
BytomDAO

No responses yet