Konubinix' opinionated web of thoughts

How Tezos Works


how tezos works


When you create a keypair, you have to

  1. activate the account, that means have another person give you your first amount of tezzies,
  2. reveal the account, that means send an operation of kind reveal signed with your key.

Sending an operation

You have to

  1. forge the operation, that means create a binary representation of the json description of what you want to have done in the blockchain.
  2. sign it with you private key
  3. inject it

Writing a smart contract in smartpy

The sp.verify operations are executed during the forge part.

Tezos will answer with the full compiled michelson, as well as a line of code that looks like the sp.verify content

"name": "TezosOperationError",
      "id": "proto.010-PtGRANAD.michelson_v1.script_rejected",
      "kind": "temporary",
      "message": "WrongCondition: ((self.data.owner == sp.sender) | (~ self.data.locked)) & (self.data.balances[sp.sender] >= params.tokens)",
      "status": 500

To create a test account

  1. go to https://smartpy.io/ide, bootstrap using a template
  2. put the code in the editor
  3. change the admin to a key you own (use a faucet if in a testnet)
  4. deploy the contract using the document on the right
  1. use the explorer to mint some data
  2. play with it