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
b6a58300
Commit
b6a58300
authored
Oct 28, 2016
by
Makoto Inoue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Does not allow to create bounty contract without address
parent
95092986
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
Bounty.sol
contracts/Bounty.sol
+6
-1
2_deploy_contracts.js
migrations/2_deploy_contracts.js
+0
-1
Bounty.js
test/Bounty.js
+12
-0
No files found.
contracts/Bounty.sol
View file @
b6a58300
...
...
@@ -28,7 +28,12 @@ contract Bounty is PullPayment, Killable {
if (claimed) throw;
}
function Bounty(address _factoryAddress){
modifier withAddress(address _address) {
if(_address == 0) throw;
_;
}
function Bounty(address _factoryAddress) withAddress(_factoryAddress){
factoryAddress = _factoryAddress;
}
...
...
migrations/2_deploy_contracts.js
View file @
b6a58300
...
...
@@ -2,7 +2,6 @@ module.exports = function(deployer) {
deployer
.
deploy
(
PullPaymentBid
);
deployer
.
deploy
(
BadArrayUse
);
deployer
.
deploy
(
ProofOfExistence
);
deployer
.
deploy
(
Bounty
);
deployer
.
deploy
(
CrowdsaleTokenBounty
);
deployer
.
deploy
(
Ownable
);
deployer
.
deploy
(
LimitFunds
);
...
...
test/Bounty.js
View file @
b6a58300
...
...
@@ -33,6 +33,18 @@ contract('Bounty', function(accounts) {
then
(
done
);
})
it
(
"cannot create bounty without address"
,
function
(
done
){
var
target
=
SecureTargetMock
.
deployed
();
Bounty
.
new
().
then
(
function
(
bounty
){
throw
{
name
:
"NoThrowError"
,
message
:
"should not come here"
};
}).
catch
(
function
(
error
){
assert
.
notEqual
(
error
.
name
,
"NoThrowError"
);
}).
then
(
done
);
})
it
(
"empties itself when killed"
,
function
(
done
){
var
target
=
SecureTargetMock
.
deployed
();
var
owner
=
accounts
[
0
];
...
...
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