aboutsummaryrefslogtreecommitdiffstats
path: root/test/contracts
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2016-09-06 18:25:19 +0800
committerGitHub <noreply@github.com>2016-09-06 18:25:19 +0800
commitf687635e4743a1e12d01fb082a4f8a76a759ab48 (patch)
tree7e3b917cfcc5ebf44c6770c6d742da0fa9277a12 /test/contracts
parent171c74843bb231c4663ec0fe7f4252ac03266f53 (diff)
parentdff9633084ebc241d8268c5dbd35a0c5307fd6fc (diff)
downloaddexon-solidity-f687635e4743a1e12d01fb082a4f8a76a759ab48.tar
dexon-solidity-f687635e4743a1e12d01fb082a4f8a76a759ab48.tar.gz
dexon-solidity-f687635e4743a1e12d01fb082a4f8a76a759ab48.tar.bz2
dexon-solidity-f687635e4743a1e12d01fb082a4f8a76a759ab48.tar.lz
dexon-solidity-f687635e4743a1e12d01fb082a4f8a76a759ab48.tar.xz
dexon-solidity-f687635e4743a1e12d01fb082a4f8a76a759ab48.tar.zst
dexon-solidity-f687635e4743a1e12d01fb082a4f8a76a759ab48.zip
Merge pull request #665 from axic/feature/accept-ether
BREAKING: Add payable modifier
Diffstat (limited to 'test/contracts')
-rw-r--r--test/contracts/AuctionRegistrar.cpp7
-rw-r--r--test/contracts/FixedFeeRegistrar.cpp2
-rw-r--r--test/contracts/Wallet.cpp2
3 files changed, 3 insertions, 8 deletions
diff --git a/test/contracts/AuctionRegistrar.cpp b/test/contracts/AuctionRegistrar.cpp
index 9161f2ce..05da3490 100644
--- a/test/contracts/AuctionRegistrar.cpp
+++ b/test/contracts/AuctionRegistrar.cpp
@@ -115,11 +115,6 @@ contract GlobalRegistrar is Registrar, AuctionSystem {
// TODO: Populate with hall-of-fame.
}
- function() {
- // prevent people from just sending funds to the registrar
- throw;
- }
-
function onAuctionEnd(string _name) internal {
var auction = m_auctions[_name];
var record = m_toRecord[_name];
@@ -136,7 +131,7 @@ contract GlobalRegistrar is Registrar, AuctionSystem {
}
}
- function reserve(string _name) external {
+ function reserve(string _name) external payable {
if (bytes(_name).length == 0)
throw;
bool needAuction = requiresAuction(_name);
diff --git a/test/contracts/FixedFeeRegistrar.cpp b/test/contracts/FixedFeeRegistrar.cpp
index c37873cf..af8ee595 100644
--- a/test/contracts/FixedFeeRegistrar.cpp
+++ b/test/contracts/FixedFeeRegistrar.cpp
@@ -73,7 +73,7 @@ contract FixedFeeRegistrar is Registrar {
modifier onlyrecordowner(string _name) { if (m_record(_name).owner == msg.sender) _; }
- function reserve(string _name) {
+ function reserve(string _name) payable {
Record rec = m_record(_name);
if (rec.owner == 0 && msg.value >= c_fee) {
rec.owner = msg.sender;
diff --git a/test/contracts/Wallet.cpp b/test/contracts/Wallet.cpp
index d3e1b8d7..b4f29a87 100644
--- a/test/contracts/Wallet.cpp
+++ b/test/contracts/Wallet.cpp
@@ -378,7 +378,7 @@ contract Wallet is multisig, multiowned, daylimit {
}
// gets called when no other function matches
- function() {
+ function() payable {
// just being sent some cash?
if (msg.value > 0)
Deposit(msg.sender, msg.value);