DeTake
About DeTake Project
DeTake can utilize your idle on-chain accounts to do some decentralized stuff on chain and obtain the rewards from task distributors.
Prominent Features
- Multiple accounts manipulation
- Automatic JSON-RPC shift
- Programmatic and scalable modules in js
- Snapshot/revert tasks
Getting Started
You can access an online version or download a self-contained prebuilt PWA based on Chrome for your platform from this repository’s releases page.
Settings
RPC
Navigate to infura powered by Consensys and get your own account.
Once verified, you’ll be taken to the Infura dashboard where you can create projects, view analytics, select add-ons, or raise support requests.
Click CREATE NEW PROJECT
.
From the pop-up:
- Select a network in the
PRODUCT
dropdown list. - Provide a project(e.g. detake) name, then click
CREATE
.
Under the Setting tab, make sure you’ve copied the correct endpoints urls and fill them into the text box in RPC section.
Avaliable Dapp Routers
Blockchain | Contract Address |
---|---|
Görli | 0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e |
Polygon | 0x11ce4B23bD875D7F5C6a31084f55fDe1e9A87507 |
Mumbai | 0x08411ADd0b5AA8ee47563b146743C13b3556c9Cc |
Detake Module
Detake Module
or Detake Module Js
is a simple javascript code snippet written in a specific format like this:
import { ethers } from 'ethers'
import { Errors } from 'detake/errors'
import { moduleA } from '../moduleA.js'
// Errors type: Fatal/Exception
// If a Fatal error was thrown, the Order will stop
const doMain = async (index, account, globalStates) => {
// do something amazing
return true
}
function handleErrors(err) {}
export {
__MODULE__: 'some_module_name',
doMain,
txHash: '0x',
logs: [],
events: [],
bizData: {
field1: 'foobar'
},
global: {
loadStatus100: true
}
}
Regarding to the design, the parameters or results can be accessed via different jobs in the same level or processed by the job moderator
initiated by detake main application. Any errors occur during the execution will be catched and handled collectively with the corresponded context details displaying in each Order
panel’ log section.
Contributing
Please open issues and pull requests for new features, questions, and bug fixes.
Requirements:
node v11.0.0
Vue v3.0
Vite v2.9.9
To get started:
Clone this repo, then
$ yarn
$ yarn dev