Creating Web3 CDS

Last Modified Avatar

Last updated by Tim Delhaes 2 months ago

Creating Web3 CDS

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.
Prerequisites
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:
Create a few ZAPs between different apps
Play around with the Zapier Developer Portal
Look at Zapier documentation related to creating new dApps
Then reading the following documents is required
Whitepaper 2.2
On Connectors


Finally have a look at he following Sample CDS
ERC-20 Token - CDS / ABI
Setup
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 contract address of the dApp on a specific chain.
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
Edit the CDS (See below)
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
Xxx
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.
Review all triggers and actions (and their fields) and:
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.
Quality assurance

Can't find what you're looking for?

Contact Us
Refreshed On: Aug 16, 2022 04:39:38 UTC+00:00