devdoc & type

pull/5370/head
aniket-engg 5 years ago committed by Aniket
parent 48d349a8b1
commit 7b3f08187e
  1. 13
      remix-tests/src/deployer.ts
  2. 4
      remix-tests/tests/testRunner.ts

@ -1,8 +1,17 @@
import async from 'async'
var remixLib = require('remix-lib')
const remixLib = require('remix-lib')
import Web3 from 'web3';
import { compilationInterface } from 'types';
export function deployAll(compileResult: object, web3: Web3, isAgain: boolean, callback) {
/**
* @dev Deploy all contracts from compilation result
* @param compileResult compilation result
* @param web3 web3 object
* @param isAgain If true, try deployment with gas double of estimation (used for Out-of-gas error only)
* @param callback Callback
*/
export function deployAll(compileResult: compilationInterface, web3: Web3, isAgain: boolean, callback) {
let compiledObject = {}
let contracts = {}
let accounts: string[] = []

@ -6,7 +6,7 @@ import { Provider } from 'remix-simulator'
import { compileFileOrFiles } from '../dist/compiler'
import { deployAll } from '../dist/deployer'
import { runTest } from '../dist/index'
import { runTest, compilationInterface } from '../dist/index'
import { ResultsInterface, TestCbInterface, ResultCbInterface } from '../dist/index'
// deepEqualExcluding allows us to exclude specific keys whose values vary.
@ -60,7 +60,7 @@ async function compileAndDeploy(filename: string, callback: Function) {
function compile(next: Function): void {
compileFileOrFiles(filename, false, { accounts }, next)
},
function deployAllContracts(compilationResult: object, asts, next: Function): void {
function deployAllContracts(compilationResult: compilationInterface, asts, next: Function): void {
for(const filename in asts) {
if(filename.endsWith('_test.sol'))
sourceASTs[filename] = asts[filename].ast

Loading…
Cancel
Save