aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dev-utils/src/web3_factory.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/dev-utils/src/web3_factory.ts')
-rw-r--r--packages/dev-utils/src/web3_factory.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/dev-utils/src/web3_factory.ts b/packages/dev-utils/src/web3_factory.ts
index b22bcc88b..5f8981a46 100644
--- a/packages/dev-utils/src/web3_factory.ts
+++ b/packages/dev-utils/src/web3_factory.ts
@@ -17,6 +17,7 @@ export interface Web3Config {
shouldThrowErrorsOnGanacheRPCResponse?: boolean; // default: true
rpcUrl?: string; // default: localhost:8545
shouldUseFakeGasEstimate?: boolean; // default: true
+ ganacheDatabasePath?: string; // default: undefined, creates a tmp dir
}
export const web3Factory = {
@@ -45,9 +46,14 @@ export const web3Factory = {
const shouldThrowErrorsOnGanacheRPCResponse =
_.isUndefined(config.shouldThrowErrorsOnGanacheRPCResponse) ||
config.shouldThrowErrorsOnGanacheRPCResponse;
+ if (!_.isUndefined(config.ganacheDatabasePath)) {
+ // Saving the snapshot to a local db. Ganache requires this directory to exist
+ fs.mkdirSync(config.ganacheDatabasePath);
+ }
provider.addProvider(
new GanacheSubprovider({
vmErrorsOnRPCResponse: shouldThrowErrorsOnGanacheRPCResponse,
+ db_path: config.ganacheDatabasePath,
gasLimit: constants.GAS_LIMIT,
logger,
verbose: env.parseBoolean(EnvVars.VerboseGanache),
column1'>| | | | | | | | | | | | | While there, cleanup, and sort depends. When build and run dependencies are the same, there are three ways to avoid duplicating the list while not adding the framework added BUILD_DEPENDS to the RUN_DEPENDS. In order of preference, they are: 1) use RUN_DEPENDS to set BUILD_DEPENDS: BUILD_DEPENDS= ${RUN_DEPENDS} RUN_DEPENDS= foo:bar/baz 2) create another variable and use it: MY_DEPENDS= foo:bar/baz BUILD_DEPENDS= ${MY_DEPENDS} RUN_DEPENDS= ${MY_DEPENDS} 3) use BUILD_DEPENDS to set RUN_DEPENDS and force evaluation: BUILD_DEPENDS= foo:bar/baz RUN_DEPENDS:= ${BUILD_DEPENDS} Sponsored by: Absolight * Update WWWsunpoet2018-05-281-1/+1 | | | | | | | search.cpan.org is shutting down. It will redirect to metacpan.org after June 25, 2018. With hat: perl * Remove ${PORTSDIR}/ from dependencies, categories v, w, x, y, and z.mat2016-04-011-1/+1 | | | | | With hat: portmgr Sponsored by: Absolight * Change the way Perl modules are installed, update the default Perl to 5.18.mat2014-11-262-4/+1 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, we had: site_perl : lib/perl5/site_perl/5.18 site_perl/perl_arch : lib/perl5/site_perl/5.18/mach perl_man3 : lib/perl5/5.18/man/man3 Now we have: site_perl : lib/perl5/site_perl site_arch : lib/perl5/site_perl/mach/5.18 perl_man3 : lib/perl5/site_perl/man/man3 Modules without any .so will be installed at the same place regardless of the Perl version, minimizing the upgrade when the major Perl version is changed. It uses a version dependent directory for modules with compiled bits. As PERL_ARCH is no longer needed in plists, it has been removed from PLIST_SUB. The USE_PERL5=fixpacklist keyword is removed, the .packlist file is now always removed, as is perllocal.pod. The old site_perl and site_perl/arch directories have been kept in the default Perl @INC for all Perl ports, and will be phased out as these old Perl versions expire. PR: 194969 Differential Revision: https://reviews.freebsd.org/D1019 Exp-run by: antoine Reviewed by: perl@ Approved by: portmgr * - stage supportaz2014-01-052-3/+1 | | | | Approved by: portmgr (blanket infrastructure) * Add NO_STAGE all over the place in preparation for the staging support (cat: ↵bapt2013-09-211-5/+1 | | | | www) * - convert to the new perl5 frameworkaz2013-09-021-1/+2 | | | | Approved by: portmgr (bapt@, blanket) * - Convert all remaining instances of BUILD_DEPENDS=${RUN_DEPENDS} orswills2012-06-111-1/+1 | | | | | | | | RUN_DEPENDS=${BUILD_DEPENDS} to use := which portlint has warned about for a while. PR: ports/168208 Approved by: portmgr (miwi) * - Get Rid MD5 supportmiwi2011-03-191-1/+0 | * - Upgrade to 0.04.kuriyama2010-10-102-4/+4 |