Historical Significance
This sale contract is part of the original Curio Cards primary-sale infrastructure for Card #13 (BTC).
Context
Curio Cards used separate sale contracts to distribute fixed-supply art tokens from the 2017 collection. Collectors bought cards by sending ETH directly to these sale contracts, which then delivered the corresponding card tokens from the vending machine inventory. Rhett Creighton (@rhett_creighton) is Curio Cards co-founder and Solidity developer.
Token Information
Key Facts
Description
This contract is an original Curio Cards sale/vending machine deployed by Rhett Creighton (@rhett_creighton). It references token 0x2d922712f5e99428c65b44f09ea389373d185bb3 (Card #13 (BTC)). The runtime includes sale functions such as available(), price(), amountRaised(), claimFunding(), and ERC-20 transferFrom integration.
Source Verified
Curio Cards 886-byte vending machine (2017). Compiled with solc v0.4.11+commit.68ef5810, optimizer OFF. All executable runtime bytecode matches on-chain byte-for-byte across the entire 886B card family; only the trailing 43-byte bzzr0 metadata/swarm hash differs (original source-file text not recovered) -> near_exact_match. ABI and function names (available, amountRaised, CloseVending, price, claimFunding; constructor holdingAddress/token/budget/rate) recovered from the project front-end curiocards.github.io/js/vending.js. Fallback is the payable buy: numberOfCards = msg.value/price, token.transferFrom(holdingAddress, buyer, numberOfCards), available -= numberOfCards.
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Spurious Dragon Era
Continued DoS protection. State trie clearing.
Bytecode Overview
Verified Source Available
Source verified through compiler archaeology (near-exact bytecode match).
View Verification ProofShow source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
// Curio Cards 886-byte vending machine (2017). ABI/function names recovered from
// the original site JS (curiocards.github.io/js/vending.js). solc v0.4.11, optimizer OFF.
// Runtime executable code matches on-chain byte-for-byte across the whole 886B card
// family; the trailing bzzr0 metadata/swarm hash differs (original source-file text
// not recovered) -> classified near_exact_match.
pragma solidity ^0.4.0;
contract Token {
function transferFrom(address from, address to, uint256 value) returns (bool);
}
contract CurioCardVendingMachine {
address holdingAddress;
uint public available;
uint public amountRaised;
uint public price;
Token token;
bool ended;
function CurioCardVendingMachine(address _holdingAddress, address _token, uint256 _budget, uint256 _rate) {
holdingAddress = _holdingAddress;
token = Token(_token);
available = _budget;
price = _rate;
}
function() payable {
if (ended) throw;
uint amount = msg.value;
uint numberOfCards = amount / price;
amountRaised += amount;
if (numberOfCards > available) throw;
token.transferFrom(holdingAddress, msg.sender, numberOfCards);
available -= numberOfCards;
}
function CloseVending() { ended = true; }
function claimFunding() {
if (!holdingAddress.send(amountRaised)) throw;
amountRaised = 0;
}
}
External Links
Related contracts
Curio Cards original token factory
Same deployerFactory contract that created the original Curio Cards ERC-20-style card token contracts.
0x37aab2...05e6bbMay 9, 2017Curio1
Same deployerCurio Cards art token for Card #1 (Apples), art by Phneep.
0x6aa204...e73d6cMay 9, 2017Curio2
Same deployerCurio Cards art token for Card #2 (Nuts), art by Phneep.
0xe9a6a2...1140c8May 9, 2017Curio3
Same deployerCurio Cards art token for Card #3 (Berries), art by Phneep.
0x3f8131...8a3702May 9, 2017CurioVendingMachine_1
Same deployerCurio Cards vending machine for Card #1 (Apples).
0x964b01...9ea95fMay 9, 2017CurioVendingMachine_2
Same deployerCurio Cards vending machine for Card #2 (Nuts).
0xc3f355...73cce7May 9, 2017