Skip to main content

Namespace: mgvTestUtil

Enumerations​

Type Aliases​

Account​

Ζ¬ Account: Object

Type declaration​

NameType
namestring
addressstring
signerethers.Signer
connectedContracts{ mangrove: typechain.IMangrove ; testMaker: typechain.SimpleTestMaker ; tokenA: typechain.TestToken ; tokenB: typechain.TestToken }
connectedContracts.mangrovetypechain.IMangrove
connectedContracts.testMakertypechain.SimpleTestMaker
connectedContracts.tokenAtypechain.TestToken
connectedContracts.tokenBtypechain.TestToken

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:10


Balances​

Ζ¬ Balances: Object

Type declaration​

NameType
etherethers.BigNumber
tokenAethers.BigNumber
tokenBethers.BigNumber

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:23


AddressAndSigner​

Ζ¬ AddressAndSigner: Object

Type declaration​

NameType
addressstring
signerstring

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:31


Addresses​

Ζ¬ Addresses: Object

Type declaration​

NameType
mangroveAddressAndSigner
testMakerAddressAndSigner
tokenAAddressAndSigner
tokenBAddressAndSigner

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:33


Contracts​

Ζ¬ Contracts: Object

Type declaration​

NameType
mangrovetypechain.IMangrove
testMakertypechain.SimpleTestMaker
tokenAtypechain.TestToken
tokenBtypechain.TestToken

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:89


NewOffer​

Ζ¬ NewOffer: Object

Type declaration​

NameType
marketMarket
baBA
makerAccount
tick?ethers.BigNumberish
gives?ethers.BigNumberish
gasreq?ethers.BigNumberish
shouldFail?boolean
shouldReturnData?boolean
shouldRevert?boolean

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:218

Variables​

bidsAsks​

β€’ Const bidsAsks: BA[]

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:29


rawMinGivesBase​

β€’ Const rawMinGivesBase: BigNumber

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:46


rawMinGivesQuote​

β€’ Const rawMinGivesQuote: BigNumber

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:47


isTrackingPolls​

β€’ isTrackingPolls: boolean = false

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:230


eventsForLastTxHaveBeenGeneratedPromise​

β€’ eventsForLastTxHaveBeenGeneratedPromise: Promise<void>

Await this when you want to wait for all events corresponding to the last sent tx to have been sent.

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:239

Functions​

setConfig​

β–Έ setConfig(_mgv, accounts): void

Parameters​

NameType
_mgvMangrove
accountsany

Returns​

void

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:55


getAddresses​

β–Έ getAddresses(): Promise<Addresses>

Returns​

Promise<Addresses>

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:62


logAddresses​

β–Έ logAddresses(): Promise<void>

Returns​

Promise<void>

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:82


getContracts​

β–Έ getContracts(signer): Promise<Contracts>

Parameters​

NameType
signerSigner

Returns​

Promise<Contracts>

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:96


getAccount​

β–Έ getAccount(name): Promise<Account>

Parameters​

NameType
nameAccountName

Returns​

Promise<Account>

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:127


getAccountBalances​

β–Έ getAccountBalances(account, provider): Promise<Balances>

Parameters​

NameType
accountAccount
providerProvider

Returns​

Promise<Balances>

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:140


getBalances​

β–Έ getBalances(accounts, provider): Promise<Map<string, Balances>>

Parameters​

NameType
accountsAccount[]
providerProvider

Returns​

Promise<Map<string, Balances>>

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:151


logBalances​

β–Έ logBalances(accounts, balancesBefore, balancesAfter): Promise<void>

Parameters​

NameType
accountsAccount[]
balancesBeforeMap<string, Balances>
balancesAfterMap<string, Balances>

Returns​

Promise<void>

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:162


waitForBlock​

β–Έ waitForBlock(mgv, blockNumber): Promise<void>

Parameters​

NameType
mgvMangrove
blockNumbernumber

Returns​

Promise<void>

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:243


initPollOfTransactionTracking​

β–Έ initPollOfTransactionTracking(provider): void

