ズの2枚のピザと交換した。 +これはビットコインを使った世界初の現実世界での取り引きとされ る。 +8年後の今、1万ビットコインの価値は8200万ドル(約90億円)を超 えた。 +この取り引きを祝して、5月22日は“ビットコイン・ピザ・デー”と呼ば れている。 ブロックチェーン基 礎 2010’s 10,000 Bitcoins Pizza Guy Repeats Feat With Historic Lightning Network Transaction The “Bitcoin pizza guy” is at it again. Laszlo Hanyecz, best known for making the first documented transaction in which Bitcoin was used to purchase a physical item, recently christened the Lightning Network (LN) with the help of a sympathetic pizza delivery driver and a jerry-rigged atomic swap. Hanyecz ensconced his place in Bitcoin lore on May 22, 2010, when he paid another early adopter 10,000 BTC to order him two pizzas. This transaction — believed to be the first in which a seller accepted a Bitcoin payment for a physical item — spawned both Bitcoin Pizza Day and the “Bitcoin Pizza Index,” which calculates the present value of coins used in that historic transaction. 引用:https://www.ccn.com/bitcoin-pizza-guy-lightning-network/
maisu var sendTicket 家の鍵 var amount var send パン屋のポイント var point var soushin 美容室のポイント var biyou var sendToken ゲームのアイテム var ko var sendItem 通常のゲームとの違いと は?
maisu var sendTicket 家の鍵 var amount var send パン屋のポイント var point var soushin 美容室のポイント var biyou var sendToken ゲームのアイテム var ko var sendItem 通常のゲームとの違いと は?
amount var sendToken 家の鍵 var amount sendToken send パン屋のポイント var amount var sendToken 美容室のポイント var amount var sendToken ゲームのアイテム var amount var sendToken 通常のゲームとの違いと は?
Algo369 is ERC20Token, Ownable { using SafeMath for uint256; In Wei per (1 token * 10^decimals) uint256 public tokenPrice = 100000000000000; string public constant symbol = "ALG"; string public constant name = "Algo369"; uint8 public constant decimals = 0; //function Alpaca() public ERC20Token {} //function Alpaca(string name, string symbol) public ERC20Token(name, symbol) {} function Alpaca() public { //10億 totalSupply_ = 1000000 * (uint256(10) ** decimals); //totalSupply_ = 1000000000; balances[owner] = totalSupply_; }
var amount var sendTicket 家の鍵 var amount var send パン屋のポイント var amount var soushin 美容室のポイント var amount var sendToken ゲームのアイテム var amount var sendItem 通常のゲームとの違いと は?
contract KittyAccessControl contract KittyBase is KittyAccessControl contract KittyOwnership is KittyBase, ERC721 contract KittyBreeding is KittyOwnership contract KittyAuction is KittyBreeding contract KittyMinting is KittyAuction contract KittyCore is KittyMinting 6つのコントラクによって作られている。
function _createKitty( uint256 _matronId, uint256 _sireId, uint256 _generation, uint256 _genes, address _owner ) internal returns (uint) { // These requires are not strictly necessary, our calling code should make // sure that these conditions are never broken. However! _createKitty() is already // an expensive call (for storage), and it doesn't hurt to be especially careful // to ensure our data structures are always valid. require(_matronId == uint256(uint32(_matronId))); require(_sireId == uint256(uint32(_sireId))); require(_generation == uint256(uint16(_generation))); // New kitty starts with the same cooldown as parent gen/2 uint16 cooldownIndex = uint16(_generation / 2); if (cooldownIndex > 13) { cooldownIndex = 13; } Kitty memory _kitty = Kitty({ genes: _genes, birthTime: uint64(now), cooldownEndBlock: 0, matronId: uint32(_matronId), sireId: uint32(_sireId), uint256 newKittenId = kitties.push(_kitty) - 1; // It's probably never going to happen, 4 billion cats is A LOT but // let's just be 100% sure we never let this happen. require(newKittenId == uint256(uint32(newKittenId))); // emit the birth event Birth( _owner, newKittenId, uint256(_kitty.matronId), uint256(_kitty.sireId), _kitty.genes ); // This will assign ownership, and also emit the Transfer event as // per ERC721 draft _transfer(0, _owner, newKittenId); return newKittenId; } 猫が作られるところの関数。 kittiesという配列に _kittyがpushされているのがわかる。
/// @dev Internal utility function to initiate breeding, assumes that all breeding /// requirements have been checked. function _breedWith(uint256 _matronId, uint256 _sireId) internal { // Grab a reference to the Kitties from storage. Kitty storage sire = kitties[_sireId]; Kitty storage matron = kitties[_matronId]; // Mark the matron as pregnant, keeping track of who the sire is. matron.siringWithId = uint32(_sireId); // Trigger the cooldown for both parents. _triggerCooldown(sire); _triggerCooldown(matron); // Clear siring permission for both parents. This may not be strictly necessary // but it's likely to avoid confusion! delete sireAllowedToAddress[_matronId]; delete sireAllowedToAddress[_sireId]; // Every time a kitty gets pregnant, counter is incremented. pregnantKitties++; // Emit the pregnancy event. Pregnant(kittyIndexToOwner[_matronId], _matronId, _sireId, matron.cooldownEndBlock); } contract KittyBreeding 猫をブリーディングするのに必要なメソッドが記述。 猫同士の遺伝子を組み合わせる geneScience(ジーンサイエンス)コントラクト というものが存在しているが、オープンソースではない。 externalな関数setGeneScienceAddressはonlyCEOの修飾詞を持ち、 CEOだけが引数にアドレスを設定して子猫の遺伝子を決定する関数を呼び出 すことが可能。 ロジック内でどのような猫同士を掛け合わせればレアな猫が生まれるかなど。
contract KittyAuction is KittyBreeding { /// @dev The address of the ClockAuction contract that handles sales of Kitties. This /// same contract handles both peer-to-peer sales as well as the gen0 sales which are /// initiated every 15 minutes. SaleClockAuction public saleAuction; /// @dev The address of a custom ClockAution subclassed contract that handles siring /// auctions. Needs to be separate from saleAuction because the actions taken on success /// after a sales and siring auction are quite different. SiringClockAuction public siringAuction; /// @dev Sets the reference to the sale auction. /// @param _address - Address of sale contract. function setSaleAuctionAddress(address _address) public onlyCEO { SaleClockAuction candidateContract = SaleClockAuction(_address); // NOTE: verify that a contract is what we expect - https://github.com/Lunyr/crowdsale-contracts/blob/cfadd15986c30521d8ba7d5b6f57b4fefcc7ac38/contracts/LunyrToken.s ol#L117 require(candidateContract.isSaleClockAuction()); // Set the new contract address saleAuction = candidateContract; } contract KittyAuctions 猫の売買及び貸し出しに関するメソッド。 CryptoKittiesは、通常の猫の販売、そしてブリーディングのために 猫を貸し出す2つのオークション機能を保持。 KittyAuctionsコントラクトは、setSaleAuctionAddress()と setSiringAuctionAddress()の2つの関数から作られている。 これらは前出の setGeneScienceAddress()のようにCEOのみが 呼び出せ、外部コントラクトアドレスを利用できる関数として。
/// @dev we can create promo kittens, up to a limit. Only callable by COO /// @param _genes the encoded genes of the kitten to be created, any value is accepted /// @param _owner the future owner of the created kittens. Default to contract COO function createPromoKitty(uint256 _genes, address _owner) external onlyCOO { address kittyOwner = _owner; if (kittyOwner == address(0)) { kittyOwner = cooAddress; } require(promoCreatedCount < PROMO_CREATION_LIMIT); promoCreatedCount++; _createKitty(0, 0, 0, _genes, kittyOwner); } /// @dev Creates a new gen0 kitty with the given genes and /// creates an auction for it. function createGen0Auction(uint256 _genes) external onlyCOO { require(gen0CreatedCount < GEN0_CREATION_LIMIT); uint256 kittyId = _createKitty(0, 0, 0, _genes, address(this)); _approve(kittyId, saleAuction); saleAuction.createAuction( kittyId, _computeNextGen0Price(), 0, GEN0_AUCTION_DURATION, address(this) ); contract KittyMinting Gen0の猫を生成するためのメソッド。Gen0はプロモーション配 布用の猫は5000匹、その他のGen0猫は45000匹までの作成と 制限。 通常のGen0猫は生成後すぐに、あるアルゴリズムによって決め られた値段で販売される。 uint256 public constant PROMO_CREATION_LIMIT = 5000; uint256 public constant GEN0_CREATION_LIMIT = 45000;