Commit dea29b06 authored by yann300's avatar yann300

set allowUnlimitedContractSize to true & raise the gaslimit

parent 0daf7f19
...@@ -113,7 +113,7 @@ export class Transactions { ...@@ -113,7 +113,7 @@ export class Transactions {
} }
eth_estimateGas (payload, cb) { eth_estimateGas (payload, cb) {
cb(null, 3000000) cb(null, 9000000000000000)
} }
eth_getCode (payload, cb) { eth_getCode (payload, cb) {
......
...@@ -122,7 +122,8 @@ export class VMContext { ...@@ -122,7 +122,8 @@ export class VMContext {
const vm = new VM({ const vm = new VM({
common, common,
activatePrecompiles: true, activatePrecompiles: true,
stateManager: stateManager stateManager: stateManager,
allowUnlimitedContractSize: true
}) })
const web3vm = new remixLibVm.Web3VMProvider() const web3vm = new remixLibVm.Web3VMProvider()
......
...@@ -238,7 +238,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com ...@@ -238,7 +238,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
sender = opts.accounts[sender] sender = opts.accounts[sender]
} }
} }
let sendParams: Record<string, string> | null = null let sendParams: Record<string, any> | null = null
if (sender) sendParams = { from: sender } if (sender) sendParams = { from: sender }
if (func.inputs && func.inputs.length > 0) { return resultsCallback(new Error(`Method '${func.name}' can not have parameters inside a test contract`), { passingNum, failureNum, timePassed }) } if (func.inputs && func.inputs.length > 0) { return resultsCallback(new Error(`Method '${func.name}' can not have parameters inside a test contract`), { passingNum, failureNum, timePassed }) }
const method = testObject.methods[func.name].apply(testObject.methods[func.name], []) const method = testObject.methods[func.name].apply(testObject.methods[func.name], [])
...@@ -280,6 +280,8 @@ export function runTest (testName: string, testObject: any, contractDetails: Com ...@@ -280,6 +280,8 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
else sendParams = { value } else sendParams = { value }
} }
} }
if (!sendParams) sendParams = {}
sendParams.gas = 9000000000000000
method.send(sendParams).on('receipt', (receipt) => { method.send(sendParams).on('receipt', (receipt) => {
try { try {
const time: number = (Date.now() - startTime) / 1000.0 const time: number = (Date.now() - startTime) / 1000.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment