I’ve completed the first round automation such that a new agent can be spawned and it will complete all actions of the Quickstart including Fulfilling the contract. I’ve also added code to pickup subsequent contracts but the first time this occurred the contract required a resource that is not the result of mining, so I’ll need to add further automation to cater for that case.

I’m saving state from some of the api responses to postgres and using the existing types the api returns in combination with postgres jsonb columns to store the data. By default Adminer truncates long JSON columns. While a plugin exists to solve this the adminer docker container only includes official plugins. To solve for this, i’ll use the docker compose feature dockerfile_inline:

adminer:
    build:
      dockerfile_inline: |
        FROM adminer
        ADD --chmod=644 https://raw.githubusercontent.com/staff0rd/adminer-plugins/master/AdminerJsonPreview.php /var/www/html/plugins/AdminerJsonPreview.php
    restart: unless-stopped
    ports:
      - '8080:8080'
    environment:
      ADMINER_PLUGINS: 'AdminerJsonPreview'

This approach allows me to extend the adminer container without having to have a Dockerfile on disk, and thankfully ADD supports fetching files from the internet, so I don’t need the plugin on disk either.

Source