Skip to content

ContributionKit

CoordinationKit

The CoordinationKit helps you build services to show off community contributions by letting users mint badges which evolve as they make contributions to the DAO. Such services work by monitoring user contributions, updating their badges accordingly and showing off contributions on NFT-enabled social media sites.

Autonolas Contribute, a service based on the CoordinationKit, streamlines the contribution experience for members of the Autonolas community. When someone mints a badge, they will start at the first tier. As they complete actions that contribute to the success of Autonolas, they will earn points and climb the leaderboard. When they earn enough points to reach a higher badge tier, their badge will automatically update to reflect the new rank. This is a great way to demonstrate contributions on NFT-enabled social media sites and earn recognition that reflects users' contribution within the Autonolas community.

Every few minutes an Autonolas Contribute checks the leaderboard. If a user has earned enough points to put them in a new badge tier the service will automatically update your badge NFT’s image. By completing certain actions, users climb the leaderboard and upgrade their badge.

Demo

Important

This section is under active development - please report issues in the Autonolas Discord.

Once you have set up your system to work with the Open Autonomy framework, you can run a local demo of the Autonolas Contribute service as follows:

  1. Fetch the Autonolas Contribute service.

    autonomy fetch valory/contribution:0.1.0:bafybeif4jiiwrqoiruq6el2dd7bdqqo4xvxrv3gsbjjss4hvi6pmn7bklu --service
    
  2. Build the Docker image of the service agents

    cd contribution
    autonomy build-image
    
  3. Prepare the keys.json file containing the wallet address and the private key for each of the agents.

    Example of a keys.json file

    WARNING: Use this file for testing purposes only. Never use the keys or addresses provided in this example in a production environment or for personal use.

    [
      {
          "address": "0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65",
          "private_key": "0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a"
      },
      {
          "address": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
          "private_key": "0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba"
      },
      {
          "address": "0x976EA74026E726554dB657fA54763abd0C3a0aa9",
          "private_key": "0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e"
      },
      {
          "address": "0x14dC79964da2C08b23698B3D3cc7Ca32193d9955",
          "private_key": "0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356"
      }
    ]
    
  4. Prepare the environment and build the service deployment.

    1. Create a service token (you can follow this guide).

    2. Create an .env file with the required environment variables.

    ETHEREUM_LEDGER_RPC=https://goerli.infura.io/v3/d27c4537b4c34e82b70bf970574a5f2d
    DYNAMIC_CONTRIBUTION_CONTRACT_ADDRESS=0x7c3b976434fae9986050b26089649d9f63314bd8
    EARLIEST_BLOCK_TO_MONITOR=8053690
    IPFS_GATEWAY_BASE_URL=https://gateway.staging.autonolas.tech/ipfs/
    LEADERBOARD_API_KEY=<google_api_key_here>
    LEADERBOARD_BASE_ENDPOINT=https://sheets.googleapis.com/v4/spreadsheets
    LEADERBOARD_LAYERS_RANGE=Layers!B1:Z32
    LEADERBOARD_POINTS_RANGE=Ranking!B2:C302
    LEADERBOARD_SHEET_ID=1m7jUYBoK4bFF0F2ZRnT60wUCAMWGMJ_ZfALsLfW5Dxc
    OBSERVATION_INTERVAL=10 SERVICE_AUTH=<service_auth_here>
    
    1. Build the service deployment.
    autonomy deploy build keys.json --aev
    
  5. Run the service.

    cd abci_build
    autonomy deploy run
    

    You can cancel the local execution at any time by pressing Ctrl+C.

Build

  1. Fork the CoordinationKit repository.
  2. Make the necessary adjustments to tailor the service to your needs. This could include:
    • Adjust configuration parameters (e.g., in the service.yaml file).
    • Expand the service finite-state machine with your custom states.
  3. Run your service as detailed above.

Looking for help building your own?

Refer to the Autonolas Discord community, or consider ecosystem services like Valory Propel for the fastest way to get your first autonomous service in production.