-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Save Wed Jun 14 11:10:20 AM -03 2023
- Loading branch information
Hugo Arregui
committed
Jun 14, 2023
1 parent
be3ea81
commit 232711a
Showing
5 changed files
with
44 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,39 @@ | ||
import ganache from 'ganache' | ||
|
||
export class NodeConnectionFactory { | ||
connectionOptions = { | ||
accounts: [ | ||
{ | ||
balance: '0xFFFFFFFFFFFFFFFFFFFFFFFF', | ||
secretKey: '0x8485898485bbe08a0a9b97fdf695aec8e9f1d196c589d4b6ff50a0232518b682' | ||
} | ||
], | ||
network_id: 3, | ||
logger: { | ||
log(..._args) {} | ||
}, | ||
default_balance_ether: 999999, | ||
vmErrorsOnRPCResponse: true, | ||
ws: true | ||
} | ||
|
||
createProvider() { | ||
return ganache.provider(this.connectionOptions) | ||
return ganache.provider<'ethereum'>({ | ||
chain: { | ||
networkId: 3, | ||
vmErrorsOnRPCResponse: true | ||
}, | ||
wallet: { | ||
accounts: [ | ||
{ | ||
balance: '0xFFFFFFFFFFFFFFFFFFFFFFFF', | ||
secretKey: '0x8485898485bbe08a0a9b97fdf695aec8e9f1d196c589d4b6ff50a0232518b682' | ||
} | ||
], | ||
defaultBalance: 999999 | ||
} | ||
}) | ||
} | ||
|
||
createServer() { | ||
return ganache.server(this.connectionOptions) | ||
return ganache.server<'ethereum'>({ | ||
chain: { | ||
networkId: 3, | ||
vmErrorsOnRPCResponse: true | ||
}, | ||
wallet: { | ||
accounts: [ | ||
{ | ||
balance: '0xFFFFFFFFFFFFFFFFFFFFFFFF', | ||
secretKey: '0x8485898485bbe08a0a9b97fdf695aec8e9f1d196c589d4b6ff50a0232518b682' | ||
} | ||
], | ||
defaultBalance: 999999 | ||
} | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters