/* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ import { Address, Contract, ContractState, TestContractResult, HexString, ContractFactory, EventSubscribeOptions, EventSubscription, CallContractParams, CallContractResult, TestContractParams, ContractEvent, subscribeContractEvent, subscribeContractEvents, testMethod, callMethod, multicallMethods, fetchContractState, Asset, ContractInstance, getContractEventsCurrentCount, TestContractParamsWithoutMaps, TestContractResultWithoutMaps, SignExecuteContractMethodParams, SignExecuteScriptTxResult, signExecuteMethod, addStdIdToFields, encodeContractFields, Narrow, } from "@alephium/web3"; import { default as XAlphStakeVaultContractJson } from "../XAlphStakeVault.ral.json"; import { getContractByCodeHash, registerContract } from "./contracts"; import * as types from "./types"; import { RalphMap } from "@alephium/web3"; // Custom types for the contract export namespace XAlphStakeVaultTypes { export type Fields = { stakeTokenId: HexString; maxConnectedDapps: bigint; merkleRoot: HexString; totalStakedAmount: bigint; owner: Address; }; export type State = ContractState; export type UpdateRootEvent = ContractEvent<{ newMerkleRoot: HexString; updatedBy: Address; }>; export type StakedEvent = ContractEvent<{ staker: Address; amount: bigint }>; export type UnstakedEvent = ContractEvent<{ staker: Address; amount: bigint; }>; export interface CallMethodTable { get: { params: CallContractParams<{ array: HexString; index: bigint }>; result: CallContractResult; }; find: { params: CallContractParams<{ array: HexString; value: HexString }>; result: CallContractResult; }; remove: { params: CallContractParams<{ array: HexString; value: HexString }>; result: CallContractResult; }; push: { params: CallContractParams<{ array: HexString; value: HexString }>; result: CallContractResult; }; removeAt: { params: CallContractParams<{ array: HexString; index: bigint }>; result: CallContractResult; }; size: { params: CallContractParams<{ array: HexString }>; result: CallContractResult; }; empty: { params: Omit, "args">; result: CallContractResult; }; getMerkleRoot: { params: Omit, "args">; result: CallContractResult; }; updateRoot: { params: CallContractParams<{ newMerkleRoot: HexString }>; result: CallContractResult; }; verify: { params: CallContractParams<{ proof: HexString; dataHash: HexString }>; result: CallContractResult; }; hashPair: { params: CallContractParams<{ a: HexString; b: HexString }>; result: CallContractResult; }; hash: { params: CallContractParams<{ dataToHash: HexString }>; result: CallContractResult; }; getStakeTokenId: { params: Omit, "args">; result: CallContractResult; }; getUserStakingInfo: { params: CallContractParams<{ user: Address }>; result: CallContractResult; }; isStaking: { params: CallContractParams<{ user: Address }>; result: CallContractResult; }; stake: { params: CallContractParams<{ amount: bigint }>; result: CallContractResult; }; unstake: { params: CallContractParams<{ amount: bigint }>; result: CallContractResult; }; connectToDapp: { params: CallContractParams<{ contractId: HexString; merkleProof: HexString; }>; result: CallContractResult; }; disconnectFromDapp: { params: CallContractParams<{ contractId: HexString }>; result: CallContractResult; }; getWeight: { params: CallContractParams<{ user: Address }>; result: CallContractResult; }; updateDappTemplatesWhitelistMerkleRoot: { params: CallContractParams<{ newMerkleRoot: HexString }>; result: CallContractResult; }; updateOwner: { params: CallContractParams<{ newOwner: Address }>; result: CallContractResult; }; verifyDappTemplatesWhiteListed: { params: CallContractParams<{ proof: HexString; contractId: HexString }>; result: CallContractResult; }; } export type CallMethodParams = CallMethodTable[T]["params"]; export type CallMethodResult = CallMethodTable[T]["result"]; export type MultiCallParams = Partial<{ [Name in keyof CallMethodTable]: CallMethodTable[Name]["params"]; }>; export type MultiCallResults = { [MaybeName in keyof T]: MaybeName extends keyof CallMethodTable ? CallMethodTable[MaybeName]["result"] : undefined; }; export type MulticallReturnType = { [index in keyof Callss]: MultiCallResults; }; export interface SignExecuteMethodTable { get: { params: SignExecuteContractMethodParams<{ array: HexString; index: bigint; }>; result: SignExecuteScriptTxResult; }; find: { params: SignExecuteContractMethodParams<{ array: HexString; value: HexString; }>; result: SignExecuteScriptTxResult; }; remove: { params: SignExecuteContractMethodParams<{ array: HexString; value: HexString; }>; result: SignExecuteScriptTxResult; }; push: { params: SignExecuteContractMethodParams<{ array: HexString; value: HexString; }>; result: SignExecuteScriptTxResult; }; removeAt: { params: SignExecuteContractMethodParams<{ array: HexString; index: bigint; }>; result: SignExecuteScriptTxResult; }; size: { params: SignExecuteContractMethodParams<{ array: HexString }>; result: SignExecuteScriptTxResult; }; empty: { params: Omit, "args">; result: SignExecuteScriptTxResult; }; getMerkleRoot: { params: Omit, "args">; result: SignExecuteScriptTxResult; }; updateRoot: { params: SignExecuteContractMethodParams<{ newMerkleRoot: HexString }>; result: SignExecuteScriptTxResult; }; verify: { params: SignExecuteContractMethodParams<{ proof: HexString; dataHash: HexString; }>; result: SignExecuteScriptTxResult; }; hashPair: { params: SignExecuteContractMethodParams<{ a: HexString; b: HexString }>; result: SignExecuteScriptTxResult; }; hash: { params: SignExecuteContractMethodParams<{ dataToHash: HexString }>; result: SignExecuteScriptTxResult; }; getStakeTokenId: { params: Omit, "args">; result: SignExecuteScriptTxResult; }; getUserStakingInfo: { params: SignExecuteContractMethodParams<{ user: Address }>; result: SignExecuteScriptTxResult; }; isStaking: { params: SignExecuteContractMethodParams<{ user: Address }>; result: SignExecuteScriptTxResult; }; stake: { params: SignExecuteContractMethodParams<{ amount: bigint }>; result: SignExecuteScriptTxResult; }; unstake: { params: SignExecuteContractMethodParams<{ amount: bigint }>; result: SignExecuteScriptTxResult; }; connectToDapp: { params: SignExecuteContractMethodParams<{ contractId: HexString; merkleProof: HexString; }>; result: SignExecuteScriptTxResult; }; disconnectFromDapp: { params: SignExecuteContractMethodParams<{ contractId: HexString }>; result: SignExecuteScriptTxResult; }; getWeight: { params: SignExecuteContractMethodParams<{ user: Address }>; result: SignExecuteScriptTxResult; }; updateDappTemplatesWhitelistMerkleRoot: { params: SignExecuteContractMethodParams<{ newMerkleRoot: HexString }>; result: SignExecuteScriptTxResult; }; updateOwner: { params: SignExecuteContractMethodParams<{ newOwner: Address }>; result: SignExecuteScriptTxResult; }; verifyDappTemplatesWhiteListed: { params: SignExecuteContractMethodParams<{ proof: HexString; contractId: HexString; }>; result: SignExecuteScriptTxResult; }; } export type SignExecuteMethodParams = SignExecuteMethodTable[T]["params"]; export type SignExecuteMethodResult = SignExecuteMethodTable[T]["result"]; export type Maps = { userStakingInfo?: Map }; } class Factory extends ContractFactory< XAlphStakeVaultInstance, XAlphStakeVaultTypes.Fields > { encodeFields(fields: XAlphStakeVaultTypes.Fields) { return encodeContractFields( addStdIdToFields(this.contract, fields), this.contract.fieldsSig, types.AllStructs ); } eventIndex = { UpdateRoot: 0, Staked: 1, Unstaked: 2 }; consts = { IntByteLength: BigInt("32"), WEIGHT_SCALING_FACTOR: BigInt("1000000000000000000"), ErrorCode: { InvalidArrayLength: BigInt("550"), IndexOutOfBound: BigInt("551"), InvalidByteVecLength: BigInt("552"), }, MerkleProofErrorCodes: { InvalidProofSize: BigInt("11001"), InvalidDataHash: BigInt("11002"), InvalidMerkleRoot: BigInt("11003"), }, ErrorCodes: { NotOwner: BigInt("300"), AssetAddressCallerOnly: BigInt("301"), NoStakingInfo: BigInt("302"), InsufficientStakedAmount: BigInt("303"), InvalidStakedAmount: BigInt("304"), InvalidUnstakedAmount: BigInt("305"), MaxConnectedDappsReached: BigInt("306"), DappAlreadyConnected: BigInt("307"), DappNotConnected: BigInt("308"), DappNotAllowed: BigInt("309"), }, }; at(address: string): XAlphStakeVaultInstance { return new XAlphStakeVaultInstance(address); } tests = { get: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { array: HexString; index: bigint }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod(this, "get", params, getContractByCodeHash); }, find: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { array: HexString; value: HexString }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod(this, "find", params, getContractByCodeHash); }, remove: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { array: HexString; value: HexString }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod(this, "remove", params, getContractByCodeHash); }, push: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { array: HexString; value: HexString }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod(this, "push", params, getContractByCodeHash); }, removeAt: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { array: HexString; index: bigint }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod(this, "removeAt", params, getContractByCodeHash); }, size: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { array: HexString }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod(this, "size", params, getContractByCodeHash); }, empty: async ( params: Omit< TestContractParams< XAlphStakeVaultTypes.Fields, never, XAlphStakeVaultTypes.Maps >, "args" > ): Promise> => { return testMethod(this, "empty", params, getContractByCodeHash); }, getMerkleRoot: async ( params: Omit< TestContractParams< XAlphStakeVaultTypes.Fields, never, XAlphStakeVaultTypes.Maps >, "args" > ): Promise> => { return testMethod(this, "getMerkleRoot", params, getContractByCodeHash); }, updateRoot: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { newMerkleRoot: HexString }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod(this, "updateRoot", params, getContractByCodeHash); }, verify: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { proof: HexString; dataHash: HexString }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod(this, "verify", params, getContractByCodeHash); }, hashPair: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { a: HexString; b: HexString }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod(this, "hashPair", params, getContractByCodeHash); }, hash: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { dataToHash: HexString }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod(this, "hash", params, getContractByCodeHash); }, getStakeTokenId: async ( params: Omit< TestContractParams< XAlphStakeVaultTypes.Fields, never, XAlphStakeVaultTypes.Maps >, "args" > ): Promise> => { return testMethod(this, "getStakeTokenId", params, getContractByCodeHash); }, getUserStakingInfo: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { user: Address }, XAlphStakeVaultTypes.Maps > ): Promise< TestContractResult > => { return testMethod( this, "getUserStakingInfo", params, getContractByCodeHash ); }, isStaking: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { user: Address }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod(this, "isStaking", params, getContractByCodeHash); }, stake: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { amount: bigint }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod(this, "stake", params, getContractByCodeHash); }, unstake: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { amount: bigint }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod(this, "unstake", params, getContractByCodeHash); }, connectToDapp: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { contractId: HexString; merkleProof: HexString }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod(this, "connectToDapp", params, getContractByCodeHash); }, disconnectFromDapp: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { contractId: HexString }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod( this, "disconnectFromDapp", params, getContractByCodeHash ); }, getWeight: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { user: Address }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod(this, "getWeight", params, getContractByCodeHash); }, updateDappTemplatesWhitelistMerkleRoot: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { newMerkleRoot: HexString }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod( this, "updateDappTemplatesWhitelistMerkleRoot", params, getContractByCodeHash ); }, updateOwner: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { newOwner: Address }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod(this, "updateOwner", params, getContractByCodeHash); }, verifyDappTemplatesWhiteListed: async ( params: TestContractParams< XAlphStakeVaultTypes.Fields, { proof: HexString; contractId: HexString }, XAlphStakeVaultTypes.Maps > ): Promise> => { return testMethod( this, "verifyDappTemplatesWhiteListed", params, getContractByCodeHash ); }, }; stateForTest( initFields: XAlphStakeVaultTypes.Fields, asset?: Asset, address?: string, maps?: XAlphStakeVaultTypes.Maps ) { return this.stateForTest_(initFields, asset, address, maps); } } // Use this object to test and deploy the contract export const XAlphStakeVault = new Factory( Contract.fromJson( XAlphStakeVaultContractJson, "=66-2+29=1-3=1+22=1-1+4=1+d=2-2+43=2-2+92=2-2+a9=2-2+c0=2-2+d9=1166-2+61=323-1+b=34+7a7e0214696e73657274206174206d617020706174683a2000=55-1+d=297-1+c=38+7a7e021472656d6f7665206174206d617020706174683a2000=976", "5a98904451536bfc5851ac53658d832b096d820da66892272b361692d7a31790", types.AllStructs ) ); registerContract(XAlphStakeVault); // Use this class to interact with the blockchain export class XAlphStakeVaultInstance extends ContractInstance { constructor(address: Address) { super(address); } maps = { userStakingInfo: new RalphMap( XAlphStakeVault.contract, this.contractId, "userStakingInfo" ), }; async fetchState(): Promise { return fetchContractState(XAlphStakeVault, this); } async getContractEventsCurrentCount(): Promise { return getContractEventsCurrentCount(this.address); } subscribeUpdateRootEvent( options: EventSubscribeOptions, fromCount?: number ): EventSubscription { return subscribeContractEvent( XAlphStakeVault.contract, this, options, "UpdateRoot", fromCount ); } subscribeStakedEvent( options: EventSubscribeOptions, fromCount?: number ): EventSubscription { return subscribeContractEvent( XAlphStakeVault.contract, this, options, "Staked", fromCount ); } subscribeUnstakedEvent( options: EventSubscribeOptions, fromCount?: number ): EventSubscription { return subscribeContractEvent( XAlphStakeVault.contract, this, options, "Unstaked", fromCount ); } subscribeAllEvents( options: EventSubscribeOptions< | XAlphStakeVaultTypes.UpdateRootEvent | XAlphStakeVaultTypes.StakedEvent | XAlphStakeVaultTypes.UnstakedEvent >, fromCount?: number ): EventSubscription { return subscribeContractEvents( XAlphStakeVault.contract, this, options, fromCount ); } view = { get: async ( params: XAlphStakeVaultTypes.CallMethodParams<"get"> ): Promise> => { return callMethod( XAlphStakeVault, this, "get", params, getContractByCodeHash ); }, find: async ( params: XAlphStakeVaultTypes.CallMethodParams<"find"> ): Promise> => { return callMethod( XAlphStakeVault, this, "find", params, getContractByCodeHash ); }, remove: async ( params: XAlphStakeVaultTypes.CallMethodParams<"remove"> ): Promise> => { return callMethod( XAlphStakeVault, this, "remove", params, getContractByCodeHash ); }, push: async ( params: XAlphStakeVaultTypes.CallMethodParams<"push"> ): Promise> => { return callMethod( XAlphStakeVault, this, "push", params, getContractByCodeHash ); }, removeAt: async ( params: XAlphStakeVaultTypes.CallMethodParams<"removeAt"> ): Promise> => { return callMethod( XAlphStakeVault, this, "removeAt", params, getContractByCodeHash ); }, size: async ( params: XAlphStakeVaultTypes.CallMethodParams<"size"> ): Promise> => { return callMethod( XAlphStakeVault, this, "size", params, getContractByCodeHash ); }, empty: async ( params?: XAlphStakeVaultTypes.CallMethodParams<"empty"> ): Promise> => { return callMethod( XAlphStakeVault, this, "empty", params === undefined ? {} : params, getContractByCodeHash ); }, getMerkleRoot: async ( params?: XAlphStakeVaultTypes.CallMethodParams<"getMerkleRoot"> ): Promise> => { return callMethod( XAlphStakeVault, this, "getMerkleRoot", params === undefined ? {} : params, getContractByCodeHash ); }, updateRoot: async ( params: XAlphStakeVaultTypes.CallMethodParams<"updateRoot"> ): Promise> => { return callMethod( XAlphStakeVault, this, "updateRoot", params, getContractByCodeHash ); }, verify: async ( params: XAlphStakeVaultTypes.CallMethodParams<"verify"> ): Promise> => { return callMethod( XAlphStakeVault, this, "verify", params, getContractByCodeHash ); }, hashPair: async ( params: XAlphStakeVaultTypes.CallMethodParams<"hashPair"> ): Promise> => { return callMethod( XAlphStakeVault, this, "hashPair", params, getContractByCodeHash ); }, hash: async ( params: XAlphStakeVaultTypes.CallMethodParams<"hash"> ): Promise> => { return callMethod( XAlphStakeVault, this, "hash", params, getContractByCodeHash ); }, getStakeTokenId: async ( params?: XAlphStakeVaultTypes.CallMethodParams<"getStakeTokenId"> ): Promise> => { return callMethod( XAlphStakeVault, this, "getStakeTokenId", params === undefined ? {} : params, getContractByCodeHash ); }, getUserStakingInfo: async ( params: XAlphStakeVaultTypes.CallMethodParams<"getUserStakingInfo"> ): Promise> => { return callMethod( XAlphStakeVault, this, "getUserStakingInfo", params, getContractByCodeHash ); }, isStaking: async ( params: XAlphStakeVaultTypes.CallMethodParams<"isStaking"> ): Promise> => { return callMethod( XAlphStakeVault, this, "isStaking", params, getContractByCodeHash ); }, stake: async ( params: XAlphStakeVaultTypes.CallMethodParams<"stake"> ): Promise> => { return callMethod( XAlphStakeVault, this, "stake", params, getContractByCodeHash ); }, unstake: async ( params: XAlphStakeVaultTypes.CallMethodParams<"unstake"> ): Promise> => { return callMethod( XAlphStakeVault, this, "unstake", params, getContractByCodeHash ); }, connectToDapp: async ( params: XAlphStakeVaultTypes.CallMethodParams<"connectToDapp"> ): Promise> => { return callMethod( XAlphStakeVault, this, "connectToDapp", params, getContractByCodeHash ); }, disconnectFromDapp: async ( params: XAlphStakeVaultTypes.CallMethodParams<"disconnectFromDapp"> ): Promise> => { return callMethod( XAlphStakeVault, this, "disconnectFromDapp", params, getContractByCodeHash ); }, getWeight: async ( params: XAlphStakeVaultTypes.CallMethodParams<"getWeight"> ): Promise> => { return callMethod( XAlphStakeVault, this, "getWeight", params, getContractByCodeHash ); }, updateDappTemplatesWhitelistMerkleRoot: async ( params: XAlphStakeVaultTypes.CallMethodParams<"updateDappTemplatesWhitelistMerkleRoot"> ): Promise< XAlphStakeVaultTypes.CallMethodResult<"updateDappTemplatesWhitelistMerkleRoot"> > => { return callMethod( XAlphStakeVault, this, "updateDappTemplatesWhitelistMerkleRoot", params, getContractByCodeHash ); }, updateOwner: async ( params: XAlphStakeVaultTypes.CallMethodParams<"updateOwner"> ): Promise> => { return callMethod( XAlphStakeVault, this, "updateOwner", params, getContractByCodeHash ); }, verifyDappTemplatesWhiteListed: async ( params: XAlphStakeVaultTypes.CallMethodParams<"verifyDappTemplatesWhiteListed"> ): Promise< XAlphStakeVaultTypes.CallMethodResult<"verifyDappTemplatesWhiteListed"> > => { return callMethod( XAlphStakeVault, this, "verifyDappTemplatesWhiteListed", params, getContractByCodeHash ); }, }; transact = { get: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"get"> ): Promise> => { return signExecuteMethod(XAlphStakeVault, this, "get", params); }, find: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"find"> ): Promise> => { return signExecuteMethod(XAlphStakeVault, this, "find", params); }, remove: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"remove"> ): Promise> => { return signExecuteMethod(XAlphStakeVault, this, "remove", params); }, push: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"push"> ): Promise> => { return signExecuteMethod(XAlphStakeVault, this, "push", params); }, removeAt: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"removeAt"> ): Promise> => { return signExecuteMethod(XAlphStakeVault, this, "removeAt", params); }, size: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"size"> ): Promise> => { return signExecuteMethod(XAlphStakeVault, this, "size", params); }, empty: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"empty"> ): Promise> => { return signExecuteMethod(XAlphStakeVault, this, "empty", params); }, getMerkleRoot: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"getMerkleRoot"> ): Promise< XAlphStakeVaultTypes.SignExecuteMethodResult<"getMerkleRoot"> > => { return signExecuteMethod(XAlphStakeVault, this, "getMerkleRoot", params); }, updateRoot: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"updateRoot"> ): Promise> => { return signExecuteMethod(XAlphStakeVault, this, "updateRoot", params); }, verify: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"verify"> ): Promise> => { return signExecuteMethod(XAlphStakeVault, this, "verify", params); }, hashPair: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"hashPair"> ): Promise> => { return signExecuteMethod(XAlphStakeVault, this, "hashPair", params); }, hash: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"hash"> ): Promise> => { return signExecuteMethod(XAlphStakeVault, this, "hash", params); }, getStakeTokenId: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"getStakeTokenId"> ): Promise< XAlphStakeVaultTypes.SignExecuteMethodResult<"getStakeTokenId"> > => { return signExecuteMethod( XAlphStakeVault, this, "getStakeTokenId", params ); }, getUserStakingInfo: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"getUserStakingInfo"> ): Promise< XAlphStakeVaultTypes.SignExecuteMethodResult<"getUserStakingInfo"> > => { return signExecuteMethod( XAlphStakeVault, this, "getUserStakingInfo", params ); }, isStaking: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"isStaking"> ): Promise> => { return signExecuteMethod(XAlphStakeVault, this, "isStaking", params); }, stake: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"stake"> ): Promise> => { return signExecuteMethod(XAlphStakeVault, this, "stake", params); }, unstake: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"unstake"> ): Promise> => { return signExecuteMethod(XAlphStakeVault, this, "unstake", params); }, connectToDapp: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"connectToDapp"> ): Promise< XAlphStakeVaultTypes.SignExecuteMethodResult<"connectToDapp"> > => { return signExecuteMethod(XAlphStakeVault, this, "connectToDapp", params); }, disconnectFromDapp: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"disconnectFromDapp"> ): Promise< XAlphStakeVaultTypes.SignExecuteMethodResult<"disconnectFromDapp"> > => { return signExecuteMethod( XAlphStakeVault, this, "disconnectFromDapp", params ); }, getWeight: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"getWeight"> ): Promise> => { return signExecuteMethod(XAlphStakeVault, this, "getWeight", params); }, updateDappTemplatesWhitelistMerkleRoot: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"updateDappTemplatesWhitelistMerkleRoot"> ): Promise< XAlphStakeVaultTypes.SignExecuteMethodResult<"updateDappTemplatesWhitelistMerkleRoot"> > => { return signExecuteMethod( XAlphStakeVault, this, "updateDappTemplatesWhitelistMerkleRoot", params ); }, updateOwner: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"updateOwner"> ): Promise> => { return signExecuteMethod(XAlphStakeVault, this, "updateOwner", params); }, verifyDappTemplatesWhiteListed: async ( params: XAlphStakeVaultTypes.SignExecuteMethodParams<"verifyDappTemplatesWhiteListed"> ): Promise< XAlphStakeVaultTypes.SignExecuteMethodResult<"verifyDappTemplatesWhiteListed"> > => { return signExecuteMethod( XAlphStakeVault, this, "verifyDappTemplatesWhiteListed", params ); }, }; async multicall( calls: Calls ): Promise>; async multicall( callss: Narrow ): Promise>; async multicall< Callss extends | XAlphStakeVaultTypes.MultiCallParams | XAlphStakeVaultTypes.MultiCallParams[] >(callss: Callss): Promise { return await multicallMethods( XAlphStakeVault, this, callss, getContractByCodeHash ); } }