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
227a3353
Commit
227a3353
authored
Nov 24, 2017
by
Matt Condon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: move mock solidity contracts to mocks/ folder
parent
58abd669
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
21 additions
and
21 deletions
+21
-21
BasicToken.test.js
test/BasicToken.test.js
+1
-1
Bounty.test.js
test/Bounty.test.js
+2
-2
BurnableToken.test.js
test/BurnableToken.test.js
+1
-1
CanReclaimToken.test.js
test/CanReclaimToken.test.js
+1
-1
CappedCrowdsale.test.js
test/CappedCrowdsale.test.js
+1
-1
DayLimit.test.js
test/DayLimit.test.js
+1
-1
DetailedERC20.test.js
test/DetailedERC20.test.js
+1
-1
FinalizableCrowdsale.test.js
test/FinalizableCrowdsale.test.js
+1
-1
HasNoEther.test.js
test/HasNoEther.test.js
+2
-2
HasNoTokens.test.js
test/HasNoTokens.test.js
+1
-1
LimitBalance.test.js
test/LimitBalance.test.js
+1
-1
Pausable.test.js
test/Pausable.test.js
+1
-1
PausableToken.test.js
test/PausableToken.test.js
+1
-1
PullPayment.test.js
test/PullPayment.test.js
+1
-1
RefundableCrowdsale.test.js
test/RefundableCrowdsale.test.js
+1
-1
SafeERC20.test.js
test/SafeERC20.test.js
+1
-1
SafeMath.test.js
test/SafeMath.test.js
+1
-1
StandardToken.test.js
test/StandardToken.test.js
+1
-1
TokenDestructible.test.js
test/TokenDestructible.test.js
+1
-1
BasicTokenMock.sol
test/mocks/BasicTokenMock.sol
+0
-0
BurnableTokenMock.sol
test/mocks/BurnableTokenMock.sol
+0
-0
CappedCrowdsaleImpl.sol
test/mocks/CappedCrowdsaleImpl.sol
+0
-0
DayLimitMock.sol
test/mocks/DayLimitMock.sol
+0
-0
DetailedERC20Mock.sol
test/mocks/DetailedERC20Mock.sol
+0
-0
ERC23TokenMock.sol
test/mocks/ERC23TokenMock.sol
+0
-0
FinalizableCrowdsaleImpl.sol
test/mocks/FinalizableCrowdsaleImpl.sol
+0
-0
ForceEther.sol
test/mocks/ForceEther.sol
+0
-0
HasNoEtherTest.sol
test/mocks/HasNoEtherTest.sol
+0
-0
InsecureTargetBounty.sol
test/mocks/InsecureTargetBounty.sol
+0
-0
LimitBalanceMock.sol
test/mocks/LimitBalanceMock.sol
+0
-0
PausableMock.sol
test/mocks/PausableMock.sol
+0
-0
PausableTokenMock.sol
test/mocks/PausableTokenMock.sol
+0
-0
PullPaymentMock.sol
test/mocks/PullPaymentMock.sol
+0
-0
ReentrancyAttack.sol
test/mocks/ReentrancyAttack.sol
+0
-0
ReentrancyMock.sol
test/mocks/ReentrancyMock.sol
+0
-0
RefundableCrowdsaleImpl.sol
test/mocks/RefundableCrowdsaleImpl.sol
+0
-0
SafeERC20Helper.sol
test/mocks/SafeERC20Helper.sol
+0
-0
SafeMathMock.sol
test/mocks/SafeMathMock.sol
+0
-0
SecureTargetBounty.sol
test/mocks/SecureTargetBounty.sol
+0
-0
StandardTokenMock.sol
test/mocks/StandardTokenMock.sol
+0
-0
No files found.
test/BasicToken.test.js
View file @
227a3353
const
assertRevert
=
require
(
'./helpers/assertRevert'
);
const
assertRevert
=
require
(
'./helpers/assertRevert'
);
var
BasicTokenMock
=
artifacts
.
require
(
'./
helper
s/BasicTokenMock.sol'
);
var
BasicTokenMock
=
artifacts
.
require
(
'./
mock
s/BasicTokenMock.sol'
);
contract
(
'BasicToken'
,
function
(
accounts
)
{
contract
(
'BasicToken'
,
function
(
accounts
)
{
it
(
'should return the correct totalSupply after construction'
,
async
function
()
{
it
(
'should return the correct totalSupply after construction'
,
async
function
()
{
...
...
test/Bounty.test.js
View file @
227a3353
...
@@ -6,8 +6,8 @@ let sendReward = function (sender, receiver, value) {
...
@@ -6,8 +6,8 @@ let sendReward = function (sender, receiver, value) {
value
:
value
,
value
:
value
,
});
});
};
};
var
SecureTargetBounty
=
artifacts
.
require
(
'
helper
s/SecureTargetBounty.sol'
);
var
SecureTargetBounty
=
artifacts
.
require
(
'
mock
s/SecureTargetBounty.sol'
);
var
InsecureTargetBounty
=
artifacts
.
require
(
'
helper
s/InsecureTargetBounty.sol'
);
var
InsecureTargetBounty
=
artifacts
.
require
(
'
mock
s/InsecureTargetBounty.sol'
);
function
awaitEvent
(
event
,
handler
)
{
function
awaitEvent
(
event
,
handler
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
test/BurnableToken.test.js
View file @
227a3353
const
EVMRevert
=
require
(
'./helpers/EVMRevert.js'
);
const
EVMRevert
=
require
(
'./helpers/EVMRevert.js'
);
const
BurnableTokenMock
=
artifacts
.
require
(
'./
helper
s/BurnableTokenMock.sol'
);
const
BurnableTokenMock
=
artifacts
.
require
(
'./
mock
s/BurnableTokenMock.sol'
);
const
BigNumber
=
web3
.
BigNumber
;
const
BigNumber
=
web3
.
BigNumber
;
require
(
'chai'
)
require
(
'chai'
)
...
...
test/CanReclaimToken.test.js
View file @
227a3353
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
expectThrow
from
'./helpers/expectThrow'
;
import
expectThrow
from
'./helpers/expectThrow'
;
import
toPromise
from
'./helpers/toPromise'
;
import
toPromise
from
'./helpers/toPromise'
;
const
CanReclaimToken
=
artifacts
.
require
(
'../contracts/ownership/CanReclaimToken.sol'
);
const
CanReclaimToken
=
artifacts
.
require
(
'../contracts/ownership/CanReclaimToken.sol'
);
const
BasicTokenMock
=
artifacts
.
require
(
'./
helper
s/BasicTokenMock.sol'
);
const
BasicTokenMock
=
artifacts
.
require
(
'./
mock
s/BasicTokenMock.sol'
);
contract
(
'CanReclaimToken'
,
function
(
accounts
)
{
contract
(
'CanReclaimToken'
,
function
(
accounts
)
{
let
token
=
null
;
let
token
=
null
;
...
...
test/CappedCrowdsale.test.js
View file @
227a3353
...
@@ -11,7 +11,7 @@ require('chai')
...
@@ -11,7 +11,7 @@ require('chai')
.
use
(
require
(
'chai-bignumber'
)(
BigNumber
))
.
use
(
require
(
'chai-bignumber'
)(
BigNumber
))
.
should
();
.
should
();
const
CappedCrowdsale
=
artifacts
.
require
(
'./
helper
s/CappedCrowdsaleImpl.sol'
);
const
CappedCrowdsale
=
artifacts
.
require
(
'./
mock
s/CappedCrowdsaleImpl.sol'
);
const
MintableToken
=
artifacts
.
require
(
'MintableToken'
);
const
MintableToken
=
artifacts
.
require
(
'MintableToken'
);
contract
(
'CappedCrowdsale'
,
function
([
_
,
wallet
])
{
contract
(
'CappedCrowdsale'
,
function
([
_
,
wallet
])
{
...
...
test/DayLimit.test.js
View file @
227a3353
...
@@ -3,7 +3,7 @@ const assertRevert = require('./helpers/assertRevert');
...
@@ -3,7 +3,7 @@ const assertRevert = require('./helpers/assertRevert');
import
latestTime
from
'./helpers/latestTime'
;
import
latestTime
from
'./helpers/latestTime'
;
import
{
increaseTimeTo
,
duration
}
from
'./helpers/increaseTime'
;
import
{
increaseTimeTo
,
duration
}
from
'./helpers/increaseTime'
;
var
DayLimitMock
=
artifacts
.
require
(
'./
helper
s/DayLimitMock.sol'
);
var
DayLimitMock
=
artifacts
.
require
(
'./
mock
s/DayLimitMock.sol'
);
contract
(
'DayLimit'
,
function
(
accounts
)
{
contract
(
'DayLimit'
,
function
(
accounts
)
{
let
dayLimit
;
let
dayLimit
;
...
...
test/DetailedERC20.test.js
View file @
227a3353
...
@@ -5,7 +5,7 @@ require('chai')
...
@@ -5,7 +5,7 @@ require('chai')
.
use
(
require
(
'chai-bignumber'
)(
BigNumber
))
.
use
(
require
(
'chai-bignumber'
)(
BigNumber
))
.
should
();
.
should
();
const
DetailedERC20Mock
=
artifacts
.
require
(
'./
helper
s/DetailedERC20Mock.sol'
);
const
DetailedERC20Mock
=
artifacts
.
require
(
'./
mock
s/DetailedERC20Mock.sol'
);
contract
(
'DetailedERC20'
,
accounts
=>
{
contract
(
'DetailedERC20'
,
accounts
=>
{
let
detailedERC20
=
null
;
let
detailedERC20
=
null
;
...
...
test/FinalizableCrowdsale.test.js
View file @
227a3353
...
@@ -10,7 +10,7 @@ const should = require('chai')
...
@@ -10,7 +10,7 @@ const should = require('chai')
.
use
(
require
(
'chai-bignumber'
)(
BigNumber
))
.
use
(
require
(
'chai-bignumber'
)(
BigNumber
))
.
should
();
.
should
();
const
FinalizableCrowdsale
=
artifacts
.
require
(
'./
helper
s/FinalizableCrowdsaleImpl.sol'
);
const
FinalizableCrowdsale
=
artifacts
.
require
(
'./
mock
s/FinalizableCrowdsaleImpl.sol'
);
const
MintableToken
=
artifacts
.
require
(
'MintableToken'
);
const
MintableToken
=
artifacts
.
require
(
'MintableToken'
);
contract
(
'FinalizableCrowdsale'
,
function
([
_
,
owner
,
wallet
,
thirdparty
])
{
contract
(
'FinalizableCrowdsale'
,
function
([
_
,
owner
,
wallet
,
thirdparty
])
{
...
...
test/HasNoEther.test.js
View file @
227a3353
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
import
expectThrow
from
'./helpers/expectThrow'
;
import
expectThrow
from
'./helpers/expectThrow'
;
import
toPromise
from
'./helpers/toPromise'
;
import
toPromise
from
'./helpers/toPromise'
;
const
HasNoEther
=
artifacts
.
require
(
'../contracts/lifecycle/HasNoEther.sol'
);
const
HasNoEther
=
artifacts
.
require
(
'../contracts/lifecycle/HasNoEther.sol'
);
const
HasNoEtherTest
=
artifacts
.
require
(
'../
helper
s/HasNoEtherTest.sol'
);
const
HasNoEtherTest
=
artifacts
.
require
(
'../
mock
s/HasNoEtherTest.sol'
);
const
ForceEther
=
artifacts
.
require
(
'../
helper
s/ForceEther.sol'
);
const
ForceEther
=
artifacts
.
require
(
'../
mock
s/ForceEther.sol'
);
contract
(
'HasNoEther'
,
function
(
accounts
)
{
contract
(
'HasNoEther'
,
function
(
accounts
)
{
const
amount
=
web3
.
toWei
(
'1'
,
'ether'
);
const
amount
=
web3
.
toWei
(
'1'
,
'ether'
);
...
...
test/HasNoTokens.test.js
View file @
227a3353
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
expectThrow
from
'./helpers/expectThrow'
;
import
expectThrow
from
'./helpers/expectThrow'
;
import
toPromise
from
'./helpers/toPromise'
;
import
toPromise
from
'./helpers/toPromise'
;
const
HasNoTokens
=
artifacts
.
require
(
'../contracts/lifecycle/HasNoTokens.sol'
);
const
HasNoTokens
=
artifacts
.
require
(
'../contracts/lifecycle/HasNoTokens.sol'
);
const
ERC23TokenMock
=
artifacts
.
require
(
'./
helper
s/ERC23TokenMock.sol'
);
const
ERC23TokenMock
=
artifacts
.
require
(
'./
mock
s/ERC23TokenMock.sol'
);
contract
(
'HasNoTokens'
,
function
(
accounts
)
{
contract
(
'HasNoTokens'
,
function
(
accounts
)
{
let
hasNoTokens
=
null
;
let
hasNoTokens
=
null
;
...
...
test/LimitBalance.test.js
View file @
227a3353
var
LimitBalanceMock
=
artifacts
.
require
(
'
helper
s/LimitBalanceMock.sol'
);
var
LimitBalanceMock
=
artifacts
.
require
(
'
mock
s/LimitBalanceMock.sol'
);
const
assertRevert
=
require
(
'./helpers/assertRevert'
);
const
assertRevert
=
require
(
'./helpers/assertRevert'
);
contract
(
'LimitBalance'
,
function
(
accounts
)
{
contract
(
'LimitBalance'
,
function
(
accounts
)
{
...
...
test/Pausable.test.js
View file @
227a3353
const
assertRevert
=
require
(
'./helpers/assertRevert'
);
const
assertRevert
=
require
(
'./helpers/assertRevert'
);
const
PausableMock
=
artifacts
.
require
(
'
helper
s/PausableMock.sol'
);
const
PausableMock
=
artifacts
.
require
(
'
mock
s/PausableMock.sol'
);
contract
(
'Pausable'
,
function
(
accounts
)
{
contract
(
'Pausable'
,
function
(
accounts
)
{
it
(
'can perform normal process in non-pause'
,
async
function
()
{
it
(
'can perform normal process in non-pause'
,
async
function
()
{
...
...
test/PausableToken.test.js
View file @
227a3353
'user strict'
;
'user strict'
;
const
assertRevert
=
require
(
'./helpers/assertRevert'
);
const
assertRevert
=
require
(
'./helpers/assertRevert'
);
var
PausableTokenMock
=
artifacts
.
require
(
'./
helper
s/PausableTokenMock.sol'
);
var
PausableTokenMock
=
artifacts
.
require
(
'./
mock
s/PausableTokenMock.sol'
);
contract
(
'PausableToken'
,
function
(
accounts
)
{
contract
(
'PausableToken'
,
function
(
accounts
)
{
let
token
;
let
token
;
...
...
test/PullPayment.test.js
View file @
227a3353
var
PullPaymentMock
=
artifacts
.
require
(
'./
helper
s/PullPaymentMock.sol'
);
var
PullPaymentMock
=
artifacts
.
require
(
'./
mock
s/PullPaymentMock.sol'
);
contract
(
'PullPayment'
,
function
(
accounts
)
{
contract
(
'PullPayment'
,
function
(
accounts
)
{
let
ppce
;
let
ppce
;
...
...
test/RefundableCrowdsale.test.js
View file @
227a3353
...
@@ -11,7 +11,7 @@ require('chai')
...
@@ -11,7 +11,7 @@ require('chai')
.
use
(
require
(
'chai-bignumber'
)(
BigNumber
))
.
use
(
require
(
'chai-bignumber'
)(
BigNumber
))
.
should
();
.
should
();
const
RefundableCrowdsale
=
artifacts
.
require
(
'./
helper
s/RefundableCrowdsaleImpl.sol'
);
const
RefundableCrowdsale
=
artifacts
.
require
(
'./
mock
s/RefundableCrowdsaleImpl.sol'
);
contract
(
'RefundableCrowdsale'
,
function
([
_
,
owner
,
wallet
,
investor
])
{
contract
(
'RefundableCrowdsale'
,
function
([
_
,
owner
,
wallet
,
investor
])
{
const
rate
=
new
BigNumber
(
1000
);
const
rate
=
new
BigNumber
(
1000
);
...
...
test/SafeERC20.test.js
View file @
227a3353
...
@@ -4,7 +4,7 @@ require('chai')
...
@@ -4,7 +4,7 @@ require('chai')
.
use
(
require
(
'chai-as-promised'
))
.
use
(
require
(
'chai-as-promised'
))
.
should
();
.
should
();
const
SafeERC20Helper
=
artifacts
.
require
(
'./
helper
s/SafeERC20Helper.sol'
);
const
SafeERC20Helper
=
artifacts
.
require
(
'./
mock
s/SafeERC20Helper.sol'
);
contract
(
'SafeERC20'
,
function
()
{
contract
(
'SafeERC20'
,
function
()
{
beforeEach
(
async
function
()
{
beforeEach
(
async
function
()
{
...
...
test/SafeMath.test.js
View file @
227a3353
const
assertRevert
=
require
(
'./helpers/assertRevert'
);
const
assertRevert
=
require
(
'./helpers/assertRevert'
);
const
assertJump
=
require
(
'./helpers/assertJump'
);
const
assertJump
=
require
(
'./helpers/assertJump'
);
var
SafeMathMock
=
artifacts
.
require
(
'./
helper
s/SafeMathMock.sol'
);
var
SafeMathMock
=
artifacts
.
require
(
'./
mock
s/SafeMathMock.sol'
);
contract
(
'SafeMath'
,
function
(
accounts
)
{
contract
(
'SafeMath'
,
function
(
accounts
)
{
let
safeMath
;
let
safeMath
;
...
...
test/StandardToken.test.js
View file @
227a3353
const
assertRevert
=
require
(
'./helpers/assertRevert'
);
const
assertRevert
=
require
(
'./helpers/assertRevert'
);
const
expectThrow
=
require
(
'./helpers/expectThrow'
);
const
expectThrow
=
require
(
'./helpers/expectThrow'
);
var
StandardTokenMock
=
artifacts
.
require
(
'./
helper
s/StandardTokenMock.sol'
);
var
StandardTokenMock
=
artifacts
.
require
(
'./
mock
s/StandardTokenMock.sol'
);
contract
(
'StandardToken'
,
function
(
accounts
)
{
contract
(
'StandardToken'
,
function
(
accounts
)
{
let
token
;
let
token
;
...
...
test/TokenDestructible.test.js
View file @
227a3353
var
TokenDestructible
=
artifacts
.
require
(
'../contracts/lifecycle/TokenDestructible.sol'
);
var
TokenDestructible
=
artifacts
.
require
(
'../contracts/lifecycle/TokenDestructible.sol'
);
var
StandardTokenMock
=
artifacts
.
require
(
'./
helper
s/StandardTokenMock.sol'
);
var
StandardTokenMock
=
artifacts
.
require
(
'./
mock
s/StandardTokenMock.sol'
);
require
(
'./helpers/transactionMined.js'
);
require
(
'./helpers/transactionMined.js'
);
contract
(
'TokenDestructible'
,
function
(
accounts
)
{
contract
(
'TokenDestructible'
,
function
(
accounts
)
{
...
...
test/
helper
s/BasicTokenMock.sol
→
test/
mock
s/BasicTokenMock.sol
View file @
227a3353
File moved
test/
helper
s/BurnableTokenMock.sol
→
test/
mock
s/BurnableTokenMock.sol
View file @
227a3353
File moved
test/
helper
s/CappedCrowdsaleImpl.sol
→
test/
mock
s/CappedCrowdsaleImpl.sol
View file @
227a3353
File moved
test/
helper
s/DayLimitMock.sol
→
test/
mock
s/DayLimitMock.sol
View file @
227a3353
File moved
test/
helper
s/DetailedERC20Mock.sol
→
test/
mock
s/DetailedERC20Mock.sol
View file @
227a3353
File moved
test/
helper
s/ERC23TokenMock.sol
→
test/
mock
s/ERC23TokenMock.sol
View file @
227a3353
File moved
test/
helper
s/FinalizableCrowdsaleImpl.sol
→
test/
mock
s/FinalizableCrowdsaleImpl.sol
View file @
227a3353
File moved
test/
helper
s/ForceEther.sol
→
test/
mock
s/ForceEther.sol
View file @
227a3353
File moved
test/
helper
s/HasNoEtherTest.sol
→
test/
mock
s/HasNoEtherTest.sol
View file @
227a3353
File moved
test/
helper
s/InsecureTargetBounty.sol
→
test/
mock
s/InsecureTargetBounty.sol
View file @
227a3353
File moved
test/
helper
s/LimitBalanceMock.sol
→
test/
mock
s/LimitBalanceMock.sol
View file @
227a3353
File moved
test/
helper
s/PausableMock.sol
→
test/
mock
s/PausableMock.sol
View file @
227a3353
File moved
test/
helper
s/PausableTokenMock.sol
→
test/
mock
s/PausableTokenMock.sol
View file @
227a3353
File moved
test/
helper
s/PullPaymentMock.sol
→
test/
mock
s/PullPaymentMock.sol
View file @
227a3353
File moved
test/
helper
s/ReentrancyAttack.sol
→
test/
mock
s/ReentrancyAttack.sol
View file @
227a3353
File moved
test/
helper
s/ReentrancyMock.sol
→
test/
mock
s/ReentrancyMock.sol
View file @
227a3353
File moved
test/
helper
s/RefundableCrowdsaleImpl.sol
→
test/
mock
s/RefundableCrowdsaleImpl.sol
View file @
227a3353
File moved
test/
helper
s/SafeERC20Helper.sol
→
test/
mock
s/SafeERC20Helper.sol
View file @
227a3353
File moved
test/
helper
s/SafeMathMock.sol
→
test/
mock
s/SafeMathMock.sol
View file @
227a3353
File moved
test/
helper
s/SecureTargetBounty.sol
→
test/
mock
s/SecureTargetBounty.sol
View file @
227a3353
File moved
test/
helper
s/StandardTokenMock.sol
→
test/
mock
s/StandardTokenMock.sol
View file @
227a3353
File moved
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