Creating Web3 CDS
Last updated by Tim Delhaes 2 months ago
CDS are JSON files that define how the Grindery Nexus workflow engine can interact with outside systems. This document outlines how to produce these CDS files for W3 systems.
To understand the instructions in this document you need to have experience with Ethereum smart contract, understand Solidity concepts like function, event and data types, additionally you need to know how to edit a JSON file.
Additionally you should make yourself familiar with Zapier. This means specifically:
Then reading the following documents is required
Finally have a look at he following Sample CDS
Before starting to work please make sure you have been added to Discord and our Slack channel.To get support please contact CESAR in Discord. You should submit the created JSON file to the specified GitHub repository mentioned below .
Selecting a CDS
Please pick any dApp from the list and add your name into the column X and set a delivery not more then 72h later. Do not pick up more than one contract at a time.
Creating the CDS
Creating a new CDS can take between xh yh depending on the length/complexity of the smart contract and the experience of the person creating it. The main steps to do this are
Get the ABI of the contract in blockchain explorer site depending on the chain (for example, https://etherscan.io/ for Ethereum and https://blockscout.com/xdai for xDai)
Open the ABI to CDS converter to generate the preliminary CDS
Submit the created CDS JSON file by creating a pull request at https://github.com/grindery-io/grindery-nexus-schema-v2 , the file should be saved to /cds/web3 folder.
Editing the CDS
Please change auto-generated `key` and `name` on the top of the CDS file to proper key and human-readable name so that user can understand what smart contract the CDS is for.
Change the generated item name to a more descriptive one when possible. You should consult documentation and/or source code of the smart contract to understand what it does.
Add user-friendly descriptions. Note the difference between triggers and actions, descriptions of trigger should describe data of a happened event, and for action it should describe parameters of a smart contract call.
For a parameter that is supposed to be chosen from a list of values, add `choices` to field definition to specify allowed values. See https://github.com/grindery-io/grindery-nexus-schema-v2/tree/master/connectors#fieldschema for schema of field definition.