Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ppe/the one with wasm support #101

Merged
merged 11 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ module.exports = {

testEnvironment: 'node',

"transformIgnorePatterns": [
ppedziwiatr marked this conversation as resolved.
Show resolved Hide resolved
"<rootDir>/node_modules/(?!@assemblyscript/.*)"
],


transform: {
'^.+\\.(ts)$': 'ts-jest'
'^.+\\.(ts|js)$': 'ts-jest'
}
};
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
},
"homepage": "https://github.com/redstone-finance/redstone-smartweave#readme",
"dependencies": {
"@assemblyscript/loader": "^0.19.23",
"@weavery/clarity": "^0.1.5",
"arweave": "^1.10.16",
"arweave-multihost": "^0.1.0",
Expand All @@ -61,7 +62,8 @@
"lodash": "^4.17.21",
"redstone-isomorphic": "^1.0.2",
"tslog": "^3.2.2",
"undici": "^4.12.2"
"undici": "^4.12.2",
"wasm-metering": "^0.2.1"
},
"devDependencies": {
"@types/cheerio": "^0.22.30",
Expand Down
5 changes: 5 additions & 0 deletions src/__tests__/integration/data/wasm/counter-init-state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"firstName": "first_ppe",
"lastName": "last_ppe",
"counter": 0
}
Binary file added src/__tests__/integration/data/wasm/counter.wasm
Binary file not shown.
149 changes: 149 additions & 0 deletions src/__tests__/integration/wasm-deploy-write-read.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
import fs from 'fs';

import ArLocal from 'arlocal';
import Arweave from 'arweave';
import { JWKInterface } from 'arweave/node/lib/wallet';
import {Contract, getTag, LoggerFactory, SmartWeave, SmartWeaveNodeFactory, SmartWeaveTags} from '@smartweave';
import path from 'path';
import { addFunds, mineBlock } from './_helpers';

interface ExampleContractState {
counter: number;
}

describe('Testing the SmartWeave client for WASM contract', () => {
let contractSrc: Buffer;
let initialState: string;
let contractTxId: string;

let wallet: JWKInterface;

let arweave: Arweave;
let arlocal: ArLocal;
let smartweave: SmartWeave;
let contract: Contract<ExampleContractState>;

beforeAll(async () => {
// note: each tests suit (i.e. file with tests that Jest is running concurrently
// with another files has to have ArLocal set to a different port!)
arlocal = new ArLocal(1300, false);
await arlocal.start();

arweave = Arweave.init({
host: 'localhost',
port: 1300,
protocol: 'http'
});

LoggerFactory.INST.logLevel('error');
LoggerFactory.INST.logLevel('debug', 'WasmContractHandlerApi');
LoggerFactory.INST.logLevel('debug', 'WASM');

smartweave = SmartWeaveNodeFactory.memCached(arweave);

wallet = await arweave.wallets.generate();
await addFunds(arweave, wallet);

contractSrc = fs.readFileSync(path.join(__dirname, 'data/wasm/counter.wasm'));
initialState = fs.readFileSync(path.join(__dirname, 'data/wasm/counter-init-state.json'), 'utf8');

// deploying contract using the new SDK.
contractTxId = await smartweave.createContract.deploy({
wallet,
initState: initialState,
src: contractSrc
});

contract = smartweave.contract<ExampleContractState>(contractTxId).setEvaluationOptions({
gasLimit: 12000000
});
contract.connect(wallet);

await mineBlock(arweave);
});

afterAll(async () => {
await arlocal.stop();
});

it('should properly deploy contract', async () => {
const contractTx = await arweave.transactions.get(contractTxId);

expect(contractTx).not.toBeNull();
expect(getTag(contractTx, SmartWeaveTags.CONTRACT_TYPE)).toEqual('wasm');
expect(getTag(contractTx, SmartWeaveTags.WASM_LANG)).toEqual('assemblyscript');

const contractSrcTx = await arweave.transactions.get(getTag(contractTx, SmartWeaveTags.CONTRACT_SRC_TX_ID));
expect(getTag(contractSrcTx, SmartWeaveTags.CONTENT_TYPE)).toEqual('application/wasm');
expect(getTag(contractSrcTx, SmartWeaveTags.WASM_LANG)).toEqual('assemblyscript');
});

it('should properly read initial state', async () => {
expect((await contract.readState()).state.counter).toEqual(0);
});

it('should properly register interactions', async () => {
for (let i = 0; i < 100; i++) {
await contract.writeInteraction({ function: 'increment' });
}
});

it('should properly read state after adding interactions', async () => {
await mineBlock(arweave);

expect((await contract.readState()).state.counter).toEqual(100);
});

it('should properly view contract state', async () => {
const interactionResult = await contract.viewState<unknown, any>({ function: 'fullName' });

expect(interactionResult.result.fullName).toEqual('first_ppe last_ppe');
});

it('should measure gas during dryWrite', async () => {
const result = await contract.dryWrite({
function: 'increment'
});

expect(result.gasUsed).toEqual(9079017);
});

it('should return stable gas results', async () => {
const results = [];

for (let i = 0; i < 10; i++) {
results.push(
await contract.dryWrite({
function: 'increment'
})
);
}

results.forEach((result) => {
expect(result.gasUsed).toEqual(9079017);
});
});

it('should return exception for inf. loop function for dry run', async () => {
const result = await contract.dryWrite({
function: 'infLoop'
});

expect(result.type).toEqual('exception');
expect(result.errorMessage.startsWith('[RE:OOG')).toBeTruthy();
});

/*it('should skip interaction during contract state read if gas limit exceeded', async () => {
ppedziwiatr marked this conversation as resolved.
Show resolved Hide resolved
const txId = await contract.writeInteraction({ function: 'infLoop' });
await mineBlock(arweave);

const result = await contract.readState();

expect(result.validity[txId]).toBeFalsy();

const callStack = contract.getCallStack();
callStack.getInteraction(txId);

expect(callStack.getInteraction(txId)).toEqual({});
});*/
});
9 changes: 4 additions & 5 deletions src/__tests__/regression/read-state.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const arweave = Arweave.init({
host: 'arweave.net',
port: 443,
protocol: 'https',
timeout: 60000,
timeout: 20000,
logging: false
});

