diff --git a/src/DualClassWrapper.ts b/src/DualClassWrapper.ts index 94f3c2f..300ebef 100644 --- a/src/DualClassWrapper.ts +++ b/src/DualClassWrapper.ts @@ -162,7 +162,7 @@ export class DualClassWrapper extends BaseContractWrapper { if (this.web3Wrapper.isReadOnly()) return this.web3Wrapper.readOnlyReject(); return this.contract.methods .setValue(index, newValue) - .send(await this.web3Wrapper.getTransactionOption(account, CST.SET_VALUE_GAS, option)); + .send(await this.web3Wrapper.getTransactionOption(account, CST.DUAL_CLASS_SET_VALUE_GAS, option)); } public static convertCustodianState(rawState: string) { diff --git a/src/MagiWrapper.ts b/src/MagiWrapper.ts index edc6afc..da39669 100644 --- a/src/MagiWrapper.ts +++ b/src/MagiWrapper.ts @@ -111,7 +111,7 @@ export class MagiWrapper extends BaseContractWrapper { if (this.web3Wrapper.isReadOnly()) return this.web3Wrapper.readOnlyReject(); return this.contract.methods .setValue(index, newValue) - .send(await this.web3Wrapper.getTransactionOption(account, CST.SET_VALUE_GAS, option)); + .send(await this.web3Wrapper.getTransactionOption(account, CST.MAGI_SET_VALUE_GAS, option)); } public async updateRoleManager( diff --git a/src/__snapshots__/DualClassWrapper.test.ts.snap b/src/__snapshots__/DualClassWrapper.test.ts.snap index a2a2bef..fdd10c2 100644 --- a/src/__snapshots__/DualClassWrapper.test.ts.snap +++ b/src/__snapshots__/DualClassWrapper.test.ts.snap @@ -562,7 +562,7 @@ Array [ Array [ Object { "from": "account", - "gas": 100000, + "gas": 50000, "gasPrice": 1000000000, "nonce": 10, }, @@ -582,12 +582,12 @@ exports[`setValue 4`] = ` Array [ Array [ "account", - 100000, + 50000, Object {}, ], Array [ "account", - 100000, + 50000, Object { "gasLimit": 20000, "gasPrice": 2000000000, diff --git a/src/constants.ts b/src/constants.ts index 027b80e..02af6d4 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -81,7 +81,8 @@ export const PROVIDER_MYETHER_MAIN = 'https://api.myetherapi.com/eth'; export const PROVIDER_INFURA_MAIN = 'https://mainnet.infura.io'; export const PROVIDER_INFURA_KOVAN = 'https://kovan.infura.io'; export const TRANSFER_TOKEN_GAS = 120000; -export const SET_VALUE_GAS = 100000; +export const MAGI_SET_VALUE_GAS = 100000; +export const DUAL_CLASS_SET_VALUE_GAS = 50000; export const COLLECT_FEE_GAS = 40000; export const ADD_ADDR_GAS = 40000; export const REMOVE_ADDR_GAS = 40000;