Namespace: mgvTestUtil
Enumerationsβ
Type Aliasesβ
Accountβ
Ζ¬ Account: Object
Type declarationβ
Name | Type |
---|---|
name | string |
address | string |
signer | ethers.Signer |
connectedContracts | { mangrove : typechain.IMangrove ; testMaker : typechain.SimpleTestMaker ; tokenA : typechain.TestToken ; tokenB : typechain.TestToken } |
connectedContracts.mangrove | typechain.IMangrove |
connectedContracts.testMaker | typechain.SimpleTestMaker |
connectedContracts.tokenA | typechain.TestToken |
connectedContracts.tokenB | typechain.TestToken |
Defined inβ
@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:10
Balancesβ
Ζ¬ Balances: Object
Type declarationβ
Name | Type |
---|---|
ether | ethers.BigNumber |
tokenA | ethers.BigNumber |
tokenB | ethers.BigNumber |
Defined inβ
@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:23
AddressAndSignerβ
Ζ¬ AddressAndSigner: Object
Type declarationβ
Name | Type |
---|---|
address | string |
signer | string |
Defined inβ
@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:31
Addressesβ
Ζ¬ Addresses: Object
Type declarationβ
Name | Type |
---|---|
mangrove | AddressAndSigner |
testMaker | AddressAndSigner |
tokenA | AddressAndSigner |
tokenB | AddressAndSigner |
Defined inβ
@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:33
Contractsβ
Ζ¬ Contracts: Object
Type declarationβ
Name | Type |
---|---|
mangrove | typechain.IMangrove |
testMaker | typechain.SimpleTestMaker |
tokenA | typechain.TestToken |
tokenB | typechain.TestToken |
Defined inβ
@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:89
NewOfferβ
Ζ¬ NewOffer: Object
Type declarationβ
Name | Type |
---|---|
market | Market |
ba | BA |
maker | Account |
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β
Name | Type |
---|---|
_mgv | Mangrove |
accounts | any |
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β
Name | Type |
---|---|
signer | Signer |
Returnsβ
Promise
<Contracts
>
Defined inβ
@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:96
getAccountβ
βΈ getAccount(name
): Promise
<Account
>
Parametersβ
Name | Type |
---|---|
name | AccountName |
Returnsβ
Promise
<Account
>
Defined inβ
@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:127
getAccountBalancesβ
βΈ getAccountBalances(account
, provider
): Promise
<Balances
>
Parametersβ
Name | Type |
---|---|
account | Account |
provider | Provider |
Returnsβ
Promise
<Balances
>
Defined inβ
@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:140
getBalancesβ
βΈ getBalances(accounts
, provider
): Promise
<Map
<string
, Balances
>>
Parametersβ
Name | Type |
---|---|
accounts | Account [] |
provider | Provider |
Returnsβ
Promise
<Map
<string
, Balances
>>
Defined inβ
@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:151
logBalancesβ
βΈ logBalances(accounts
, balancesBefore
, balancesAfter
): Promise
<void
>
Parametersβ
Name | Type |
---|---|
accounts | Account [] |
balancesBefore | Map <string , Balances > |
balancesAfter | Map <string , Balances > |
Returnsβ
Promise
<void
>
Defined inβ
@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:162
waitForBlockβ
βΈ waitForBlock(mgv
, blockNumber
): Promise
<void
>
Parametersβ
Name | Type |
---|---|
mgv | Mangrove |
blockNumber | number |
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β
Name | Type |
---|---|
provider | Provider |
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β
Name | Type |
---|---|
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β
Name | Type |
---|---|
txPromise | undefined | 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β
Name | Type |
---|---|
txPromise | ContractTransaction | Promise <ContractTransaction > |
Returnsβ
Promise
<TransactionReceipt
>
Defined inβ
@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:355
postNewOfferβ
βΈ postNewOffer(Β«destructuredΒ»
): Promise
<TransactionReceipt
>
Parametersβ
Name | Type |
---|---|
Β«destructuredΒ» | NewOffer |
Returnsβ
Promise
<TransactionReceipt
>
Defined inβ
@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:366
postNewRevertingOfferβ
βΈ postNewRevertingOffer(market
, ba
, maker
): Promise
<TransactionReceipt
>
Parametersβ
Name | Type |
---|---|
market | Market |
ba | BA |
maker | Account |
Returnsβ
Promise
<TransactionReceipt
>
Defined inβ
@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:408
postNewSucceedingOfferβ
βΈ postNewSucceedingOffer(market
, ba
, maker
): Promise
<TransactionReceipt
>
Parametersβ
Name | Type |
---|---|
market | Market |
ba | BA |
maker | Account |
Returnsβ
Promise
<TransactionReceipt
>
Defined inβ
@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:423
postNewFailingOfferβ
βΈ postNewFailingOffer(market
, ba
, maker
): Promise
<TransactionReceipt
>
Parametersβ
Name | Type |
---|---|
market | Market |
ba | BA |
maker | Account |
Returnsβ
Promise
<TransactionReceipt
>
Defined inβ
@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:431
setMgvGasPriceβ
βΈ setMgvGasPrice(gasPrice
): Promise
<void
>
Parametersβ
Name | Type |
---|---|
gasPrice | BigNumberish |
Returnsβ
Promise
<void
>
Defined inβ
@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:439
mintβ
βΈ mint(token
, receiver
, amount
): Promise
<void
>
Parametersβ
Name | Type |
---|---|
token | Token |
receiver | Account |
amount | number |
Returnsβ
Promise
<void
>
Defined inβ
@mangrovedao/mangrove.js/src/util/test/mgvIntegrationTestUtil.ts:477