Expand All @@ -38,16 +38,15 @@ const testCasesGw: string[] = JSON.parse(fs.readFileSync(path.join(__dirname, 't
const chunked: string[][][] = [...chunks(testCases, 10)];
const chunkedGw: string[][][] = [...chunks(testCasesGw, 10)];

describe.each(chunked)('.suite %#', (contracts: string[]) => {
describe.each(chunked)('v1 compare.suite %#', (contracts: string[]) => {
// note: concurrent doesn't seem to be working here, duh...
// will probably need to manually split all the test cases to separate test files
it.concurrent.each(contracts)(
'.test %# %o',
async (contractTxId: string) => {
const blockHeight = 850127;
console.log('readContract', contractTxId);
const result = await readContract(arweave, contractTxId, blockHeight);
const resultString = stringify(result).trim();
const resultString = fs.readFileSync(path.join(__dirname, 'test-cases', 'contracts', `${contractTxId}.json`), 'utf-8').trim();
console.log('readState', contractTxId);
const result2 = await SmartWeaveNodeFactory.memCached(arweave, 1).contract(contractTxId).readState(blockHeight);
const result2String = stringify(result2.state).trim();
Expand All @@ -57,7 +56,7 @@ describe.each(chunked)('.suite %#', (contracts: string[]) => {
);
});

describe.each(chunkedGw)('.suite %#', (contracts: string[]) => {
describe.each(chunkedGw)('gateways compare.suite %#', (contracts: string[]) => {
// note: concurrent doesn't seem to be working here, duh...
// will probably need to manually split all the test cases to separate test files
it.concurrent.each(contracts)(
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"balances":{"wawczuq-7U5Zy836Er8whL_gSjfkPPVSAKHtsZVFTz8":4000000000},"name":"SuperDuper Test Community","roles":{},"settings":[["quorum",0.5],["support",0.5],["voteLength",3],["lockMinLength",1],["lockMaxLength",1000000],["communityLogo","cy--byB8840KyBBFgtpwmwNjs6UA1-FMMvifCr-9TEs"],["communityDescription","testttttt"],["communityAppUrl","https://www.arweave.org/"]],"ticker":"IGNOREME","vault":{"7po8ccucf9MlyJwBqDCz59sUahoRvM3sfvIUoZY7KB8":[{"balance":50002,"end":666253,"start":666251}],"wawczuq-7U5Zy836Er8whL_gSjfkPPVSAKHtsZVFTz8":[{"balance":6000000000,"end":670247,"start":666247}]},"votes":[{"lockLength":1,"nays":0,"note":"Testing","qty":50000,"recipient":"7po8ccucf9MlyJwBqDCz59sUahoRvM3sfvIUoZY7KB8","start":666237,"status":"quorumFailed","totalWeight":2500000000,"type":"mintLocked","voted":[],"yays":0},{"lockLength":2,"nays":0,"note":"testtttt","qty":51000,"recipient":"7po8ccucf9MlyJwBqDCz59sUahoRvM3sfvIUoZY7KB8","start":666244,"status":"active","totalWeight":2500000000,"type":"mintLocked","voted":[],"yays":0},{"lockLength":2,"nays":0,"note":"testtt","qty":50002,"recipient":"7po8ccucf9MlyJwBqDCz59sUahoRvM3sfvIUoZY7KB8","start":666245,"status":"passed","totalWeight":2500000000,"type":"mintLocked","voted":["wawczuq-7U5Zy836Er8whL_gSjfkPPVSAKHtsZVFTz8"],"yays":2500000000},{"lockLength":1,"nays":0,"note":"testing","qty":50003,"recipient":"7po8ccucf9MlyJwBqDCz59sUahoRvM3sfvIUoZY7KB8","start":666247,"status":"active","totalWeight":2500000000,"type":"mintLocked","voted":[],"yays":0}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"podcasts":[{"cover":"zu1qBLQQe-P87cCOOoM7ifothJbdLWuRUmmVx0MWutQ","description":"AMAs with the permaweb's best minds","episodes":[],"index":0,"logs":["0H_TFbD7n06ErRr2X09apUiVBVKIXIEh5cPECGVwPu0"],"owner":"kaYP9bJtpqON8Kyy3RbqnqdtDBDUsPTQTNUCvZtKiFI","pid":"0H_TFbD7n06ErRr2X09apUiVBVKIXIEh5cPECGVwPu0","podcastName":"Arweavers"}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"balances":{"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg":65988163},"name":"ArWiki","pages":{"ar":{},"de":{},"en":{"Test":{"active":true,"author":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","category":"the_arweave_project","content":"lhopybolmn9H6wdh8zI2JK81s6SZXQZfE0x0UnaBiZg","pageRewardAt":709438,"paidAt":"","sponsor":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","start":707438,"updates":[],"value":837},"arweave-intro":{"active":true,"author":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","category":"the_arweave_project","content":"h2MWweiJvOXK_gb7oFbslsN52KuHVy3zFdyen2ENJGo","pageRewardAt":709028,"paidAt":"","sponsor":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","start":707028,"updates":[],"value":1000},"arweave-mining":{"active":true,"author":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","category":"mining","content":"g0uzsSvkN5YPPjnHcaMvqvE1YGjb8Ck2-2UIpZGJRS4","pageRewardAt":709028,"paidAt":"","sponsor":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","start":707028,"updates":[],"value":1000},"content-policies":{"active":true,"author":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","category":"the_arweave_protocol","content":"0j_BI_0atzl6TfgDjChL1ajXAon2ujeu-VoLlnQPp9E","pageRewardAt":709028,"paidAt":"","sponsor":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","start":707028,"updates":[],"value":1000},"gateways":{"active":true,"author":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","category":"the_arweave_protocol","content":"p2fn_szyO99cwswgk8cMTgRQ9krbPyvXl0cE07056Xw","pageRewardAt":709028,"paidAt":"","sponsor":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","start":707028,"updates":[],"value":1000},"karma":{"active":true,"author":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","category":"the_arweave_protocol","content":"DbhzabT7aDG9MUJ5LxsWkHuXAduSoKsQK2bkRHTQzT4","pageRewardAt":709282,"paidAt":"","sponsor":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","start":707282,"updates":[],"value":1000},"profit-sharing-communities":{"active":true,"author":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","category":"profit_sharing","content":"ZTf4Fto07HQ0QuvDycFs6FqI0g41sroXSq6C8ibHJoE","pageRewardAt":709282,"paidAt":"","sponsor":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","start":707282,"updates":[],"value":1000},"profit-sharing-tokens":{"active":true,"author":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","category":"profit_sharing","content":"LrnIxHkO0r1rcgit2pjOjwh1wB0Z2POoP7ywLVJJbUE","pageRewardAt":709028,"paidAt":"","sponsor":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","start":707028,"updates":[],"value":1000},"smartweave":{"active":true,"author":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","category":"building_on_arweave","content":"AO1jbFIuzdc7ppVUp9ZRfwXfEFOTys7CbH_YIBPryPQ","pageRewardAt":709028,"paidAt":"","sponsor":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","start":707028,"updates":[],"value":1000},"storage-endowment":{"active":true,"author":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","category":"the_arweave_protocol","content":"DMYAqrlsLfGU7m8ltf5rfVbkvyC7ml86zJGS9qP2PbE","pageRewardAt":709029,"paidAt":"","sponsor":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","start":707029,"updates":[],"value":1000},"the-permaweb":{"active":true,"author":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","category":"the_arweave_project","content":"jhHKU84fbEd-zHcu2-vz29YeunNrFfcZHD5bRH4INRM","pageRewardAt":709028,"paidAt":"","sponsor":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","start":707028,"updates":[],"value":1000}},"es":{"arweave-intro":{"active":true,"author":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","category":"the_arweave_project","content":"x5tU5dg2jafIpLCM1vK4_Ce0NtMw93vbGuAumu8U4mA","pageRewardAt":709440,"paidAt":"","sponsor":"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg","start":707440,"updates":[],"value":1000}},"ga":{},"he":{},"hi":{},"hu":{},"id":{},"zh":{}},"roles":{"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg":"Moderator","IaXzDFbnmmHoHbZYa2DLdsA_8qFimuLZ81I_eu5SNwc":"Moderator","TId0Wix2KFl1gArtAT6Do1CbWU_0wneGvS5X9BfW5PE":"Moderator","p4gA9HbILbAysN5pzHngXWwMAqDnww0N8VfU8Hx9LSg":"Moderator","vLRHFqCw1uHu75xqB4fCDW-QxpkpJxBtFD9g4QYUbfw":"Moderator"},"settings":[["quorum",0.5],["support",0.5],["voteLength",2000],["lockMinLength",720],["lockMaxLength",21600],["maxPagesPerLang",100],["pageApprovalLength",2000],["platformUsageCostInWinston","1000000"],["communityLogo","5wYwaQP8eFQn_YK6rSB3zdH5Fu8c6J2LJK7nwfT7LeA"],["communityDescription","A decentralized hypertext publication platform"],["communityAppUrl","https://arwiki.wiki"],["appLogo","5wYwaQP8eFQn_YK6rSB3zdH5Fu8c6J2LJK7nwfT7LeA"],["appLogoDark","wJGdli6nMQKCyCdtCewn84ba9-WsJ80-GS-KtKdkCLg"]],"stakes":{"7z8Vtlbdm-Vw6mQ_jZ7OEh3E-4RtUC1V5U0pQw8Flyg":{"0j_BI_0atzl6TfgDjChL1ajXAon2ujeu-VoLlnQPp9E":1000,"AO1jbFIuzdc7ppVUp9ZRfwXfEFOTys7CbH_YIBPryPQ":1000,"DMYAqrlsLfGU7m8ltf5rfVbkvyC7ml86zJGS9qP2PbE":1000,"DbhzabT7aDG9MUJ5LxsWkHuXAduSoKsQK2bkRHTQzT4":1000,"LrnIxHkO0r1rcgit2pjOjwh1wB0Z2POoP7ywLVJJbUE":1000,"ZTf4Fto07HQ0QuvDycFs6FqI0g41sroXSq6C8ibHJoE":1000,"g0uzsSvkN5YPPjnHcaMvqvE1YGjb8Ck2-2UIpZGJRS4":1000,"h2MWweiJvOXK_gb7oFbslsN52KuHVy3zFdyen2ENJGo":1000,"jhHKU84fbEd-zHcu2-vz29YeunNrFfcZHD5bRH4INRM":1000,"lhopybolmn9H6wdh8zI2JK81s6SZXQZfE0x0UnaBiZg":837,"p2fn_szyO99cwswgk8cMTgRQ9krbPyvXl0cE07056Xw":1000,"x5tU5dg2jafIpLCM1vK4_Ce0NtMw93vbGuAumu8U4mA":1000}},"ticker":"$WIKI","vault":{},"votes":[]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"balances":{"KWn-0l96Ss_lHheS1cjDY5N-94SHyxAQO8Wfy1ehPu0":10000000,"O6SGGaUbSm72rQO-9A7SGFUIGOiSy8Uih1-zbQmufaU":10000000,"XacJBWnPmWEHUixZepCPGc-DJD7jDn1CiZ99UAKpkIk":10000000,"aYFm9TP2G0_gVmzn-lCuYPlg2_Cpksq5VBBFEvDoOxA":10000000},"markets":{"Nek7_87n7p9JFavPBHcqbB9LCbWo8b2ZXXvDwhVtX48":{"marketId":"Nek7_87n7p9JFavPBHcqbB9LCbWo8b2ZXXvDwhVtX48","nays":0,"staked":{},"status":"passed","tweet":"Tweet 2","tweetCreated":1613679392810,"tweetLink":"test","tweetPhoto":"test","tweetUsername":"test","yays":0},"qhFhWykRcxBDWsAUps5WSan5o5mFSt1eh9QGGcA1BfE":{"marketId":"qhFhWykRcxBDWsAUps5WSan5o5mFSt1eh9QGGcA1BfE","nays":0,"staked":{},"status":"passed","tweet":"Tweet 1","tweetCreated":1613671054132,"tweetLink":"test","tweetPhoto":"test","tweetUsername":"Test","yays":0}},"name":"ConsensusTest6","roles":{},"settings":[["quorum",0.5],["support",0.5],["voteLength",2000],["lockMinLength",5],["lockMaxLength",720]],"ticker":"CT6","vault":{"XacJBWnPmWEHUixZepCPGc-DJD7jDn1CiZ99UAKpkIk":[{"balance":1000,"end":100,"start":0}]},"votes":[]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"balances":{"KWn-0l96Ss_lHheS1cjDY5N-94SHyxAQO8Wfy1ehPu0":9999947,"O6SGGaUbSm72rQO-9A7SGFUIGOiSy8Uih1-zbQmufaU":10000064,"XacJBWnPmWEHUixZepCPGc-DJD7jDn1CiZ99UAKpkIk":9999925,"aYFm9TP2G0_gVmzn-lCuYPlg2_Cpksq5VBBFEvDoOxA":10000064},"markets":{"YhnTHMwt4QN3iBv8C4hp5PG_Ls5EWM60rujis8EZlHs":{"marketId":"YhnTHMwt4QN3iBv8C4hp5PG_Ls5EWM60rujis8EZlHs","nays":4000,"staked":{"KWn-0l96Ss_lHheS1cjDY5N-94SHyxAQO8Wfy1ehPu0":{"address":"KWn-0l96Ss_lHheS1cjDY5N-94SHyxAQO8Wfy1ehPu0","amount":4000,"cast":"nay"},"XacJBWnPmWEHUixZepCPGc-DJD7jDn1CiZ99UAKpkIk":{"address":"XacJBWnPmWEHUixZepCPGc-DJD7jDn1CiZ99UAKpkIk","amount":4000,"cast":"yay"}},"status":"passed","tweet":"Tweet 1","tweetCreated":1613666790471,"tweetLink":"test","tweetPhoto":"test","tweetUsername":"test","yays":4000},"ZX8d1GP4nYuFrNHpGiJnQYRzL_BYK1hjymW_Nk1EDec":{"marketId":"ZX8d1GP4nYuFrNHpGiJnQYRzL_BYK1hjymW_Nk1EDec","nays":3333,"staked":{"KWn-0l96Ss_lHheS1cjDY5N-94SHyxAQO8Wfy1ehPu0":{"address":"KWn-0l96Ss_lHheS1cjDY5N-94SHyxAQO8Wfy1ehPu0","amount":3333,"cast":"nay"},"XacJBWnPmWEHUixZepCPGc-DJD7jDn1CiZ99UAKpkIk":{"address":"XacJBWnPmWEHUixZepCPGc-DJD7jDn1CiZ99UAKpkIk","amount":4000,"cast":"yay"}},"status":"passed","tweet":"Tweet 2","tweetCreated":1613666790471,"tweetLink":"test","tweetPhoto":"test","tweetUsername":"test","yays":4000},"p7TRmYGtn0onUZDioF59cHwwEE4oI0QuhuH89vtwHvc":{"marketId":"p7TRmYGtn0onUZDioF59cHwwEE4oI0QuhuH89vtwHvc","nays":6666,"staked":{"KWn-0l96Ss_lHheS1cjDY5N-94SHyxAQO8Wfy1ehPu0":{"address":"KWn-0l96Ss_lHheS1cjDY5N-94SHyxAQO8Wfy1ehPu0","amount":6666,"cast":"nay"},"XacJBWnPmWEHUixZepCPGc-DJD7jDn1CiZ99UAKpkIk":{"address":"XacJBWnPmWEHUixZepCPGc-DJD7jDn1CiZ99UAKpkIk","amount":4000,"cast":"yay"}},"status":"passed","tweet":"Tweet 3","tweetCreated":1613666790471,"tweetLink":"test","tweetPhoto":"test","tweetUsername":"test","yays":4000}},"name":"ConsensusTest6","roles":{},"settings":[["quorum",0.5],["support",0.5],["voteLength",2000],["lockMinLength",5],["lockMaxLength",720]],"ticker":"CT6","vault":{"XacJBWnPmWEHUixZepCPGc-DJD7jDn1CiZ99UAKpkIk":[{"balance":1000,"end":100,"start":0}]},"votes":[]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"blackList":[],"name":"AttentionReward","owner":"D3lK6_xXvBUXMUyA2RJz3soqmLlztkv-gVpEP5AlVUo","registeredRecords":{},"task":{"close":723503,"dailyPayload":[{"block":722486,"isDistributed":true,"isRanked":true,"payloads":[{"TLTxId":"GssBaGLwAlvS2BScBfenJY0puAdWuww5-YDVpHlSVFc","blockHeight":722309,"gateWayId":"https://gateway.koi.rocks/logs","owner":"D3lK6_xXvBUXMUyA2RJz3soqmLlztkv-gVpEP5AlVUo","voteId":0,"won":true}]},{"block":722692,"isDistributed":true,"isRanked":true,"payloads":[{"TLTxId":"9vexnUIYwqRYZ-q-4HCtZkZk9h3MDaYtn9EOT_GDi7Q","blockHeight":722727,"gateWayId":"https://gateway.koi.rocks/logs","owner":"D3lK6_xXvBUXMUyA2RJz3soqmLlztkv-gVpEP5AlVUo","voteId":1,"won":true}]},{"block":722783,"isDistributed":false,"isRanked":false,"payloads":[]}],"open":722783,"partcipatesRate":{},"rewardReport":[{"dailyTrafficBlock":722486,"distributed":true,"distributer":"D3lK6_xXvBUXMUyA2RJz3soqmLlztkv-gVpEP5AlVUo","distribution":{},"distributionBlock":722692,"logsSummary":{},"rewardPerAttention":0},{"dailyTrafficBlock":722692,"distributed":false,"distributer":"D3lK6_xXvBUXMUyA2RJz3soqmLlztkv-gVpEP5AlVUo","distribution":{},"distributionBlock":722783,"logsSummary":{},"rewardPerAttention":0}]},"ticker":"ATR","validBundlers":["WL32qc-jsTxCe8m8RRQfS3b3MacsTQySDmJklvtkGFc","FeSD9TV8aB0GK0yby8A40KEX1N-3wrJQTDbRW4uUiEA","D3lK6_xXvBUXMUyA2RJz3soqmLlztkv-gVpEP5AlVUo","fWjYZQ2SAP7OPTv6_OiI2AtKilORFQ0MdjbmDJ2biHk"],"votes":[{"bundlers":{},"end":722999,"id":0,"nays":0,"stakeAmount":2,"start":722309,"status":"passed","type":"trafficLogs","voted":["D3lK6_xXvBUXMUyA2RJz3soqmLlztkv-gVpEP5AlVUo"],"yays":1},{"bundlers":{},"end":723412,"id":1,"nays":0,"stakeAmount":2,"start":722727,"status":"passed","type":"trafficLogs","voted":["D3lK6_xXvBUXMUyA2RJz3soqmLlztkv-gVpEP5AlVUo"],"yays":1}]}
Loading