vasku
Version:
TVM-Solidity contract development framework
140 lines (139 loc) • 4.86 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SafeMultisigWallet = void 0;
const SafeMultisigWalletContent_1 = require("./SafeMultisigWalletContent");
const index_1 = require("../../index");
class SafeMultisigWallet extends index_1.Contract {
_call;
_run;
_payload;
constructor(config = {}, options = {}) {
if (config.address === undefined)
super({
abi: SafeMultisigWalletContent_1.SafeMultisigWalletContent.abi,
initial: config.initial ?? {},
keys: config.keys,
tvc: SafeMultisigWalletContent_1.SafeMultisigWalletContent.tvc
}, options);
else
super({
address: config.address,
abi: SafeMultisigWalletContent_1.SafeMultisigWalletContent.abi
}, options);
this._call = new SafeMultisigWalletCalls(this);
this._run = new SafeMultisigWalletRuns(this);
this._payload = new SafeMultisigWalletPayload(this);
}
async deploy(value, input, useGiver = true, timeout = 60000) {
return await this._deploy(value, input, useGiver, timeout);
}
get call() {
return this._call;
}
get run() {
return this._run;
}
get payload() {
return this._payload;
}
}
exports.SafeMultisigWallet = SafeMultisigWallet;
class SafeMultisigWalletCalls {
contract;
constructor(contract) {
this.contract = contract;
}
async acceptTransfer(input, keys) {
return await this.contract.callMethod('acceptTransfer', input, keys);
}
async sendTransaction(input, keys) {
return await this.contract.callMethod('sendTransaction', input, keys);
}
async submitTransaction(input, keys) {
return await this.contract.callMethod('submitTransaction', input, keys);
}
async confirmTransaction(input, keys) {
return await this.contract.callMethod('confirmTransaction', input, keys);
}
async isConfirmed(input, keys) {
return await this.contract.callMethod('isConfirmed', input, keys);
}
async getParameters(keys) {
return await this.contract.callMethod('getParameters', {}, keys);
}
async getTransaction(input, keys) {
return await this.contract.callMethod('getTransaction', input, keys);
}
async getTransactions(keys) {
return await this.contract.callMethod('getTransactions', {}, keys);
}
async getTransactionIds(keys) {
return await this.contract.callMethod('getTransactionIds', {}, keys);
}
async getCustodians(keys) {
return await this.contract.callMethod('getCustodians', {}, keys);
}
}
class SafeMultisigWalletRuns {
contract;
constructor(contract) {
this.contract = contract;
}
async submitTransaction(input) {
return (await this.contract.runMethod('submitTransaction', input)).value;
}
async isConfirmed(input) {
return (await this.contract.runMethod('isConfirmed', input)).value;
}
async getParameters() {
return (await this.contract.runMethod('getParameters')).value;
}
async getTransaction(input) {
return (await this.contract.runMethod('getTransaction', input)).value;
}
async getTransactions() {
return (await this.contract.runMethod('getTransactions')).value;
}
async getTransactionIds() {
return (await this.contract.runMethod('getTransactionIds')).value;
}
async getCustodians() {
return (await this.contract.runMethod('getCustodians')).value;
}
}
class SafeMultisigWalletPayload {
contract;
constructor(contract) {
this.contract = contract;
}
async acceptTransfer(input) {
return await this.contract.createPayload('acceptTransfer', input);
}
async sendTransaction(input) {
return await this.contract.createPayload('sendTransaction', input);
}
async submitTransaction(input) {
return await this.contract.createPayload('submitTransaction', input);
}
async confirmTransaction(input) {
return await this.contract.createPayload('confirmTransaction', input);
}
async isConfirmed(input) {
return await this.contract.createPayload('isConfirmed', input);
}
async getParameters() {
return await this.contract.createPayload('getParameters');
}
async getTransaction(input) {
return await this.contract.createPayload('getTransaction', input);
}
async getTransactions() {
return await this.contract.createPayload('getTransactions');
}
async getTransactionIds() {
return await this.contract.createPayload('getTransactionIds');
}
async getCustodians() {
return await this.contract.createPayload('getCustodians');
}
}