anchor.diff:            oracle_ttl    => {delta, TTL},
             ttl           => 0, %% Not used.
             fee           => 0},
  +    {ok, Tx} = aeo_register_tx:new(Spec),
   
       %% TODO: To register an oracle for another account than the contract
       %%       we need a safe way to sign the register call.
  
positive.code:                    ttl      => 0 %% Not used
                    }),
  
      ConsensusVersion = aec_hard_forks:protocol_effective_at_height(Height),
  
      case aetx:check_from_contract(Tx, Trees, Height, ConsensusVersion) of
          {ok, Trees1} ->
              {ok, Trees2} = aetx:process_from_contract(Tx, Trees1, Height, ConsensusVersion),
              State1 = State#state{ trees = Trees2 },
              {ok, State1};
          {error, _} = E -> E
      end.
  
  oracle_extend(Oracle,_Sign, Fee, TTL,
                State = #state{ trees   = Trees,
                                height  = Height,
                                account = ContractKey} = State) ->
      AT = aec_trees:accounts(Trees),
      {value, Account} = aec_accounts_trees:lookup(ContractKey, AT),
      Nonce = aec_accounts:nonce(Account) + 1,
      {ok, Tx} =
          aeo_extend_tx:new(#{oracle    => Oracle,
                              nonce      => Nonce,
                              oracle_ttl => {delta, TTL},
                              fee        => Fee,
                              ttl        => 0 %% Not used
                             }),
      ConsensusVersion = aec_hard_forks:protocol_effective_at_height(Height),
      case aetx:check_from_contract(Tx, Trees, Height, ConsensusVersion) of
          {ok, Trees1} ->
              {ok, Trees2} =
                  aetx:process_from_contract(Tx, Trees1, Height, ConsensusVersion),
              State1 = State#state{ trees = Trees2 },
              {ok, State1};
          {error, _} = E -> E
      end.
  
  oracle_get_answer(OracleId, QueryId, #state{ trees = Trees } =_State) ->
      case aeo_state_tree:lookup_query(OracleId, QueryId,
  
negative.code:                            fee           => 0,
                             ttl           => 0 %% Not used
                            }),
      case apply_transaction(Tx, State) of
          {ok, State1} ->
              {oracle_query_tx, OTx} = aetx:specialize_type(Tx),
              Query = aeo_query:new(OTx, Height),
              Id = aeo_query:id(Query),
              {ok, Id, State1};
          {error, _} = E -> E
      end.
  
  oracle_respond(Oracle, QueryId,_Sign, Response, State) ->
      %% TODO: Check signature
      Nonce = next_nonce(Oracle, State),
  
      {ok, Tx} = aeo_response_tx:new(
                   #{oracle   => Oracle,
  