Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

Commit

Permalink
add season 7
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Dec 22, 2023
1 parent 6f6f364 commit 4cb8315
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 59 deletions.
25 changes: 5 additions & 20 deletions scripts/approve.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { Session, AnyAction } from "@wharfkit/session"
import { WalletPluginPrivateKey } from "@wharfkit/wallet-plugin-privatekey"
import { AnyAction } from "@wharfkit/session"
import fs from 'fs';
import path from "path";
import { permissionLevel, transact } from "./config";

const filename = process.argv[2];
const privateKey = process.argv[3];

if (!filename || !privateKey) {
console.log("Usage: node setclaims.js <filename> <privateKey>")
if (!filename) {
console.log("Usage: node setclaims.js <filename>")
process.exit(1)
}
if (!fs.existsSync(filename)) {
Expand All @@ -16,8 +15,6 @@ if (!fs.existsSync(filename)) {
}

const round_id = path.parse(filename).name;
const walletPlugin = new WalletPluginPrivateKey(privateKey)
const permissionLevel = {actor: "claim.pomelo", permission: "setclaim"}

function approve(grant_id: string): AnyAction {
return {
Expand All @@ -32,22 +29,10 @@ function approve(grant_id: string): AnyAction {
};
};

const session = new Session({
chain: { id: "aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906", url: "https://eos.greymass.com" },
permissionLevel,
walletPlugin,
});

(async () => {
const actions: AnyAction[] = [];
for ( const [grant_it] of JSON.parse(fs.readFileSync(filename, "utf8")) ) {
actions.push(approve(grant_it));
}
try {
await session.transact({actions});
console.log("OK")
} catch (e: any) {
const message = e.error.details[0].message;
console.error("ERROR", message)
}
await transact(actions);
})();
25 changes: 5 additions & 20 deletions scripts/cancel.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { Session, AnyAction } from "@wharfkit/session"
import { WalletPluginPrivateKey } from "@wharfkit/wallet-plugin-privatekey"
import { AnyAction } from "@wharfkit/session"
import fs from 'fs';
import path from "path";
import { permissionLevel, transact } from "./config";

const filename = process.argv[2];
const privateKey = process.argv[3];

if (!filename || !privateKey) {
console.log("Usage: node setclaims.js <filename> <privateKey>")
if (!filename) {
console.log("Usage: node setclaims.js <filename>")
process.exit(1)
}
if (!fs.existsSync(filename)) {
Expand All @@ -16,8 +15,6 @@ if (!fs.existsSync(filename)) {
}

const round_id = path.parse(filename).name;
const walletPlugin = new WalletPluginPrivateKey(privateKey)
const permissionLevel = {actor: "claim.pomelo", permission: "setclaim"}

function cancel(grant_id: string): AnyAction {
return {
Expand All @@ -31,22 +28,10 @@ function cancel(grant_id: string): AnyAction {
};
};

const session = new Session({
chain: { id: "aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906", url: "https://eos.greymass.com" },
permissionLevel,
walletPlugin,
});

(async () => {
const actions = [];
for ( const [grant_it] of JSON.parse(fs.readFileSync(filename, "utf8")) ) {
actions.push(cancel(grant_it));
}
try {
await session.transact({actions});
console.log("OK")
} catch (e: any) {
const message = e.error.details[0].message;
console.error("ERROR", message)
}
await transact(actions);
})();
25 changes: 25 additions & 0 deletions scripts/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { AnyAction, Session } from "@wharfkit/session";
import { WalletPluginPrivateKey } from "@wharfkit/wallet-plugin-privatekey";

if ( !process.env.PRIVATE_KEY) throw new Error("PRIVATE_KEY is required in .env");
const walletPlugin = new WalletPluginPrivateKey(process.env.PRIVATE_KEY)
export const permissionLevel = {actor: "claim.pomelo", permission: "setclaim"}

export const session = new Session({
chain: { id: "aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906", url: "https://eos.greymass.com" },
permissionLevel,
walletPlugin,
});

export async function transact(actions: AnyAction[]) {
try {
const {response} = await session.transact({actions});
if ( response ) {
console.log("OK", response.transaction_id)
} else {
console.log("ERROR", response)
}
} catch (error) {
console.error("ERROR", error)
}
}
24 changes: 5 additions & 19 deletions scripts/setclaims.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { Session, AnyAction, Asset } from "@wharfkit/session"
import { WalletPluginPrivateKey } from "@wharfkit/wallet-plugin-privatekey"
import { AnyAction, Asset } from "@wharfkit/session"
import fs from 'fs';
import path from "path";
import { permissionLevel, transact } from "./config";

const filename = process.argv[2];
const privateKey = process.argv[3];

if (!filename || !privateKey) {
console.log("Usage: node setclaims.js <filename> <privateKey>")
if (!filename) {
console.log("Usage: node setclaims.js <filename>")
process.exit(1)
}
if (!fs.existsSync(filename)) {
Expand All @@ -16,8 +15,6 @@ if (!fs.existsSync(filename)) {
}

const round_id = path.parse(filename).name;
const walletPlugin = new WalletPluginPrivateKey(privateKey)
const permissionLevel = {actor: "claim.pomelo", permission: "setclaim"}

function setclaim(grant_id: string, claim: string ): AnyAction {
const symbol = Asset.from(claim).symbol.code.toString();
Expand All @@ -34,21 +31,10 @@ function setclaim(grant_id: string, claim: string ): AnyAction {
};
};

const session = new Session({
chain: { id: "aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906", url: "https://eos.greymass.com" },
permissionLevel,
walletPlugin,
});

(async () => {
const actions: AnyAction[] = [];
for ( const [grant_it, quantity] of JSON.parse(fs.readFileSync(filename, "utf8")) ) {
actions.push(setclaim(grant_it, quantity));
}
try {
await session.transact({actions});
console.log("OK")
} catch (error) {
console.error("ERROR", error)
}
await transact(actions);
})();
71 changes: 71 additions & 0 deletions seasons/701.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[
["totoro", "7775.7300 EOS"],
["eoscn", "6560.1603 EOS"],
["tiip", "7208.2609 EOS"],
["eoseyes", "7361.3039 EOS"],
["daobox", "7165.5899 EOS"],
["edenrepu", "4627.4035 EOS"],
["eossynergy", "3599.8818 EOS"],
["eosturkeyyou", "3744.1505 EOS"],
["bls1231eccli", "4057.9949 EOS"],
["mindweb", "3443.2367 EOS"],
["feedyourmonk", "4024.7447 EOS"],
["arbitrage", "1371.5683 EOS"],
["eosfilemanag", "6.3729 EOS"],
["eosdashboard", "132.1693 EOS"],
["likeeosrussi", "3130.3160 EOS"],
["anchor", "2053.8427 EOS"],
["drpapp", "2864.7766 EOS"],
["defeyeio", "2490.1584 EOS"],
["eosmexico", "2401.1219 EOS"],
["webx", "1327.6966 EOS"],
["eospowerupio", "1617.6193 EOS"],
["eospapa", "1580.6747 EOS"],
["newchat", "1525.0731 EOS"],
["eosweb3", "987.1597 EOS"],
["eosbees", "1071.2087 EOS"],
["shufannft", "1032.6939 EOS"],
["therecaps", "795.6020 EOS"],
["eossouthasia", "568.6698 EOS"],
["tothemoon", "622.1471 EOS"],
["erradicategl", "546.5030 EOS"],
["news", "619.2839 EOS"],
["mc", "593.0532 EOS"],
["eosontiktok", "528.1231 EOS"],
["eosportal", "540.8689 EOS"],
["substreams", "487.9458 EOS"],
["eawalletfree", "266.7400 EOS"],
["eosvision", "379.0516 EOS"],
["weekmeeting1", "257.6886 EOS"],
["cm", "321.2333 EOS"],
["ygc2lp2oe", "175.6716 EOS"],
["nftart", "264.2463 EOS"],
["edencreators", "267.4789 EOS"],
["openblockexp", "205.1349 EOS"],
["beetwallet", "210.4919 EOS"],
["eosioibc", "115.6366 EOS"],
["creamer", "162.5562 EOS"],
["svxnodecommu", "148.0555 EOS"],
["onlineshop", "161.9097 EOS"],
["immortal", "119.7005 EOS"],
["bot4eden", "132.1693 EOS"],
["podsum", "108.8018 EOS"],
["dnewseosioeo", "70.1947 EOS"],
["eosmemes", "70.1024 EOS"],
["eosindia", "56.4329 EOS"],
["eosquestioco", "46.5502 EOS"],
["eosgo", "60.7739 EOS"],
["tipit1", "36.3904 EOS"],
["sba", "38.7918 EOS"],
["accounting", "48.8592 EOS"],
["cultureblock", "37.4064 EOS"],
["bespangle", "25.6765 EOS"],
["eosespanol", "22.4438 EOS"],
["eoslatino", "12.4688 EOS"],
["gameboynft", "20.8737 EOS"],
["lostdiamond", "22.6286 EOS"],
["cdao.online", "8.7743 EOS"],
["xiaohongshu", "16.7174 EOS"],
["redpacket123", "3.0479 EOS"],
["nice1prefabs", "3.3250 EOS"]
]
40 changes: 40 additions & 0 deletions seasons/702.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[
["evmns", "11115.0600 EOS"],
["noah", "11887.4792 EOS"],
["metahub", "11905.7668 EOS"],
["runbingoo", "9218.5090 EOS"],
["eostracker", "44.8877 EOS"],
["nftdeal", "52.2766 EOS"],
["rneyu", "6749.9631 EOS"],
["eosmarket", "348.8494 EOS"],
["eospixelsnft", "89.0365 EOS"],
["socialrecovr", "6429.0993 EOS"],
["papayanft", "6471.0314 EOS"],
["moonboat", "5011.6274 EOS"],
["coingpt", "1490.9917 EOS"],
["evmbridge", "4527.5607 EOS"],
["audit", "4948.4521 EOS"],
["alleosnews", "309.2263 EOS"],
["eosvnnews", "3119.2326 EOS"],
["eosfundraise", "47.4738 EOS"],
["adex", "1887.7767 EOS"],
["nfts", "1591.7581 EOS"],
["eosnigeria", "1358.6377 EOS"],
["antelopecol", "791.8151 EOS"],
["cityracers", "859.4238 EOS"],
["frogge", "709.4287 EOS"],
["smartsale", "404.8205 EOS"],
["substreamsev", "349.4959 EOS"],
["eosiodashboa", "189.4334 EOS"],
["bridge", "121.0859 EOS"],
["thegraph", "89.2212 EOS"],
["summaries", "54.7704 EOS"],
["didoneos", "60.4044 EOS"],
["shieldchain", "57.0794 EOS"],
["eosevmnftmar", "22.5362 EOS"],
["chaquerrts", "17.0869 EOS"],
["stableassets", "19.3036 EOS"],
["eosevmutils", "4.3410 EOS"],
["artreusstore", "2.4938 EOS"],
["interstellar", "3.8792 EOS"]
]

0 comments on commit 4cb8315

Please sign in to comment.