UNPKG

@kamino-finance/farms-sdk

Version:
19 lines 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.updateGlobalConfigAdminCommand = updateGlobalConfigAdminCommand; const web3_js_1 = require("@solana/web3.js"); const utils_1 = require("./utils"); const utils_2 = require("../utils"); const Farms_1 = require("../Farms"); async function updateGlobalConfigAdminCommand(globalConfigOverride, mode, priorityFeeMultiplier) { const admin = process.env.ADMIN; const rpc = process.env.RPC; // use globalConfigOverride only if it's different than Pubkey.default const globalConfigAddress = globalConfigOverride.equals(web3_js_1.PublicKey.default) ? new web3_js_1.PublicKey(process.env.FARMS_GLOBAL_CONFIG) : globalConfigOverride; const env = (0, utils_1.initializeClient)(rpc, admin, (0, utils_2.getFarmsProgramId)(rpc), mode === "multisig"); const farmsClient = new Farms_1.Farms(env.provider.connection); await farmsClient.updateGlobalConfigAdmin(env.initialOwner, globalConfigAddress, mode, priorityFeeMultiplier, env.web3Client); } //# sourceMappingURL=update_global_admin.js.map