// Test more advanced chain interactions

contract ChainTest =

  record state = { last_bf : address }

  function init() : state =
    {last_bf = Contract.address}

  function miner() = Chain.coinbase

  function save_coinbase() =
    put(state{last_bf = Chain.coinbase})
