Skip to content
This repository was archived by the owner on Mar 18, 2019. It is now read-only.

Commit 93c09bc

Browse files
committed
add getContracts
1 parent 0b4c035 commit 93c09bc

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "loopring.js",
3-
"version": "2.0.3",
3+
"version": "2.0.4",
44
"description": "Loopring javascript library",
55
"scripts": {
66
"lint": "eslint . --fix",

src/relay/rpc/order.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ export default class Order
6161
{
6262
return getTempStore(this.host, filter);
6363
}
64+
65+
getContracts ()
66+
{
67+
return getContracts(this.host);
68+
}
6469
}
6570

6671
/**
@@ -368,3 +373,15 @@ export function getOrderByHash (host, filter)
368373
body
369374
});
370375
}
376+
export function getContracts (host)
377+
{
378+
const body = {};
379+
body.method = 'loopring_getContracts';
380+
body.params = [{}];
381+
body.id = id();
382+
body.jsonrpc = '2.0';
383+
return request(host, {
384+
method: 'post',
385+
body
386+
});
387+
}

0 commit comments

Comments
 (0)