Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
1e78adc2
Commit
1e78adc2
authored
Nov 06, 2020
by
Francisco Giordano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor buidler config
parent
fcdf8f46
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
buidler.config.js
buidler.config.js
+6
-9
env-contract.js
buidler/env-contract.js
+10
-0
No files found.
buidler.config.js
View file @
1e78adc2
const
fs
=
require
(
'fs'
);
const
path
=
require
(
'path'
);
usePlugin
(
'solidity-coverage'
);
usePlugin
(
'solidity-coverage'
);
usePlugin
(
'@nomiclabs/buidler-truffle5'
);
usePlugin
(
'@nomiclabs/buidler-truffle5'
);
extendEnvironment
(
env
=>
{
for
(
const
f
of
fs
.
readdirSync
(
path
.
join
(
__dirname
,
'buidler'
)))
{
const
{
contract
}
=
env
;
require
(
path
.
join
(
__dirname
,
'buidler'
,
f
));
env
.
contract
=
function
(
name
,
body
)
{
}
// remove the default account from the accounts list used in tests, in order
// to protect tests against accidentally passing due to the contract
// deployer being used subsequently as function caller
contract
(
name
,
accounts
=>
body
(
accounts
.
slice
(
1
)));
};
});
module
.
exports
=
{
module
.
exports
=
{
networks
:
{
networks
:
{
...
...
buidler/env-contract.js
0 → 100644
View file @
1e78adc2
extendEnvironment
(
env
=>
{
const
{
contract
}
=
env
;
env
.
contract
=
function
(
name
,
body
)
{
// remove the default account from the accounts list used in tests, in order
// to protect tests against accidentally passing due to the contract
// deployer being used subsequently as function caller
contract
(
name
,
accounts
=>
body
(
accounts
.
slice
(
1
)));
};
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment