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
21fb7463
Unverified
Commit
21fb7463
authored
Oct 12, 2016
by
Michael J. Curry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PullPayment rename fixes
parent
25d0ed00
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
16 deletions
+16
-16
Bounty.sol
contracts/Bounty.sol
+2
-2
PullPayment.sol
contracts/PullPayment.sol
+2
-2
BadArrayUse.sol
contracts/examples/BadArrayUse.sol
+2
-2
GoodArrayUse.sol
contracts/examples/GoodArrayUse.sol
+2
-2
PullPaymentBid.sol
contracts/examples/PullPaymentBid.sol
+2
-2
PullPaymentCapableExample.sol
contracts/examples/PullPaymentCapableExample.sol
+3
-3
StoppableBid.sol
contracts/examples/StoppableBid.sol
+3
-3
No files found.
contracts/Bounty.sol
View file @
21fb7463
pragma solidity ^0.4.0;
pragma solidity ^0.4.0;
import './PullPayment
Capable
.sol';
import './PullPayment.sol';
import './Token.sol';
import './Token.sol';
/*
/*
...
@@ -8,7 +8,7 @@ import './Token.sol';
...
@@ -8,7 +8,7 @@ import './Token.sol';
* to be lower than its totalSupply, which would mean that it doesn't
* to be lower than its totalSupply, which would mean that it doesn't
* have sufficient ether for everyone to withdraw.
* have sufficient ether for everyone to withdraw.
*/
*/
contract Bounty is PullPayment
Capable
{
contract Bounty is PullPayment {
bool public claimed;
bool public claimed;
mapping(address => address) public researchers;
mapping(address => address) public researchers;
...
...
contracts/PullPayment.sol
View file @
21fb7463
pragma solidity ^0.4.0;
pragma solidity ^0.4.0;
/*
/*
* PullPayment
Capable
* PullPayment
* Base contract supporting async send for pull payments.
* Base contract supporting async send for pull payments.
* Inherit from this contract and use asyncSend instead of send.
* Inherit from this contract and use asyncSend instead of send.
*/
*/
contract PullPayment
Capable
{
contract PullPayment {
mapping(address => uint) public payments;
mapping(address => uint) public payments;
// store sent amount as credit to be pulled, called by payer
// store sent amount as credit to be pulled, called by payer
...
...
contracts/examples/BadArrayUse.sol
View file @
21fb7463
import '../PullPayment
Capable
.sol';
import '../PullPayment.sol';
// UNSAFE CODE, DO NOT USE!
// UNSAFE CODE, DO NOT USE!
contract BadArrayUse is PullPayment
Capable
{
contract BadArrayUse is PullPayment {
address[] employees;
address[] employees;
function payBonus() {
function payBonus() {
...
...
contracts/examples/GoodArrayUse.sol
View file @
21fb7463
import '../PullPayment
Capable
.sol';
import '../PullPayment.sol';
contract GoodArrayUse is PullPayment
Capable
{
contract GoodArrayUse is PullPayment {
address[] employees;
address[] employees;
mapping(address => uint) bonuses;
mapping(address => uint) bonuses;
...
...
contracts/examples/PullPaymentBid.sol
View file @
21fb7463
import '../PullPayment
Capable
.sol';
import '../PullPayment.sol';
contract PullPaymentBid is PullPayment
Capable
{
contract PullPaymentBid is PullPayment {
address public highestBidder;
address public highestBidder;
uint public highestBid;
uint public highestBid;
...
...
contracts/examples/PullPaymentCapableExample.sol
View file @
21fb7463
import '../PullPayment
Capable
.sol';
import '../PullPayment.sol';
// Example class using PullPayment
Capable
// Example class using PullPayment
contract PullPayment
CapableExample is PullPaymentCapable
{
contract PullPayment
Example is PullPayment
{
// test helper function to call asyncSend
// test helper function to call asyncSend
function callSend(address dest, uint amount) external {
function callSend(address dest, uint amount) external {
asyncSend(dest, amount);
asyncSend(dest, amount);
...
...
contracts/examples/StoppableBid.sol
View file @
21fb7463
import '../PullPayment
Capable
.sol';
import '../PullPayment.sol';
import '../Stoppable.sol';
import '../Stoppable.sol';
contract StoppableBid is Stoppable, PullPayment
Capable
{
contract StoppableBid is Stoppable, PullPayment {
address public highestBidder;
address public highestBidder;
uint public highestBid;
uint public highestBid;
function StoppableBid(address _curator)
function StoppableBid(address _curator)
Stoppable(_curator)
Stoppable(_curator)
PullPayment
Capable
() {}
PullPayment() {}
function bid() external stopInEmergency {
function bid() external stopInEmergency {
if (msg.value <= highestBid) throw;
if (msg.value <= highestBid) throw;
...
...
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