interchainjs
Version:
InterchainJS is a JavaScript library for interacting with Cosmos SDK based blockchains.
185 lines (184 loc) • 6.37 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateContractLabel = exports.storeAndMigrateContract = exports.addCodeUploadParamsAddresses = exports.removeCodeUploadParamsAddresses = exports.storeAndInstantiateContract = exports.unpinCodes = exports.pinCodes = exports.sudoContract = exports.updateParams = exports.updateInstantiateConfig = exports.clearAdmin = exports.updateAdmin = exports.migrateContract = exports.executeContract = exports.instantiateContract2 = exports.instantiateContract = exports.storeCode = void 0;
const helper_func_types_1 = require("../../../helper-func-types");
const tx_1 = require("./tx");
/**
* StoreCode to submit Wasm code to the system
* @name storeCode
* @package cosmwasm.wasm.v1
* @see proto service: cosmwasm.wasm.v1.StoreCode
*/
exports.storeCode = (0, helper_func_types_1.buildTx)({
msg: tx_1.MsgStoreCode
});
/**
* InstantiateContract creates a new smart contract instance for the given
* code id.
* @name instantiateContract
* @package cosmwasm.wasm.v1
* @see proto service: cosmwasm.wasm.v1.InstantiateContract
*/
exports.instantiateContract = (0, helper_func_types_1.buildTx)({
msg: tx_1.MsgInstantiateContract
});
/**
* InstantiateContract2 creates a new smart contract instance for the given
* code id with a predictable address
* @name instantiateContract2
* @package cosmwasm.wasm.v1
* @see proto service: cosmwasm.wasm.v1.InstantiateContract2
*/
exports.instantiateContract2 = (0, helper_func_types_1.buildTx)({
msg: tx_1.MsgInstantiateContract2
});
/**
* Execute submits the given message data to a smart contract
* @name executeContract
* @package cosmwasm.wasm.v1
* @see proto service: cosmwasm.wasm.v1.ExecuteContract
*/
exports.executeContract = (0, helper_func_types_1.buildTx)({
msg: tx_1.MsgExecuteContract
});
/**
* Migrate runs a code upgrade/ downgrade for a smart contract
* @name migrateContract
* @package cosmwasm.wasm.v1
* @see proto service: cosmwasm.wasm.v1.MigrateContract
*/
exports.migrateContract = (0, helper_func_types_1.buildTx)({
msg: tx_1.MsgMigrateContract
});
/**
* UpdateAdmin sets a new admin for a smart contract
* @name updateAdmin
* @package cosmwasm.wasm.v1
* @see proto service: cosmwasm.wasm.v1.UpdateAdmin
*/
exports.updateAdmin = (0, helper_func_types_1.buildTx)({
msg: tx_1.MsgUpdateAdmin
});
/**
* ClearAdmin removes any admin stored for a smart contract
* @name clearAdmin
* @package cosmwasm.wasm.v1
* @see proto service: cosmwasm.wasm.v1.ClearAdmin
*/
exports.clearAdmin = (0, helper_func_types_1.buildTx)({
msg: tx_1.MsgClearAdmin
});
/**
* UpdateInstantiateConfig updates instantiate config for a smart contract
* @name updateInstantiateConfig
* @package cosmwasm.wasm.v1
* @see proto service: cosmwasm.wasm.v1.UpdateInstantiateConfig
*/
exports.updateInstantiateConfig = (0, helper_func_types_1.buildTx)({
msg: tx_1.MsgUpdateInstantiateConfig
});
/**
* UpdateParams defines a governance operation for updating the x/wasm
* module parameters. The authority is defined in the keeper.
*
* Since: 0.40
* @name updateParams
* @package cosmwasm.wasm.v1
* @see proto service: cosmwasm.wasm.v1.UpdateParams
*/
exports.updateParams = (0, helper_func_types_1.buildTx)({
msg: tx_1.MsgUpdateParams
});
/**
* SudoContract defines a governance operation for calling sudo
* on a contract. The authority is defined in the keeper.
*
* Since: 0.40
* @name sudoContract
* @package cosmwasm.wasm.v1
* @see proto service: cosmwasm.wasm.v1.SudoContract
*/
exports.sudoContract = (0, helper_func_types_1.buildTx)({
msg: tx_1.MsgSudoContract
});
/**
* PinCodes defines a governance operation for pinning a set of
* code ids in the wasmvm cache. The authority is defined in the keeper.
*
* Since: 0.40
* @name pinCodes
* @package cosmwasm.wasm.v1
* @see proto service: cosmwasm.wasm.v1.PinCodes
*/
exports.pinCodes = (0, helper_func_types_1.buildTx)({
msg: tx_1.MsgPinCodes
});
/**
* UnpinCodes defines a governance operation for unpinning a set of
* code ids in the wasmvm cache. The authority is defined in the keeper.
*
* Since: 0.40
* @name unpinCodes
* @package cosmwasm.wasm.v1
* @see proto service: cosmwasm.wasm.v1.UnpinCodes
*/
exports.unpinCodes = (0, helper_func_types_1.buildTx)({
msg: tx_1.MsgUnpinCodes
});
/**
* StoreAndInstantiateContract defines a governance operation for storing
* and instantiating the contract. The authority is defined in the keeper.
*
* Since: 0.40
* @name storeAndInstantiateContract
* @package cosmwasm.wasm.v1
* @see proto service: cosmwasm.wasm.v1.StoreAndInstantiateContract
*/
exports.storeAndInstantiateContract = (0, helper_func_types_1.buildTx)({
msg: tx_1.MsgStoreAndInstantiateContract
});
/**
* RemoveCodeUploadParamsAddresses defines a governance operation for
* removing addresses from code upload params.
* The authority is defined in the keeper.
* @name removeCodeUploadParamsAddresses
* @package cosmwasm.wasm.v1
* @see proto service: cosmwasm.wasm.v1.RemoveCodeUploadParamsAddresses
*/
exports.removeCodeUploadParamsAddresses = (0, helper_func_types_1.buildTx)({
msg: tx_1.MsgRemoveCodeUploadParamsAddresses
});
/**
* AddCodeUploadParamsAddresses defines a governance operation for
* adding addresses to code upload params.
* The authority is defined in the keeper.
* @name addCodeUploadParamsAddresses
* @package cosmwasm.wasm.v1
* @see proto service: cosmwasm.wasm.v1.AddCodeUploadParamsAddresses
*/
exports.addCodeUploadParamsAddresses = (0, helper_func_types_1.buildTx)({
msg: tx_1.MsgAddCodeUploadParamsAddresses
});
/**
* StoreAndMigrateContract defines a governance operation for storing
* and migrating the contract. The authority is defined in the keeper.
*
* Since: 0.42
* @name storeAndMigrateContract
* @package cosmwasm.wasm.v1
* @see proto service: cosmwasm.wasm.v1.StoreAndMigrateContract
*/
exports.storeAndMigrateContract = (0, helper_func_types_1.buildTx)({
msg: tx_1.MsgStoreAndMigrateContract
});
/**
* UpdateContractLabel sets a new label for a smart contract
*
* Since: 0.43
* @name updateContractLabel
* @package cosmwasm.wasm.v1
* @see proto service: cosmwasm.wasm.v1.UpdateContractLabel
*/
exports.updateContractLabel = (0, helper_func_types_1.buildTx)({
msg: tx_1.MsgUpdateContractLabel
});