"use strict";
// Copyright 2017-2020 @polkadot/jsonrpc authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const method_1 = __importDefault(require("./create/method"));
const param_1 = __importDefault(require("./create/param"));
// NOTE order here is the same as in Rust, alphabetical below
const call = {
    description: 'Executes a call to a contract',
    isOptional: true,
    params: [
        param_1.default('callRequest', 'ContractCallRequest'),
        param_1.default('at', 'BlockHash', { isOptional: true })
    ],
    type: 'ContractExecResult'
};
const getStorage = {
    description: 'Returns the value under a specified storage key in a contract',
    isOptional: true,
    params: [
        param_1.default('address', 'AccountId'),
        param_1.default('key', 'H256'),
        param_1.default('at', 'BlockHash', { isOptional: true })
    ],
    type: 'Option<Bytes>'
};
const section = 'contracts';
/**
 * @summary Calls to retrieve system info.
 */
exports.default = {
    isDeprecated: false,
    isHidden: false,
    description: '(Optional) Methods that performs actions on contracts',
    section,
    methods: {
        call: method_1.default(section, 'call', call),
        getStorage: method_1.default(section, 'getStorage', getStorage)
    }
};
