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
f4228f1b
Commit
f4228f1b
authored
Jan 25, 2018
by
Matt Condon
Committed by
Francisco Giordano
Jan 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: reference contract name rather than filepath (#698)
parent
a5d58670
Show whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
48 additions
and
50 deletions
+48
-50
1_initial_migration.js
migrations/1_initial_migration.js
+1
-1
2_deploy_contracts.js
migrations/2_deploy_contracts.js
+1
-1
Bounty.test.js
test/Bounty.test.js
+2
-2
DayLimit.test.js
test/DayLimit.test.js
+1
-1
Heritable.test.js
test/Heritable.test.js
+1
-1
LimitBalance.test.js
test/LimitBalance.test.js
+1
-1
ReentrancyGuard.test.js
test/ReentrancyGuard.test.js
+2
-2
SimpleSavingsWallet.test.js
test/SimpleSavingsWallet.test.js
+1
-1
CappedCrowdsale.test.js
test/crowdsale/CappedCrowdsale.test.js
+1
-1
FinalizableCrowdsale.test.js
test/crowdsale/FinalizableCrowdsale.test.js
+1
-1
RefundableCrowdsale.test.js
test/crowdsale/RefundableCrowdsale.test.js
+1
-1
SimpleToken.test.js
test/examples/SimpleToken.test.js
+1
-1
ECRecovery.test.js
test/library/ECRecovery.test.js
+2
-2
Math.test.js
test/library/Math.test.js
+1
-1
MerkleProof.test.js
test/library/MerkleProof.test.js
+1
-1
Destructible.test.js
test/lifecycle/Destructible.test.js
+1
-1
Pausable.test.js
test/lifecycle/Pausable.test.js
+1
-1
TokenDestructible.test.js
test/lifecycle/TokenDestructible.test.js
+2
-2
SafeMath.test.js
test/math/SafeMath.test.js
+1
-1
CanReclaimToken.test.js
test/ownership/CanReclaimToken.test.js
+2
-2
Claimable.test.js
test/ownership/Claimable.test.js
+1
-1
Contactable.test.js
test/ownership/Contactable.test.js
+1
-1
DelayedClaimable.test.js
test/ownership/DelayedClaimable.test.js
+1
-1
HasNoContracts.test.js
test/ownership/HasNoContracts.test.js
+2
-4
HasNoEther.test.js
test/ownership/HasNoEther.test.js
+2
-2
HasNoTokens.test.js
test/ownership/HasNoTokens.test.js
+2
-2
Ownable.test.js
test/ownership/Ownable.test.js
+1
-1
RBAC.test.js
test/ownership/rbac/RBAC.test.js
+1
-1
PullPayment.test.js
test/payment/PullPayment.test.js
+1
-1
SplitPayment.test.js
test/payment/SplitPayment.test.js
+1
-1
BasicToken.test.js
test/token/BasicToken.test.js
+1
-1
BurnableToken.test.js
test/token/BurnableToken.test.js
+1
-1
CappedToken.test.js
test/token/CappedToken.test.js
+1
-1
DetailedERC20.test.js
test/token/ERC20/DetailedERC20.test.js
+1
-1
SafeERC20.test.js
test/token/ERC20/SafeERC20.test.js
+1
-1
ERC827Token.js
test/token/ERC827/ERC827Token.js
+2
-2
MintableToken.test.js
test/token/MintableToken.test.js
+1
-1
PausableToken.test.js
test/token/PausableToken.test.js
+1
-1
StandardToken.test.js
test/token/StandardToken.test.js
+1
-1
No files found.
migrations/1_initial_migration.js
View file @
f4228f1b
var
Migrations
=
artifacts
.
require
(
'
./Migrations.sol
'
);
var
Migrations
=
artifacts
.
require
(
'
Migrations
'
);
module
.
exports
=
function
(
deployer
)
{
module
.
exports
=
function
(
deployer
)
{
deployer
.
deploy
(
Migrations
);
deployer
.
deploy
(
Migrations
);
...
...
migrations/2_deploy_contracts.js
View file @
f4228f1b
// var Ownable = artifacts.require("
ownership/Ownable.sol
");
// var Ownable = artifacts.require("
Ownable
");
// NOTE: Use this file to easily deploy the contracts you're writing.
// NOTE: Use this file to easily deploy the contracts you're writing.
// (but make sure to reset this file before committing
// (but make sure to reset this file before committing
...
...
test/Bounty.test.js
View file @
f4228f1b
...
@@ -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
(
'
mocks/SecureTargetBounty.sol
'
);
var
SecureTargetBounty
=
artifacts
.
require
(
'
SecureTargetBounty
'
);
var
InsecureTargetBounty
=
artifacts
.
require
(
'
mocks/InsecureTargetBounty.sol
'
);
var
InsecureTargetBounty
=
artifacts
.
require
(
'
InsecureTargetBounty
'
);
function
awaitEvent
(
event
,
handler
)
{
function
awaitEvent
(
event
,
handler
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
test/DayLimit.test.js
View file @
f4228f1b
...
@@ -4,7 +4,7 @@ import { increaseTimeTo, duration } from './helpers/increaseTime';
...
@@ -4,7 +4,7 @@ import { increaseTimeTo, duration } from './helpers/increaseTime';
import
assertRevert
from
'./helpers/assertRevert'
;
import
assertRevert
from
'./helpers/assertRevert'
;
const
DayLimitMock
=
artifacts
.
require
(
'
mocks/DayLimitMock.sol
'
);
const
DayLimitMock
=
artifacts
.
require
(
'
DayLimitMock
'
);
contract
(
'DayLimit'
,
function
(
accounts
)
{
contract
(
'DayLimit'
,
function
(
accounts
)
{
let
dayLimit
;
let
dayLimit
;
...
...
test/Heritable.test.js
View file @
f4228f1b
...
@@ -3,7 +3,7 @@ import expectThrow from './helpers/expectThrow';
...
@@ -3,7 +3,7 @@ import expectThrow from './helpers/expectThrow';
const
NULL_ADDRESS
=
'0x0000000000000000000000000000000000000000'
;
const
NULL_ADDRESS
=
'0x0000000000000000000000000000000000000000'
;
const
Heritable
=
artifacts
.
require
(
'
../contracts/ownership/Heritable.sol
'
);
const
Heritable
=
artifacts
.
require
(
'
Heritable
'
);
contract
(
'Heritable'
,
function
(
accounts
)
{
contract
(
'Heritable'
,
function
(
accounts
)
{
let
heritable
;
let
heritable
;
...
...
test/LimitBalance.test.js
View file @
f4228f1b
import
assertRevert
from
'./helpers/assertRevert'
;
import
assertRevert
from
'./helpers/assertRevert'
;
var
LimitBalanceMock
=
artifacts
.
require
(
'
mocks/LimitBalanceMock.sol
'
);
var
LimitBalanceMock
=
artifacts
.
require
(
'
LimitBalanceMock
'
);
contract
(
'LimitBalance'
,
function
(
accounts
)
{
contract
(
'LimitBalance'
,
function
(
accounts
)
{
let
lb
;
let
lb
;
...
...
test/ReentrancyGuard.test.js
View file @
f4228f1b
import
expectThrow
from
'./helpers/expectThrow'
;
import
expectThrow
from
'./helpers/expectThrow'
;
const
ReentrancyMock
=
artifacts
.
require
(
'
./mocks/ReentrancyMock.sol
'
);
const
ReentrancyMock
=
artifacts
.
require
(
'
ReentrancyMock
'
);
const
ReentrancyAttack
=
artifacts
.
require
(
'
./mocks/ReentrancyAttack.sol
'
);
const
ReentrancyAttack
=
artifacts
.
require
(
'
ReentrancyAttack
'
);
contract
(
'ReentrancyGuard'
,
function
(
accounts
)
{
contract
(
'ReentrancyGuard'
,
function
(
accounts
)
{
let
reentrancyMock
;
let
reentrancyMock
;
...
...
test/SimpleSavingsWallet.test.js
View file @
f4228f1b
import
expectThrow
from
'./helpers/expectThrow'
;
import
expectThrow
from
'./helpers/expectThrow'
;
const
SimpleSavingsWallet
=
artifacts
.
require
(
'
../contracts/examples/SimpleSavingsWallet.sol
'
);
const
SimpleSavingsWallet
=
artifacts
.
require
(
'
SimpleSavingsWallet
'
);
contract
(
'SimpleSavingsWallet'
,
function
(
accounts
)
{
contract
(
'SimpleSavingsWallet'
,
function
(
accounts
)
{
let
savingsWallet
;
let
savingsWallet
;
...
...
test/crowdsale/CappedCrowdsale.test.js
View file @
f4228f1b
...
@@ -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
(
'
mocks/CappedCrowdsaleImpl.so
l'
);
const
CappedCrowdsale
=
artifacts
.
require
(
'
CappedCrowdsaleImp
l'
);
const
MintableToken
=
artifacts
.
require
(
'MintableToken'
);
const
MintableToken
=
artifacts
.
require
(
'MintableToken'
);
contract
(
'CappedCrowdsale'
,
function
([
_
,
wallet
])
{
contract
(
'CappedCrowdsale'
,
function
([
_
,
wallet
])
{
...
...
test/crowdsale/FinalizableCrowdsale.test.js
View file @
f4228f1b
...
@@ -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
(
'
mocks/FinalizableCrowdsaleImpl.so
l'
);
const
FinalizableCrowdsale
=
artifacts
.
require
(
'
FinalizableCrowdsaleImp
l'
);
const
MintableToken
=
artifacts
.
require
(
'MintableToken'
);
const
MintableToken
=
artifacts
.
require
(
'MintableToken'
);
contract
(
'FinalizableCrowdsale'
,
function
([
_
,
owner
,
wallet
,
thirdparty
])
{
contract
(
'FinalizableCrowdsale'
,
function
([
_
,
owner
,
wallet
,
thirdparty
])
{
...
...
test/crowdsale/RefundableCrowdsale.test.js
View file @
f4228f1b
...
@@ -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
(
'
mocks/RefundableCrowdsaleImpl.so
l'
);
const
RefundableCrowdsale
=
artifacts
.
require
(
'
RefundableCrowdsaleImp
l'
);
const
MintableToken
=
artifacts
.
require
(
'MintableToken'
);
const
MintableToken
=
artifacts
.
require
(
'MintableToken'
);
contract
(
'RefundableCrowdsale'
,
function
([
_
,
owner
,
wallet
,
investor
])
{
contract
(
'RefundableCrowdsale'
,
function
([
_
,
owner
,
wallet
,
investor
])
{
...
...
test/examples/SimpleToken.test.js
View file @
f4228f1b
import
decodeLogs
from
'../helpers/decodeLogs'
;
import
decodeLogs
from
'../helpers/decodeLogs'
;
const
SimpleToken
=
artifacts
.
require
(
'SimpleToken
.sol
'
);
const
SimpleToken
=
artifacts
.
require
(
'SimpleToken'
);
contract
(
'SimpleToken'
,
accounts
=>
{
contract
(
'SimpleToken'
,
accounts
=>
{
let
token
;
let
token
;
...
...
test/library/ECRecovery.test.js
View file @
f4228f1b
var
ECRecoveryMock
=
artifacts
.
require
(
'ECRecoveryMock
.sol
'
);
var
ECRecoveryMock
=
artifacts
.
require
(
'ECRecoveryMock'
);
var
ECRecoveryLib
=
artifacts
.
require
(
'ECRecovery
.sol
'
);
var
ECRecoveryLib
=
artifacts
.
require
(
'ECRecovery'
);
var
hashMessage
=
require
(
'../helpers/hashMessage.js'
);
var
hashMessage
=
require
(
'../helpers/hashMessage.js'
);
...
...
test/library/Math.test.js
View file @
f4228f1b
var
MathMock
=
artifacts
.
require
(
'
../mocks/MathMock.sol
'
);
var
MathMock
=
artifacts
.
require
(
'
MathMock
'
);
contract
(
'Math'
,
function
(
accounts
)
{
contract
(
'Math'
,
function
(
accounts
)
{
let
math
;
let
math
;
...
...
test/library/MerkleProof.test.js
View file @
f4228f1b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
MerkleTree
from
'../helpers/merkleTree.js'
;
import
MerkleTree
from
'../helpers/merkleTree.js'
;
import
{
sha3
,
bufferToHex
}
from
'ethereumjs-util'
;
import
{
sha3
,
bufferToHex
}
from
'ethereumjs-util'
;
var
MerkleProof
=
artifacts
.
require
(
'MerkleProof
.sol
'
);
var
MerkleProof
=
artifacts
.
require
(
'MerkleProof'
);
contract
(
'MerkleProof'
,
function
(
accounts
)
{
contract
(
'MerkleProof'
,
function
(
accounts
)
{
let
merkleProof
;
let
merkleProof
;
...
...
test/lifecycle/Destructible.test.js
View file @
f4228f1b
var
Destructible
=
artifacts
.
require
(
'
../contracts/lifecycle/Destructible.sol
'
);
var
Destructible
=
artifacts
.
require
(
'
Destructible
'
);
require
(
'../helpers/transactionMined.js'
);
require
(
'../helpers/transactionMined.js'
);
contract
(
'Destructible'
,
function
(
accounts
)
{
contract
(
'Destructible'
,
function
(
accounts
)
{
...
...
test/lifecycle/Pausable.test.js
View file @
f4228f1b
import
assertRevert
from
'../helpers/assertRevert'
;
import
assertRevert
from
'../helpers/assertRevert'
;
const
PausableMock
=
artifacts
.
require
(
'
mocks/PausableMock.sol
'
);
const
PausableMock
=
artifacts
.
require
(
'
PausableMock
'
);
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/lifecycle/TokenDestructible.test.js
View file @
f4228f1b
var
TokenDestructible
=
artifacts
.
require
(
'
../contracts/lifecycle/TokenDestructible.sol
'
);
var
TokenDestructible
=
artifacts
.
require
(
'
TokenDestructible
'
);
var
StandardTokenMock
=
artifacts
.
require
(
'
mocks/StandardTokenMock.sol
'
);
var
StandardTokenMock
=
artifacts
.
require
(
'
StandardTokenMock
'
);
require
(
'../helpers/transactionMined.js'
);
require
(
'../helpers/transactionMined.js'
);
contract
(
'TokenDestructible'
,
function
(
accounts
)
{
contract
(
'TokenDestructible'
,
function
(
accounts
)
{
...
...
test/math/SafeMath.test.js
View file @
f4228f1b
import
assertRevert
from
'../helpers/assertRevert'
;
import
assertRevert
from
'../helpers/assertRevert'
;
const
assertJump
=
require
(
'../helpers/assertJump'
);
const
assertJump
=
require
(
'../helpers/assertJump'
);
var
SafeMathMock
=
artifacts
.
require
(
'
mocks/SafeMathMock.sol
'
);
var
SafeMathMock
=
artifacts
.
require
(
'
SafeMathMock
'
);
contract
(
'SafeMath'
,
function
(
accounts
)
{
contract
(
'SafeMath'
,
function
(
accounts
)
{
let
safeMath
;
let
safeMath
;
...
...
test/ownership/CanReclaimToken.test.js
View file @
f4228f1b
import
expectThrow
from
'../helpers/expectThrow'
;
import
expectThrow
from
'../helpers/expectThrow'
;
const
CanReclaimToken
=
artifacts
.
require
(
'
../contracts/ownership/CanReclaimToken.sol
'
);
const
CanReclaimToken
=
artifacts
.
require
(
'
CanReclaimToken
'
);
const
BasicTokenMock
=
artifacts
.
require
(
'
mocks/BasicTokenMock.sol
'
);
const
BasicTokenMock
=
artifacts
.
require
(
'
BasicTokenMock
'
);
contract
(
'CanReclaimToken'
,
function
(
accounts
)
{
contract
(
'CanReclaimToken'
,
function
(
accounts
)
{
let
token
=
null
;
let
token
=
null
;
...
...
test/ownership/Claimable.test.js
View file @
f4228f1b
import
assertRevert
from
'../helpers/assertRevert'
;
import
assertRevert
from
'../helpers/assertRevert'
;
var
Claimable
=
artifacts
.
require
(
'
../contracts/ownership/Claimable.sol
'
);
var
Claimable
=
artifacts
.
require
(
'
Claimable
'
);
contract
(
'Claimable'
,
function
(
accounts
)
{
contract
(
'Claimable'
,
function
(
accounts
)
{
let
claimable
;
let
claimable
;
...
...
test/ownership/Contactable.test.js
View file @
f4228f1b
var
Contactable
=
artifacts
.
require
(
'
../contracts/ownership/Contactable.sol
'
);
var
Contactable
=
artifacts
.
require
(
'
Contactable
'
);
contract
(
'Contactable'
,
function
(
accounts
)
{
contract
(
'Contactable'
,
function
(
accounts
)
{
let
contactable
;
let
contactable
;
...
...
test/ownership/DelayedClaimable.test.js
View file @
f4228f1b
import
assertRevert
from
'../helpers/assertRevert'
;
import
assertRevert
from
'../helpers/assertRevert'
;
var
DelayedClaimable
=
artifacts
.
require
(
'
../contracts/ownership/DelayedClaimable.sol
'
);
var
DelayedClaimable
=
artifacts
.
require
(
'
DelayedClaimable
'
);
contract
(
'DelayedClaimable'
,
function
(
accounts
)
{
contract
(
'DelayedClaimable'
,
function
(
accounts
)
{
var
delayedClaimable
;
var
delayedClaimable
;
...
...
test/ownership/HasNoContracts.test.js
View file @
f4228f1b
import
expectThrow
from
'../helpers/expectThrow'
;
import
expectThrow
from
'../helpers/expectThrow'
;
const
Ownable
=
artifacts
.
require
(
'../contracts/ownership/Ownable.sol'
);
const
Ownable
=
artifacts
.
require
(
'Ownable'
);
const
HasNoContracts
=
artifacts
.
require
(
const
HasNoContracts
=
artifacts
.
require
(
'HasNoContracts'
);
'../contracts/ownership/HasNoContracts.sol'
,
);
contract
(
'HasNoContracts'
,
function
(
accounts
)
{
contract
(
'HasNoContracts'
,
function
(
accounts
)
{
let
hasNoContracts
=
null
;
let
hasNoContracts
=
null
;
...
...
test/ownership/HasNoEther.test.js
View file @
f4228f1b
import
expectThrow
from
'../helpers/expectThrow'
;
import
expectThrow
from
'../helpers/expectThrow'
;
import
toPromise
from
'../helpers/toPromise'
;
import
toPromise
from
'../helpers/toPromise'
;
const
HasNoEtherTest
=
artifacts
.
require
(
'
../mocks/HasNoEtherTest.sol
'
);
const
HasNoEtherTest
=
artifacts
.
require
(
'
HasNoEtherTest
'
);
const
ForceEther
=
artifacts
.
require
(
'
../mocks/ForceEther.sol
'
);
const
ForceEther
=
artifacts
.
require
(
'
ForceEther
'
);
contract
(
'HasNoEther'
,
function
(
accounts
)
{
contract
(
'HasNoEther'
,
function
(
accounts
)
{
const
amount
=
web3
.
toWei
(
'1'
,
'ether'
);
const
amount
=
web3
.
toWei
(
'1'
,
'ether'
);
...
...
test/ownership/HasNoTokens.test.js
View file @
f4228f1b
import
expectThrow
from
'../helpers/expectThrow'
;
import
expectThrow
from
'../helpers/expectThrow'
;
const
HasNoTokens
=
artifacts
.
require
(
'
../contracts/lifecycle/HasNoTokens.sol
'
);
const
HasNoTokens
=
artifacts
.
require
(
'
HasNoTokens
'
);
const
ERC223TokenMock
=
artifacts
.
require
(
'
mocks/ERC223TokenMock.sol
'
);
const
ERC223TokenMock
=
artifacts
.
require
(
'
ERC223TokenMock
'
);
contract
(
'HasNoTokens'
,
function
(
accounts
)
{
contract
(
'HasNoTokens'
,
function
(
accounts
)
{
let
hasNoTokens
=
null
;
let
hasNoTokens
=
null
;
...
...
test/ownership/Ownable.test.js
View file @
f4228f1b
import
assertRevert
from
'../helpers/assertRevert'
;
import
assertRevert
from
'../helpers/assertRevert'
;
var
Ownable
=
artifacts
.
require
(
'
../contracts/ownership/Ownable.sol
'
);
var
Ownable
=
artifacts
.
require
(
'
Ownable
'
);
contract
(
'Ownable'
,
function
(
accounts
)
{
contract
(
'Ownable'
,
function
(
accounts
)
{
let
ownable
;
let
ownable
;
...
...
test/ownership/rbac/RBAC.test.js
View file @
f4228f1b
import
expectThrow
from
'../../helpers/expectThrow'
;
import
expectThrow
from
'../../helpers/expectThrow'
;
import
expectEvent
from
'../../helpers/expectEvent'
;
import
expectEvent
from
'../../helpers/expectEvent'
;
const
RBACMock
=
artifacts
.
require
(
'
mocks/RBACMock.sol
'
);
const
RBACMock
=
artifacts
.
require
(
'
RBACMock
'
);
require
(
'chai'
)
require
(
'chai'
)
.
use
(
require
(
'chai-as-promised'
))
.
use
(
require
(
'chai-as-promised'
))
...
...
test/payment/PullPayment.test.js
View file @
f4228f1b
var
PullPaymentMock
=
artifacts
.
require
(
'
mocks/PullPaymentMock.sol
'
);
var
PullPaymentMock
=
artifacts
.
require
(
'
PullPaymentMock
'
);
contract
(
'PullPayment'
,
function
(
accounts
)
{
contract
(
'PullPayment'
,
function
(
accounts
)
{
let
ppce
;
let
ppce
;
...
...
test/payment/SplitPayment.test.js
View file @
f4228f1b
...
@@ -6,7 +6,7 @@ require('chai')
...
@@ -6,7 +6,7 @@ require('chai')
.
should
();
.
should
();
const
EVMThrow
=
require
(
'../helpers/EVMThrow.js'
);
const
EVMThrow
=
require
(
'../helpers/EVMThrow.js'
);
const
SplitPayment
=
artifacts
.
require
(
'
../contracts/payment/SplitPayment.sol
'
);
const
SplitPayment
=
artifacts
.
require
(
'
SplitPayment
'
);
contract
(
'SplitPayment'
,
function
([
owner
,
payee1
,
payee2
,
payee3
,
nonpayee1
,
payer1
])
{
contract
(
'SplitPayment'
,
function
([
owner
,
payee1
,
payee2
,
payee3
,
nonpayee1
,
payer1
])
{
const
amount
=
web3
.
toWei
(
1.0
,
'ether'
);
const
amount
=
web3
.
toWei
(
1.0
,
'ether'
);
...
...
test/token/BasicToken.test.js
View file @
f4228f1b
import
assertRevert
from
'../helpers/assertRevert'
;
import
assertRevert
from
'../helpers/assertRevert'
;
var
BasicTokenMock
=
artifacts
.
require
(
'
mocks/BasicTokenMock.sol
'
);
var
BasicTokenMock
=
artifacts
.
require
(
'
BasicTokenMock
'
);
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/token/BurnableToken.test.js
View file @
f4228f1b
const
EVMRevert
=
require
(
'../helpers/EVMRevert.js'
);
const
EVMRevert
=
require
(
'../helpers/EVMRevert.js'
);
const
BurnableTokenMock
=
artifacts
.
require
(
'
mocks/BurnableTokenMock.sol
'
);
const
BurnableTokenMock
=
artifacts
.
require
(
'
BurnableTokenMock
'
);
const
BigNumber
=
web3
.
BigNumber
;
const
BigNumber
=
web3
.
BigNumber
;
require
(
'chai'
)
require
(
'chai'
)
...
...
test/token/CappedToken.test.js
View file @
f4228f1b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
expectThrow
from
'../helpers/expectThrow'
;
import
expectThrow
from
'../helpers/expectThrow'
;
import
ether
from
'../helpers/ether'
;
import
ether
from
'../helpers/ether'
;
var
CappedToken
=
artifacts
.
require
(
'
../contracts/Tokens/CappedToken.sol
'
);
var
CappedToken
=
artifacts
.
require
(
'
CappedToken
'
);
contract
(
'Capped'
,
function
(
accounts
)
{
contract
(
'Capped'
,
function
(
accounts
)
{
const
cap
=
ether
(
1000
);
const
cap
=
ether
(
1000
);
...
...
test/token/ERC20/DetailedERC20.test.js
View file @
f4228f1b
...
@@ -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
(
'DetailedERC20Mock
.sol
'
);
const
DetailedERC20Mock
=
artifacts
.
require
(
'DetailedERC20Mock'
);
contract
(
'DetailedERC20'
,
accounts
=>
{
contract
(
'DetailedERC20'
,
accounts
=>
{
let
detailedERC20
=
null
;
let
detailedERC20
=
null
;
...
...
test/token/ERC20/SafeERC20.test.js
View file @
f4228f1b
...
@@ -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
(
'SafeERC20Helper
.sol
'
);
const
SafeERC20Helper
=
artifacts
.
require
(
'SafeERC20Helper'
);
contract
(
'SafeERC20'
,
function
()
{
contract
(
'SafeERC20'
,
function
()
{
beforeEach
(
async
function
()
{
beforeEach
(
async
function
()
{
...
...
test/token/ERC827/ERC827Token.js
View file @
f4228f1b
import
EVMRevert
from
'../../helpers/EVMRevert'
;
import
EVMRevert
from
'../../helpers/EVMRevert'
;
var
Message
=
artifacts
.
require
(
'MessageHelper
.sol
'
);
var
Message
=
artifacts
.
require
(
'MessageHelper'
);
var
ERC827TokenMock
=
artifacts
.
require
(
'ERC827TokenMock
.sol
'
);
var
ERC827TokenMock
=
artifacts
.
require
(
'ERC827TokenMock'
);
var
BigNumber
=
web3
.
BigNumber
;
var
BigNumber
=
web3
.
BigNumber
;
var
_
=
require
(
'lodash'
);
var
_
=
require
(
'lodash'
);
...
...
test/token/MintableToken.test.js
View file @
f4228f1b
import
expectThrow
from
'../helpers/expectThrow'
;
import
expectThrow
from
'../helpers/expectThrow'
;
var
MintableToken
=
artifacts
.
require
(
'
../contracts/Tokens/MintableToken.sol
'
);
var
MintableToken
=
artifacts
.
require
(
'
MintableToken
'
);
contract
(
'Mintable'
,
function
(
accounts
)
{
contract
(
'Mintable'
,
function
(
accounts
)
{
let
token
;
let
token
;
...
...
test/token/PausableToken.test.js
View file @
f4228f1b
'user strict'
;
'user strict'
;
import
assertRevert
from
'../helpers/assertRevert'
;
import
assertRevert
from
'../helpers/assertRevert'
;
var
PausableTokenMock
=
artifacts
.
require
(
'
./mocks/PausableTokenMock.sol
'
);
var
PausableTokenMock
=
artifacts
.
require
(
'
PausableTokenMock
'
);
contract
(
'PausableToken'
,
function
(
accounts
)
{
contract
(
'PausableToken'
,
function
(
accounts
)
{
let
token
;
let
token
;
...
...
test/token/StandardToken.test.js
View file @
f4228f1b
import
assertRevert
from
'../helpers/assertRevert'
;
import
assertRevert
from
'../helpers/assertRevert'
;
var
StandardTokenMock
=
artifacts
.
require
(
'
mocks/StandardTokenMock.sol
'
);
var
StandardTokenMock
=
artifacts
.
require
(
'
StandardTokenMock
'
);
contract
(
'StandardToken'
,
function
(
accounts
)
{
contract
(
'StandardToken'
,
function
(
accounts
)
{
let
token
;
let
token
;
...
...
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