File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,11 @@ export default class Proxy {
53
53
* Create a new DSProxy for the given user.
54
54
* Later can query proxies by getUserProxy in this class.
55
55
* @param {address } user User of the system - a CFD party
56
+ * @param {Number } gasLimit How much gas we are willing to spent
57
+ * @param {Number } gasPrice Price of the gas
58
+ (if undefined, will use the default value from config file)
56
59
*/
57
- async proxyNew ( user ) {
60
+ async proxyNew ( user , gasLimit = 1000000 , gasPrice = undefined ) {
58
61
// Function to wait
59
62
const timeout = async ms => {
60
63
return new Promise ( resolve => setTimeout ( resolve , ms ) )
@@ -63,7 +66,8 @@ export default class Proxy {
63
66
// Tx1: create proxy contract
64
67
const buildTx = await this . dsProxyFactory . methods . build ( user ) . send ( {
65
68
from : user ,
66
- gas : 1000000
69
+ gas : gasLimit ,
70
+ gasPrice : gasPrice || this . config . gasPrice ,
67
71
} )
68
72
logGas ( `Proxy build` , buildTx )
69
73
You can’t perform that action at this time.
0 commit comments