This workflow will help you as an example when you want to integrate Kudos ink!
in your repository. This workflow describes a simple case when the assignee of the issue will be "approved" to claim a reward in the smart contract as soon as the issue is closed. You can customize it and create more advanced workflows.
The workflow must include this custom GitHub Action that will call the approve method of the contract. More information about the action here
- Create your smart contract follow the guidelines from our contracts repository.
- Deploy it and instantiate it.
- Register yourself as a contributor in the smart contract provided by the organization you want to contribute using the method registerIdentity.
- Copy the workflow file in your repository.
- Create these configuration variables in your repository:
- WS_PROVIDER_URL: the web-socket url of the parachain where the smart contract is placed
- CONTRACT_ADDRESS: the address of the contract
- ABI: the abi (JSON) of the contract
- Create this secret in your repository:
- MNEMONIC_PHRASE: mnemonic phrase of the account used when the contract was instantiated.
- Create a new Issue with the label "payment".
- Assign it to a contributor that wants to get a reward by solving the issue.
- Close it when the work is done. This will trigger the workflow that will call the smart contract.
- Optionally, check the workflow output.
https://github.com/kudos-ink/workflow-example/actions/runs/6685279925/job/18163413958