@helium/helium-admin-cli 0.0.49 → 0.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +203 -0
- package/README.md +15 -69
- package/bin/helium-admin.js +13 -0
- package/lib/cjs/cli-distribute-rewards.js +3 -0
- package/lib/cjs/cli-distribute-rewards.js.map +1 -1
- package/lib/cjs/create-dao.js +4 -3
- package/lib/cjs/create-dao.js.map +1 -1
- package/lib/cjs/create-maker.js +4 -2
- package/lib/cjs/create-maker.js.map +1 -1
- package/lib/cjs/create-subdao.js +2 -0
- package/lib/cjs/create-subdao.js.map +1 -1
- package/lib/cjs/issue-iot-operations-fund.js +120 -0
- package/lib/cjs/issue-iot-operations-fund.js.map +1 -0
- package/lib/cjs/log-hotspot.js +17 -0
- package/lib/cjs/log-hotspot.js.map +1 -1
- package/lib/cjs/update-data-credits.js +125 -0
- package/lib/cjs/update-data-credits.js.map +1 -0
- package/lib/cjs/update-lazy-distributor.js +135 -0
- package/lib/cjs/update-lazy-distributor.js.map +1 -0
- package/lib/cjs/update-subdao-vehnt.js +153 -0
- package/lib/cjs/update-subdao-vehnt.js.map +1 -0
- package/lib/esm/src/cli-distribute-rewards.js +3 -0
- package/lib/esm/src/cli-distribute-rewards.js.map +1 -1
- package/lib/esm/src/create-dao.js +4 -3
- package/lib/esm/src/create-dao.js.map +1 -1
- package/lib/esm/src/create-maker.js +4 -2
- package/lib/esm/src/create-maker.js.map +1 -1
- package/lib/esm/src/create-subdao.js +2 -0
- package/lib/esm/src/create-subdao.js.map +1 -1
- package/lib/esm/src/issue-iot-operations-fund.js +79 -0
- package/lib/esm/src/issue-iot-operations-fund.js.map +1 -0
- package/lib/esm/src/log-hotspot.js +20 -3
- package/lib/esm/src/log-hotspot.js.map +1 -1
- package/lib/esm/src/update-data-credits.js +84 -0
- package/lib/esm/src/update-data-credits.js.map +1 -0
- package/lib/esm/src/update-lazy-distributor.js +94 -0
- package/lib/esm/src/update-lazy-distributor.js.map +1 -0
- package/lib/esm/src/update-subdao-vehnt.js +112 -0
- package/lib/esm/src/update-subdao-vehnt.js.map +1 -0
- package/lib/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/types/src/cli-distribute-rewards.d.ts.map +1 -1
- package/lib/types/src/create-dao.d.ts.map +1 -1
- package/lib/types/src/create-maker.d.ts.map +1 -1
- package/lib/types/src/create-subdao.d.ts.map +1 -1
- package/lib/types/src/issue-iot-operations-fund.d.ts +2 -0
- package/lib/types/src/issue-iot-operations-fund.d.ts.map +1 -0
- package/lib/types/src/log-hotspot.d.ts.map +1 -1
- package/lib/types/src/update-data-credits.d.ts +2 -0
- package/lib/types/src/update-data-credits.d.ts.map +1 -0
- package/lib/types/src/update-lazy-distributor.d.ts +2 -0
- package/lib/types/src/update-lazy-distributor.d.ts.map +1 -0
- package/lib/types/src/update-subdao-vehnt.d.ts +2 -0
- package/lib/types/src/update-subdao-vehnt.d.ts.map +1 -0
- package/package.json +17 -15
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.run = void 0;
|
|
39
|
+
const anchor = __importStar(require("@coral-xyz/anchor"));
|
|
40
|
+
const helium_entity_manager_sdk_1 = require("@helium/helium-entity-manager-sdk");
|
|
41
|
+
const helium_sub_daos_sdk_1 = require("@helium/helium-sub-daos-sdk");
|
|
42
|
+
const helium_sub_daos_sdk_2 = require("@helium/helium-sub-daos-sdk");
|
|
43
|
+
const spl_utils_1 = require("@helium/spl-utils");
|
|
44
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
45
|
+
const sdk_1 = __importDefault(require("@sqds/sdk"));
|
|
46
|
+
const os_1 = __importDefault(require("os"));
|
|
47
|
+
const yargs_1 = __importDefault(require("yargs/yargs"));
|
|
48
|
+
const utils_1 = require("./utils");
|
|
49
|
+
function run(args = process.argv) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
const yarg = (0, yargs_1.default)(args).options({
|
|
52
|
+
wallet: {
|
|
53
|
+
alias: "k",
|
|
54
|
+
describe: "Anchor wallet keypair",
|
|
55
|
+
default: `${os_1.default.homedir()}/.config/solana/id.json`,
|
|
56
|
+
},
|
|
57
|
+
url: {
|
|
58
|
+
alias: "u",
|
|
59
|
+
default: "http://127.0.0.1:8899",
|
|
60
|
+
describe: "The solana url",
|
|
61
|
+
},
|
|
62
|
+
hntMint: {
|
|
63
|
+
type: "string",
|
|
64
|
+
required: true,
|
|
65
|
+
describe: "Mint address of hnt",
|
|
66
|
+
},
|
|
67
|
+
recipient: {
|
|
68
|
+
type: "string",
|
|
69
|
+
required: true,
|
|
70
|
+
describe: "Recipient wallet address for the iot ops fund nft",
|
|
71
|
+
},
|
|
72
|
+
executeTransaction: {
|
|
73
|
+
type: "boolean",
|
|
74
|
+
},
|
|
75
|
+
multisig: {
|
|
76
|
+
type: "string",
|
|
77
|
+
describe: "Address of the squads multisig to be authority. If not provided, your wallet will be the authority",
|
|
78
|
+
},
|
|
79
|
+
authorityIndex: {
|
|
80
|
+
type: "number",
|
|
81
|
+
describe: "Authority index for squads. Defaults to 1",
|
|
82
|
+
default: 1,
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
const argv = yield yarg.argv;
|
|
86
|
+
process.env.ANCHOR_WALLET = argv.wallet;
|
|
87
|
+
process.env.ANCHOR_PROVIDER_URL = argv.url;
|
|
88
|
+
anchor.setProvider(anchor.AnchorProvider.local(argv.url));
|
|
89
|
+
const provider = anchor.getProvider();
|
|
90
|
+
const hemProgram = yield (0, helium_entity_manager_sdk_1.init)(provider);
|
|
91
|
+
const hsdProgram = yield (0, helium_sub_daos_sdk_1.init)(provider);
|
|
92
|
+
const mint = web3_js_1.Keypair.generate();
|
|
93
|
+
const hnt = new web3_js_1.PublicKey(argv.hntMint);
|
|
94
|
+
const [dao] = (0, helium_sub_daos_sdk_2.daoKey)(hnt);
|
|
95
|
+
const instructions = [];
|
|
96
|
+
const daoAcc = yield hsdProgram.account.daoV0.fetch(dao);
|
|
97
|
+
instructions.push(yield hemProgram.methods
|
|
98
|
+
.issueIotOperationsFundV0()
|
|
99
|
+
.preInstructions(yield (0, spl_utils_1.createMintInstructions)(provider, 0, daoAcc.authority, daoAcc.authority, mint))
|
|
100
|
+
.accounts({
|
|
101
|
+
dao,
|
|
102
|
+
recipient: new web3_js_1.PublicKey(argv.recipient),
|
|
103
|
+
mint: mint.publicKey,
|
|
104
|
+
authority: daoAcc.authority,
|
|
105
|
+
})
|
|
106
|
+
.signers([mint]));
|
|
107
|
+
const squads = sdk_1.default.endpoint(process.env.ANCHOR_PROVIDER_URL, provider.wallet);
|
|
108
|
+
yield (0, utils_1.sendInstructionsOrSquads)({
|
|
109
|
+
provider,
|
|
110
|
+
instructions,
|
|
111
|
+
executeTransaction: argv.executeTransaction,
|
|
112
|
+
squads,
|
|
113
|
+
multisig: argv.multisig ? new web3_js_1.PublicKey(argv.multisig) : undefined,
|
|
114
|
+
authorityIndex: argv.authorityIndex,
|
|
115
|
+
signers: [],
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
exports.run = run;
|
|
120
|
+
//# sourceMappingURL=issue-iot-operations-fund.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issue-iot-operations-fund.js","sourceRoot":"","sources":["../../src/issue-iot-operations-fund.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAA4C;AAC5C,iFAAyD;AACzD,qEAA8D;AAC9D,qEAAqD;AACrD,iDAA2D;AAC3D,6CAAqD;AACrD,oDAA+B;AAE/B,4CAAoB;AACpB,wDAAgC;AAChC,mCAAmD;AAEnD,SAAsB,GAAG,CAAC,OAAY,OAAO,CAAC,IAAI;;QAChD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;AArFD,kBAqFC"}
|
package/lib/cjs/log-hotspot.js
CHANGED
|
@@ -43,6 +43,7 @@ const spl_utils_1 = require("@helium/spl-utils");
|
|
|
43
43
|
const web3_js_1 = require("@solana/web3.js");
|
|
44
44
|
const os_1 = __importDefault(require("os"));
|
|
45
45
|
const yargs_1 = __importDefault(require("yargs/yargs"));
|
|
46
|
+
const utils_1 = require("./utils");
|
|
46
47
|
function run(args = process.argv) {
|
|
47
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
48
49
|
const yarg = (0, yargs_1.default)(args).options({
|
|
@@ -74,6 +75,22 @@ function run(args = process.argv) {
|
|
|
74
75
|
web3_js_1.PublicKey.prototype.toString = web3_js_1.PublicKey.prototype.toBase58;
|
|
75
76
|
console.log(keyToAsset);
|
|
76
77
|
console.log(yield (0, spl_utils_1.getAsset)(argv.url, keyToAsset.asset));
|
|
78
|
+
const [iotConfigKey] = (0, helium_entity_manager_sdk_1.rewardableEntityConfigKey)((0, helium_sub_daos_sdk_1.subDaoKey)(spl_utils_1.IOT_MINT)[0], "IOT");
|
|
79
|
+
const [mobileConfigKey] = (0, helium_entity_manager_sdk_1.rewardableEntityConfigKey)((0, helium_sub_daos_sdk_1.subDaoKey)(spl_utils_1.MOBILE_MINT)[0], "MOBILE");
|
|
80
|
+
const [iotInfo] = yield (0, helium_entity_manager_sdk_1.iotInfoKey)(iotConfigKey, argv.hotspotKey);
|
|
81
|
+
if (yield (0, utils_1.exists)(provider.connection, iotInfo)) {
|
|
82
|
+
console.log("Iot Info", yield hemProgram.account.iotHotspotInfoV0.fetchNullable(iotInfo));
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
console.log("No iot info");
|
|
86
|
+
}
|
|
87
|
+
const [info] = yield (0, helium_entity_manager_sdk_1.mobileInfoKey)(mobileConfigKey, argv.hotspotKey);
|
|
88
|
+
if (yield (0, utils_1.exists)(provider.connection, info)) {
|
|
89
|
+
console.log("Mobile Info", yield hemProgram.account.mobileHotspotInfoV0.fetchNullable(info));
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
console.log("No mobile info");
|
|
93
|
+
}
|
|
77
94
|
});
|
|
78
95
|
}
|
|
79
96
|
exports.run = run;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-hotspot.js","sourceRoot":"","sources":["../../src/log-hotspot.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"log-hotspot.js","sourceRoot":"","sources":["../../src/log-hotspot.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAA4C;AAC5C,iFAM2C;AAC3C,qEAAgE;AAChE,iDAA8E;AAC9E,6CAA4C;AAC5C,4CAAoB;AACpB,wDAAgC;AAChC,mCAAiC;AAEjC,SAAsB,GAAG,CAAC,OAAY,OAAO,CAAC,IAAI;;QAChD,MAAM,IAAI,GAAG,IAAA,eAAK,EAAC,IAAI,CAAC,CAAC,OAAO,CAAC;YAC/B,MAAM,EAAE;gBACN,KAAK,EAAE,GAAG;gBACV,QAAQ,EAAE,uBAAuB;gBACjC,OAAO,EAAE,GAAG,YAAE,CAAC,OAAO,EAAE,yBAAyB;aAClD;YACD,GAAG,EAAE;gBACH,KAAK,EAAE,GAAG;gBACV,OAAO,EAAE,uBAAuB;gBAChC,QAAQ,EAAE,gBAAgB;aAC3B;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,iCAAiC;gBAC3C,QAAQ,EAAE,IAAI;aACf;SACF,CAAC,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC;QAC7B,OAAO,CAAC,GAAG,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC;QACxC,OAAO,CAAC,GAAG,CAAC,mBAAmB,GAAG,IAAI,CAAC,GAAG,CAAC;QAC3C,MAA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AAE;YAC9C,OAAO,CAAC,GAAG,CACT,UAAU,EACV,MAAM,UAAU,CAAC,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,CACjE,CAAC;SACH;aAAM;YACL,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;SAC3B;QAED,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,IAAA,yCAAa,EAAC,eAAe,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACrE,IAAI,MAAM,IAAA,cAAM,EAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE;YAC3C,OAAO,CAAC,GAAG,CACT,aAAa,EACb,MAAM,UAAU,CAAC,OAAO,CAAC,mBAAmB,CAAC,aAAa,CAAC,IAAI,CAAC,CACjE,CAAC;SACH;aAAM;YACL,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;SAC9B;IACH,CAAC;CAAA;AA9DD,kBA8DC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.run = void 0;
|
|
39
|
+
const anchor = __importStar(require("@coral-xyz/anchor"));
|
|
40
|
+
const data_credits_sdk_1 = require("@helium/data-credits-sdk");
|
|
41
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
42
|
+
const sdk_1 = __importDefault(require("@sqds/sdk"));
|
|
43
|
+
const os_1 = __importDefault(require("os"));
|
|
44
|
+
const yargs_1 = __importDefault(require("yargs/yargs"));
|
|
45
|
+
const utils_1 = require("./utils");
|
|
46
|
+
function run(args = process.argv) {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
const yarg = (0, yargs_1.default)(args).options({
|
|
49
|
+
wallet: {
|
|
50
|
+
alias: "k",
|
|
51
|
+
describe: "Anchor wallet keypair",
|
|
52
|
+
default: `${os_1.default.homedir()}/.config/solana/id.json`,
|
|
53
|
+
},
|
|
54
|
+
url: {
|
|
55
|
+
alias: "u",
|
|
56
|
+
default: "http://127.0.0.1:8899",
|
|
57
|
+
describe: "The solana url",
|
|
58
|
+
},
|
|
59
|
+
dcMint: {
|
|
60
|
+
required: true,
|
|
61
|
+
type: "string",
|
|
62
|
+
describe: "Data credits mint address",
|
|
63
|
+
},
|
|
64
|
+
newAuthority: {
|
|
65
|
+
type: "string"
|
|
66
|
+
},
|
|
67
|
+
hntPriceOracle: {
|
|
68
|
+
type: "string"
|
|
69
|
+
},
|
|
70
|
+
executeTransaction: {
|
|
71
|
+
type: "boolean",
|
|
72
|
+
},
|
|
73
|
+
multisig: {
|
|
74
|
+
type: "string",
|
|
75
|
+
describe: "Address of the squads multisig to be authority. If not provided, your wallet will be the authority",
|
|
76
|
+
},
|
|
77
|
+
authorityIndex: {
|
|
78
|
+
type: "number",
|
|
79
|
+
describe: "Authority index for squads. Defaults to 1",
|
|
80
|
+
default: 1,
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
const argv = yield yarg.argv;
|
|
84
|
+
process.env.ANCHOR_WALLET = argv.wallet;
|
|
85
|
+
process.env.ANCHOR_PROVIDER_URL = argv.url;
|
|
86
|
+
anchor.setProvider(anchor.AnchorProvider.local(argv.url));
|
|
87
|
+
const provider = anchor.getProvider();
|
|
88
|
+
const program = yield (0, data_credits_sdk_1.init)(provider);
|
|
89
|
+
const instructions = [];
|
|
90
|
+
const dataCredits = (0, data_credits_sdk_1.dataCreditsKey)(new web3_js_1.PublicKey(argv.dcMint))[0];
|
|
91
|
+
const dataCreditsAcc = yield program.account.dataCreditsV0.fetch(dataCredits);
|
|
92
|
+
console.log("Data Credits", dataCredits.toBase58());
|
|
93
|
+
console.log(dataCreditsAcc.authority.toBase58());
|
|
94
|
+
instructions.push(yield program.methods
|
|
95
|
+
.updateDataCreditsV0({
|
|
96
|
+
newAuthority: argv.newAuthority
|
|
97
|
+
? new web3_js_1.PublicKey(argv.newAuthority)
|
|
98
|
+
: null,
|
|
99
|
+
hntPriceOracle: argv.hntPriceOracle
|
|
100
|
+
? new web3_js_1.PublicKey(argv.hntPriceOracle)
|
|
101
|
+
: null,
|
|
102
|
+
})
|
|
103
|
+
.accounts({
|
|
104
|
+
dataCredits,
|
|
105
|
+
dcMint: new web3_js_1.PublicKey(argv.dcMint),
|
|
106
|
+
authority: dataCreditsAcc.authority,
|
|
107
|
+
})
|
|
108
|
+
.instruction());
|
|
109
|
+
const squads = sdk_1.default.endpoint(process.env.ANCHOR_PROVIDER_URL, provider.wallet);
|
|
110
|
+
yield (0, utils_1.sendInstructionsOrSquads)({
|
|
111
|
+
provider,
|
|
112
|
+
instructions,
|
|
113
|
+
executeTransaction: argv.executeTransaction,
|
|
114
|
+
squads,
|
|
115
|
+
multisig: argv.multisig ? new web3_js_1.PublicKey(argv.multisig) : undefined,
|
|
116
|
+
authorityIndex: argv.authorityIndex,
|
|
117
|
+
signers: [],
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
exports.run = run;
|
|
122
|
+
function isNull(vehntDelegated) {
|
|
123
|
+
return vehntDelegated === null || typeof vehntDelegated == "undefined";
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=update-data-credits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-data-credits.js","sourceRoot":"","sources":["../../src/update-data-credits.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAA4C;AAC5C,+DAA0E;AAC1E,6CAA4C;AAC5C,oDAA+B;AAC/B,4CAAoB;AACpB,wDAAgC;AAChC,mCAAqF;AAErF,SAAsB,GAAG,CAAC,OAAY,OAAO,CAAC,IAAI;;QAChD,MAAM,IAAI,GAAG,IAAA,eAAK,EAAC,IAAI,CAAC,CAAC,OAAO,CAAC;YAC/B,MAAM,EAAE;gBACN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AM,CAAC,cAAyC;IACvD,OAAO,cAAc,KAAK,IAAI,IAAI,OAAO,cAAc,IAAI,WAAW,CAAC;AACzE,CAAC"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.run = void 0;
|
|
39
|
+
const anchor = __importStar(require("@coral-xyz/anchor"));
|
|
40
|
+
const lazy_distributor_sdk_1 = require("@helium/lazy-distributor-sdk");
|
|
41
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
42
|
+
const sdk_1 = __importDefault(require("@sqds/sdk"));
|
|
43
|
+
const os_1 = __importDefault(require("os"));
|
|
44
|
+
const yargs_1 = __importDefault(require("yargs/yargs"));
|
|
45
|
+
const utils_1 = require("./utils");
|
|
46
|
+
function run(args = process.argv) {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
const yarg = (0, yargs_1.default)(args).options({
|
|
49
|
+
wallet: {
|
|
50
|
+
alias: "k",
|
|
51
|
+
describe: "Anchor wallet keypair",
|
|
52
|
+
default: `${os_1.default.homedir()}/.config/solana/id.json`,
|
|
53
|
+
},
|
|
54
|
+
url: {
|
|
55
|
+
alias: "u",
|
|
56
|
+
default: "http://127.0.0.1:8899",
|
|
57
|
+
describe: "The solana url",
|
|
58
|
+
},
|
|
59
|
+
subdaoMint: {
|
|
60
|
+
required: true,
|
|
61
|
+
describe: "Public Key of the subdao mint",
|
|
62
|
+
type: "string",
|
|
63
|
+
},
|
|
64
|
+
executeTransaction: {
|
|
65
|
+
type: "boolean",
|
|
66
|
+
},
|
|
67
|
+
multisig: {
|
|
68
|
+
type: "string",
|
|
69
|
+
describe: "Address of the squads multisig to be authority. If not provided, your wallet will be the authority",
|
|
70
|
+
},
|
|
71
|
+
authorityIndex: {
|
|
72
|
+
type: "number",
|
|
73
|
+
describe: "Authority index for squads. Defaults to 1",
|
|
74
|
+
default: 1,
|
|
75
|
+
},
|
|
76
|
+
oracle: {
|
|
77
|
+
type: "string",
|
|
78
|
+
describe: "Pubkey of the oracle",
|
|
79
|
+
},
|
|
80
|
+
rewardsOracleUrl: {
|
|
81
|
+
alias: "ro",
|
|
82
|
+
type: "string",
|
|
83
|
+
describe: "The rewards oracle URL",
|
|
84
|
+
},
|
|
85
|
+
newAuthority: {
|
|
86
|
+
type: "string",
|
|
87
|
+
},
|
|
88
|
+
newApprover: {
|
|
89
|
+
type: "string",
|
|
90
|
+
description: "Pubkey of the approver pda"
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
const argv = yield yarg.argv;
|
|
94
|
+
process.env.ANCHOR_WALLET = argv.wallet;
|
|
95
|
+
process.env.ANCHOR_PROVIDER_URL = argv.url;
|
|
96
|
+
anchor.setProvider(anchor.AnchorProvider.local(argv.url));
|
|
97
|
+
const provider = anchor.getProvider();
|
|
98
|
+
const lazyDistProgram = yield (0, lazy_distributor_sdk_1.init)(provider);
|
|
99
|
+
const subdaoMint = new web3_js_1.PublicKey(argv.subdaoMint);
|
|
100
|
+
const [lazyDist] = (0, lazy_distributor_sdk_1.lazyDistributorKey)(subdaoMint);
|
|
101
|
+
const lazyDistAcc = yield lazyDistProgram.account.lazyDistributorV0.fetch(lazyDist);
|
|
102
|
+
const squads = sdk_1.default.endpoint(process.env.ANCHOR_PROVIDER_URL, provider.wallet);
|
|
103
|
+
const ix = yield lazyDistProgram.methods
|
|
104
|
+
.updateLazyDistributorV0({
|
|
105
|
+
authority: argv.newAuthority
|
|
106
|
+
? new web3_js_1.PublicKey(argv.newAuthority)
|
|
107
|
+
: lazyDistAcc.authority,
|
|
108
|
+
oracles: argv.oracle && argv.rewardsOracleUrl
|
|
109
|
+
? [
|
|
110
|
+
{
|
|
111
|
+
oracle: new web3_js_1.PublicKey(argv.oracle),
|
|
112
|
+
url: argv.rewardsOracleUrl,
|
|
113
|
+
},
|
|
114
|
+
]
|
|
115
|
+
: null,
|
|
116
|
+
approver: argv.newApprover ? new web3_js_1.PublicKey(argv.newApprover) : null
|
|
117
|
+
})
|
|
118
|
+
.accounts({
|
|
119
|
+
rewardsMint: subdaoMint,
|
|
120
|
+
authority: lazyDistAcc.authority,
|
|
121
|
+
})
|
|
122
|
+
.instruction();
|
|
123
|
+
yield (0, utils_1.sendInstructionsOrSquads)({
|
|
124
|
+
provider,
|
|
125
|
+
instructions: [ix],
|
|
126
|
+
executeTransaction: argv.executeTransaction,
|
|
127
|
+
squads,
|
|
128
|
+
multisig: argv.multisig ? new web3_js_1.PublicKey(argv.multisig) : undefined,
|
|
129
|
+
authorityIndex: argv.authorityIndex,
|
|
130
|
+
signers: [],
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
exports.run = run;
|
|
135
|
+
//# sourceMappingURL=update-lazy-distributor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-lazy-distributor.js","sourceRoot":"","sources":["../../src/update-lazy-distributor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAA4C;AAE5C,uEAGsC;AACtC,6CAA4C;AAC5C,oDAA+B;AAC/B,4CAAoB;AACpB,wDAAgC;AAChC,mCAAmD;AAEnD,SAAsB,GAAG,CAAC,OAAY,OAAO,CAAC,IAAI;;QAChD,MAAM,IAAI,GAAG,IAAA,eAAK,EAAC,IAAI,CAAC,CAAC,OAAO,CAAC;YAC/B,MAAM,EAAE;gBACN,KAAK,EAAE,GAAG;gBACV,QAAQ,EAAE,uBAAuB;gBACjC,OAAO,EAAE,GAAG,YAAE,CAAC,OAAO,EAAE,yBAAyB;aAClD;YACD,GAAG,EAAE;gBACH,KAAK,EAAE,GAAG;gBACV,OAAO,EAAE,uBAAuB;gBAChC,QAAQ,EAAE,gBAAgB;aAC3B;YACD,UAAU,EAAE;gBACV,QAAQ,EAAE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,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.run = void 0;
|
|
39
|
+
const anchor = __importStar(require("@coral-xyz/anchor"));
|
|
40
|
+
const helium_sub_daos_sdk_1 = require("@helium/helium-sub-daos-sdk");
|
|
41
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
42
|
+
const sdk_1 = __importDefault(require("@sqds/sdk"));
|
|
43
|
+
const bn_js_1 = require("bn.js");
|
|
44
|
+
const os_1 = __importDefault(require("os"));
|
|
45
|
+
const yargs_1 = __importDefault(require("yargs/yargs"));
|
|
46
|
+
const utils_1 = require("./utils");
|
|
47
|
+
function run(args = process.argv) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
const yarg = (0, yargs_1.default)(args).options({
|
|
50
|
+
wallet: {
|
|
51
|
+
alias: "k",
|
|
52
|
+
describe: "Anchor wallet keypair",
|
|
53
|
+
default: `${os_1.default.homedir()}/.config/solana/id.json`,
|
|
54
|
+
},
|
|
55
|
+
url: {
|
|
56
|
+
alias: "u",
|
|
57
|
+
default: "http://127.0.0.1:8899",
|
|
58
|
+
describe: "The solana url",
|
|
59
|
+
},
|
|
60
|
+
dntMint: {
|
|
61
|
+
required: true,
|
|
62
|
+
type: "string",
|
|
63
|
+
describe: "DNT mint of the subdao to be updated",
|
|
64
|
+
},
|
|
65
|
+
name: {
|
|
66
|
+
alias: "n",
|
|
67
|
+
type: "string",
|
|
68
|
+
required: false,
|
|
69
|
+
describe: "The name of the entity config",
|
|
70
|
+
},
|
|
71
|
+
vehntDelegated: {
|
|
72
|
+
type: "string"
|
|
73
|
+
},
|
|
74
|
+
vehntLastCalculatedTs: {
|
|
75
|
+
type: "string"
|
|
76
|
+
},
|
|
77
|
+
vehntFallRate: {
|
|
78
|
+
type: "string"
|
|
79
|
+
},
|
|
80
|
+
executeTransaction: {
|
|
81
|
+
type: "boolean",
|
|
82
|
+
},
|
|
83
|
+
multisig: {
|
|
84
|
+
type: "string",
|
|
85
|
+
describe: "Address of the squads multisig to be authority. If not provided, your wallet will be the authority",
|
|
86
|
+
},
|
|
87
|
+
authorityIndex: {
|
|
88
|
+
type: "number",
|
|
89
|
+
describe: "Authority index for squads. Defaults to 1",
|
|
90
|
+
default: 1,
|
|
91
|
+
},
|
|
92
|
+
switchboardNetwork: {
|
|
93
|
+
type: "string",
|
|
94
|
+
describe: "The switchboard network",
|
|
95
|
+
default: "devnet",
|
|
96
|
+
},
|
|
97
|
+
registrar: {
|
|
98
|
+
type: "string",
|
|
99
|
+
required: false,
|
|
100
|
+
describe: "VSR Registrar of subdao",
|
|
101
|
+
default: null,
|
|
102
|
+
},
|
|
103
|
+
delegatorRewardsPercent: {
|
|
104
|
+
type: "number",
|
|
105
|
+
required: false,
|
|
106
|
+
describe: "Percentage of rewards allocated to delegators. Must be between 0-100 and can have 8 decimal places.",
|
|
107
|
+
default: null,
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
const argv = yield yarg.argv;
|
|
111
|
+
process.env.ANCHOR_WALLET = argv.wallet;
|
|
112
|
+
process.env.ANCHOR_PROVIDER_URL = argv.url;
|
|
113
|
+
anchor.setProvider(anchor.AnchorProvider.local(argv.url));
|
|
114
|
+
const provider = anchor.getProvider();
|
|
115
|
+
const program = yield (0, helium_sub_daos_sdk_1.init)(provider);
|
|
116
|
+
const instructions = [];
|
|
117
|
+
const subDao = (0, helium_sub_daos_sdk_1.subDaoKey)(new web3_js_1.PublicKey(argv.dntMint))[0];
|
|
118
|
+
const subDaoAcc = yield program.account.subDaoV0.fetch(subDao);
|
|
119
|
+
console.log("Subdao", subDao.toBase58());
|
|
120
|
+
instructions.push(yield program.methods
|
|
121
|
+
.updateSubDaoVehntV0({
|
|
122
|
+
vehntDelegated: isNull(argv.vehntDelegated)
|
|
123
|
+
? null
|
|
124
|
+
: new bn_js_1.BN(argv.vehntDelegated),
|
|
125
|
+
vehntLastCalculatedTs: isNull(argv.vehntLastCalculatedTs)
|
|
126
|
+
? null
|
|
127
|
+
: new bn_js_1.BN(argv.vehntLastCalculatedTs),
|
|
128
|
+
vehntFallRate: isNull(argv.vehntFallRate)
|
|
129
|
+
? null
|
|
130
|
+
: new bn_js_1.BN(argv.vehntFallRate),
|
|
131
|
+
})
|
|
132
|
+
.accounts({
|
|
133
|
+
subDao,
|
|
134
|
+
authority: subDaoAcc.authority,
|
|
135
|
+
})
|
|
136
|
+
.instruction());
|
|
137
|
+
const squads = sdk_1.default.endpoint(process.env.ANCHOR_PROVIDER_URL, provider.wallet);
|
|
138
|
+
yield (0, utils_1.sendInstructionsOrSquads)({
|
|
139
|
+
provider,
|
|
140
|
+
instructions,
|
|
141
|
+
executeTransaction: argv.executeTransaction,
|
|
142
|
+
squads,
|
|
143
|
+
multisig: argv.multisig ? new web3_js_1.PublicKey(argv.multisig) : undefined,
|
|
144
|
+
authorityIndex: argv.authorityIndex,
|
|
145
|
+
signers: [],
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
exports.run = run;
|
|
150
|
+
function isNull(vehntDelegated) {
|
|
151
|
+
return vehntDelegated === null || typeof vehntDelegated == "undefined";
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=update-subdao-vehnt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-subdao-vehnt.js","sourceRoot":"","sources":["../../src/update-subdao-vehnt.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAA4C;AAC5C,qEAGqC;AACrC,6CAA4C;AAC5C,oDAA+B;AAC/B,iCAA2B;AAC3B,4CAAoB;AACpB,wDAAgC;AAChC,mCAAmD;AAEnD,SAAsB,GAAG,CAAC,OAAY,OAAO,CAAC,IAAI;;QAChD,MAAM,IAAI,GAAG,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,CAAC,IAAI,UAAE,CAAC,IAAI,CAAC,aAAa,CAAC;SAC/B,CAAC;aACD,QAAQ,CAAC;YACR,MAAM;YACN,SAAS,EAAE,SAAS,CAAC,SAAS;SAC/B,CAAC;aACD,WAAW,EAAE,CACjB,CAAC;QAEF,MAAM,MAAM,GAAG,aAAM,CAAC,QAAQ,CAC5B,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAC/B,QAAQ,CAAC,MAAM,CAChB,CAAC;QACF,MAAM,IAAA,gCAAwB,EAAC;YAC7B,QAAQ;YACR,YAAY;YACZ,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,MAAM;YACN,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,mBAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;YAClE,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,OAAO,EAAE,EAAE;SACZ,CAAC,CAAC;IACL,CAAC;CAAA;AA9GD,kBA8GC;AAED,SAAS,MAAM,CAAC,cAAyC;IACvD,OAAO,cAAc,KAAK,IAAI,IAAI,OAAO,cAAc,IAAI,WAAW,CAAC;AACzE,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { getCurrentRewards } from "@helium/distributor-oracle";
|
|
|
3
3
|
import { init as initDao, subDaoKey } from "@helium/helium-sub-daos-sdk";
|
|
4
4
|
import { PROGRAM_ID } from "@helium/helium-entity-manager-sdk";
|
|
5
5
|
import { init as initLazy, lazyDistributorKey } from "@helium/lazy-distributor-sdk";
|
|
6
|
+
import { init as initRewards, } from "@helium/rewards-oracle-sdk";
|
|
6
7
|
import { sendAndConfirmWithRetry } from "@helium/spl-utils";
|
|
7
8
|
import Address from "@helium/address";
|
|
8
9
|
import * as anchor from "@coral-xyz/anchor";
|
|
@@ -34,6 +35,7 @@ export async function run(args = process.argv) {
|
|
|
34
35
|
const provider = anchor.getProvider();
|
|
35
36
|
const heliumSubDaosProgram = await initDao(provider);
|
|
36
37
|
const lazyDistributorProgram = await initLazy(provider);
|
|
38
|
+
const rewardsOracleProgram = await initRewards(provider);
|
|
37
39
|
const mobileKeypair = await loadKeypair(argv.mobileKeypair);
|
|
38
40
|
const mobileSubdao = (await subDaoKey(mobileKeypair.publicKey))[0];
|
|
39
41
|
const hotspotEcc = "11wsqKcoXGesnSbEwKTY8QkoqdFsG7oafcyPn8jBnzRK4sfCSw8";
|
|
@@ -44,6 +46,7 @@ export async function run(args = process.argv) {
|
|
|
44
46
|
const rewards = await getCurrentRewards(lazyDistributorProgram, lazyDistributor, hotspot);
|
|
45
47
|
const tx = await client.formTransaction({
|
|
46
48
|
program: lazyDistributorProgram,
|
|
49
|
+
rewardsOracleProgram: rewardsOracleProgram,
|
|
47
50
|
provider,
|
|
48
51
|
rewards,
|
|
49
52
|
hotspot,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-distribute-rewards.js","sourceRoot":"","sources":["../../../src/cli-distribute-rewards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EACL,IAAI,IAAI,OAAO,EACf,SAAS,EACV,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,UAAU,EACX,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,IAAI,IAAI,QAAQ,EAChB,kBAAkB,EACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,OAAO,MAAM,iBAAiB,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,SAA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