Call this to enable tracking of whether the last transaction sent by this library has been mined and polled.

Parameters​

NameType
providerProvider

Returns​

void

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:282


stopPollOfTransactionTracking​

β–Έ stopPollOfTransactionTracking(): void

Call this disable tracking of whether the last transaction sent by this library has been mined and polled.

Returns​

void

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:292


waitForTransactions​

β–Έ waitForTransactions(txPromises): Promise<TransactionReceipt[]>

Use this to await transactions. In addition to convenience, it allows us to track when events for the last tx have been generated. NB: Only works when this is awaited before sending more tx's.

Parameters​

NameType
txPromises(undefined | ContractTransaction | Promise<undefined | ContractTransaction>)[] | Promise<(undefined | ContractTransaction | Promise<undefined | ContractTransaction>)[]>

Returns​

Promise<TransactionReceipt[]>

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:303


waitForOptionalTransaction​

β–Έ waitForOptionalTransaction(txPromise): Promise<TransactionReceipt | undefined>

Use this to await transactions or return immediately if promise returns undefined. In addition to convenience, it allows us to track when events for the last tx have been generated. NB: Only works when this is awaited before sending more tx's.

Parameters​

NameType
txPromiseundefined | ContractTransaction | Promise<undefined | ContractTransaction>

Returns​

Promise<TransactionReceipt | undefined>

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:331


waitForTransaction​

β–Έ waitForTransaction(txPromise): Promise<TransactionReceipt>

Use this to await transactions. In addition to convenience, it allows us to track when events for the last tx have been generated. NB: Only works when this is awaited before sending more tx's.

Parameters​

NameType
txPromiseContractTransaction | Promise<ContractTransaction>

Returns​

Promise<TransactionReceipt>

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:355


postNewOffer​

β–Έ postNewOffer(Β«destructuredΒ»): Promise<TransactionReceipt>

Parameters​

NameType
Β«destructuredΒ»NewOffer

Returns​

Promise<TransactionReceipt>

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:366


postNewRevertingOffer​

β–Έ postNewRevertingOffer(market, ba, maker): Promise<TransactionReceipt>

Parameters​

NameType
marketMarket
baBA
makerAccount

Returns​

Promise<TransactionReceipt>

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:408


postNewSucceedingOffer​

β–Έ postNewSucceedingOffer(market, ba, maker): Promise<TransactionReceipt>

Parameters​

NameType
marketMarket
baBA
makerAccount

Returns​

Promise<TransactionReceipt>

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:423


postNewFailingOffer​

β–Έ postNewFailingOffer(market, ba, maker): Promise<TransactionReceipt>

Parameters​

NameType
marketMarket
baBA
makerAccount

Returns​

Promise<TransactionReceipt>

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:431


setMgvGasPrice​

β–Έ setMgvGasPrice(gasPrice): Promise<void>

Parameters​

NameType
gasPriceBigNumberish

Returns​

Promise<void>

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:439


mint​

β–Έ mint(token, receiver, amount): Promise<void>

Parameters​

NameType
tokenToken
receiverAccount
amountnumber

Returns​

Promise<void>

Defined in​

@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:477

  • Enumerations
  • Type Aliases
    • Account
    • Balances
    • AddressAndSigner
    • Addresses
    • Contracts
    • NewOffer
  • Variables
    • bidsAsks
    • rawMinGivesBase
    • rawMinGivesQuote
    • isTrackingPolls
    • eventsForLastTxHaveBeenGeneratedPromise
  • Functions
    • setConfig
    • getAddresses
    • logAddresses
    • getContracts
    • getAccount
    • getAccountBalances
    • getBalances
    • logBalances
    • waitForBlock
    • initPollOfTransactionTracking
    • stopPollOfTransactionTracking
    • waitForTransactions
    • waitForOptionalTransaction
    • waitForTransaction
    • postNewOffer
    • postNewRevertingOffer
    • postNewSucceedingOffer
    • postNewFailingOffer
    • setMgvGasPrice
    • mint