Skip to content

Latest commit

 

History

History
145 lines (81 loc) · 2.55 KB

Contract.md

File metadata and controls

145 lines (81 loc) · 2.55 KB

beaker / Contract

Class: Contract

Contract instance with baked-in client

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Contract(address, client)

Parameters

Name Type
address string
client CosmWasmClient

Defined in

src/contract.ts:20

Properties

address

address: string

Defined in

src/contract.ts:17


client

client: CosmWasmClient

Defined in

src/contract.ts:18

Methods

execute

execute(xmsg, senderAddress, fee?): Object

Execute the contract. example usage: contract.execute(xmsg).by(signerAccount)

Parameters

Name Type Default value
xmsg Msg undefined
senderAddress null | string undefined
fee number | StdFee | "auto" 'auto'

Returns

Object

Name Type
by (account: Account) => Promise<ExecuteResult>

Defined in

src/contract.ts:51


getCode

getCode(): Promise<CodeDetails>

Get code details

Returns

Promise<CodeDetails>

Defined in

src/contract.ts:35


getInfo

getInfo(): Promise<Contract>

Get contract info

Returns

Promise<Contract>

Defined in

src/contract.ts:28


query

query(qmsg): Promise<unknown>

Query the contract by passing query message

Parameters

Name Type
qmsg Msg

Returns

Promise<unknown>

query result

Defined in

src/contract.ts:43