aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils/rpc.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-11-11 05:34:21 +0800
committerFabio Berger <me@fabioberger.com>2017-11-11 05:34:21 +0800
commit2bf65fda1f6b3018edbb4158574465326d4918be (patch)
tree5d0ab098003463d6df35fef4bef8b113d0939908 /test/utils/rpc.ts
parentd90756e8ef2634737d41633f5427446b47223e98 (diff)
downloaddexon-sol-tools-2bf65fda1f6b3018edbb4158574465326d4918be.tar
dexon-sol-tools-2bf65fda1f6b3018edbb4158574465326d4918be.tar.gz
dexon-sol-tools-2bf65fda1f6b3018edbb4158574465326d4918be.tar.bz2
dexon-sol-tools-2bf65fda1f6b3018edbb4158574465326d4918be.tar.lz
dexon-sol-tools-2bf65fda1f6b3018edbb4158574465326d4918be.tar.xz
dexon-sol-tools-2bf65fda1f6b3018edbb4158574465326d4918be.tar.zst
dexon-sol-tools-2bf65fda1f6b3018edbb4158574465326d4918be.zip
Add tests for the numConfirmations config to ensure that the events are being emitted for the confirmation depth specified
Diffstat (limited to 'test/utils/rpc.ts')
-rw-r--r--test/utils/rpc.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/utils/rpc.ts b/test/utils/rpc.ts
index f28a85340..1fc9f2428 100644
--- a/test/utils/rpc.ts
+++ b/test/utils/rpc.ts
@@ -26,6 +26,13 @@ export class RPC {
const didRevert = await this.sendAsync(payload);
return didRevert;
}
+ public async mineBlockAsync(): Promise<void> {
+ const method = 'evm_mine';
+ const params: any[] = [];
+ const payload = this.toPayload(method, params);
+ const didRevert = await this.sendAsync(payload);
+ return didRevert;
+ }
private toPayload(method: string, params: any[] = []): string {
const payload = JSON.stringify({
id: this.id,