Newcoin.org
Search…
πŸͺ£
DAO pools tooling
Leverage the stake pool libraries to create pools, stake withdraw and whitelist users.
​

How to create a DAO?

pnco
ncojs
​
cleos -u http://testnet.newcoin.org push transaction '{
"delay_sec": 0,
"max_cpu_usage_ms": 0,
"actions": [
{
"account": "pools.nco",
"name": "createpool",
"data": {
"owner": "alice",
"description": "some description",
},
"authorization": [
{
"actor": "alice",
"permission": "active"
}
]
}
]
}'
const result = await api.transact({
actions: [{
account: 'pools.nco',
name: 'createpool',
authorization: [{
actor: 'alice',
permission: 'active',
}],
data: {
owner: 'alice',
description: 'some description'
},
}]
}, {
blocksBehind: 3,
expireSeconds: 30,
});

How to stake to DAO?

pnco
ncojs
​
cleos -u http://testnet.newcoin.org push transaction '{
"delay_sec": 0,
"max_cpu_usage_ms": 0,
"actions": [
{
"account": "token.nco",
"name": "transfer",
"data": {
"from": "alice",
"to": "pools.nco",
"quantity": "10000.0000 NCO",
"memo": "pool:1"
},
"authorization": [
{
"actor": "alice",
"permission": "active"
}
]
}
]
}'
​
const result = await api.transact({
actions: [{
account: 'token.nco',
name: 'transfer',
authorization: [{
actor: 'alice',
permission: 'active',
}],
data: {
from: 'alice',
to: 'pools.nco',
quantity: '10000.0000 NCO',
memo: 'pool:1'
},
}]
}, {
blocksBehind: 3,
expireSeconds: 30,
});

How to withdraw from DAO?

pnco
ncojs
​
cleos -u http://testnet.newcoin.org push transaction '{
"delay_sec": 0,
"max_cpu_usage_ms": 0,
"actions": [
{
"account": "pools.nco",
"name": "withdraw",
"data": {
"owner": "alice",
"quantity": "100000 CA"
},
"authorization": [
{
"actor": "alice",
"permission": "active"
}
]
}
]
}'
const result = await api.transact({
actions: [{
account: 'pools.nco',
name: 'withdraw',
authorization: [{
actor: 'alice',
permission: 'active',
}],
data: {
owner: 'alice',
quantity: '100000 CA'
},
}]
}, {
blocksBehind: 3,
expireSeconds: 30,
});

How to add user to white list?

pnco
cleos -u http://testnet.newcoin.org push transaction '{
"delay_sec": 0,
"max_cpu_usage_ms": 0,
"actions": [
{
"account": "pools.nco",
"name": "addwhlst",
"data": {
"id": "1",
"user": "alice"
},
"authorization": [
{
"actor": "alice",
"permission": "active"
}
]
}
]
}'