From 353abffba9afd73d70fce47fee2f2d6067c6c8ae Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 28 Nov 2017 12:23:41 -0600 Subject: Improve the comment --- packages/0x.js/src/contract.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages/0x.js/src') diff --git a/packages/0x.js/src/contract.ts b/packages/0x.js/src/contract.ts index 872f18b2a..a4ee03910 100644 --- a/packages/0x.js/src/contract.ts +++ b/packages/0x.js/src/contract.ts @@ -5,7 +5,9 @@ import * as Web3 from 'web3'; import {AbiType} from './types'; -const GAS_MARGIN = 300000; +// HACK: Gas estimates on testrpc don't take into account gas refunds. +// Our calls can trigger max 8 gas refunds for SSTORE per transaction for 15k gas each which gives 120k. +const GAS_MARGIN = 120000; export class Contract implements Web3.ContractInstance { public address: string; -- cgit