Historical Significance
This sale contract is part of the original Curio Cards primary-sale infrastructure for Card #1 (Apples).
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 0x6aa2044c7a0f9e2758edae97247b03a0d7e73d6c (Card #1 (Apples)). The runtime includes sale functions such as available(), price(), amountRaised(), claimFunding(), and ERC-20 transferFrom integration.
Source Verified
Curio Cards v0.4.7 (opt ON) vending machine (2017). Compiled with solc v0.4.7 (opt ON), optimizer ON. All executable runtime bytecode matches on-chain byte-for-byte; only the trailing bzzr0 metadata/swarm hash differs (original source-file text not recovered) -> near_exact_match. Same reconstructed source as the rest of the Curio vending-machine family; ABI/function names (available, amountRaised, CloseVending, price, claimFunding) recovered from curiocards.github.io/js/vending.js. The card families differ only in compiler version/optimizer and constructor args.
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