This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.7.0 <0.9.0; | |
contract Ballot { | |
// Variables | |
struct vote { | |
address voterAddress; | |
bool choice; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.7.0 <0.9.0; | |
contract BlindAuction { | |
// Variables | |
struct Bid { | |
bytes32 blindedBid; | |
uint depositAmount; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.7.0 <0.9.0; | |
contract Escrow { | |
//Variables | |
enum State { NOT_INITIATED, AWAITING_PAYMENT, AWAITING_DELIVERY, COMPLETE } | |
State public currentState; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.7.0 <0.9.0; | |
contract DealerGame { | |
uint public playerCount; | |
uint public pot = 0; | |
address public dealer; | |
Player[] public playersInGame; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.7.0 <0.9.0; | |
contract SimpleAuction { | |
address payable public beneficiary; | |
uint public auctionEndTime; | |
address public highestBidder; | |
uint public highestBid; | |
mapping(address => uint) public pendingReturns; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.7.0 <0.9.0; | |
contract Coin { | |
address public minter; | |
uint contractCreatedAt; | |
mapping(address => uint) public balances; | |
event Sent(address from, address to, uint amount); | |
constructor() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.7.0 <0.9.0; | |
contract LittleGame { | |
struct Player { | |
Level playerLevel; | |
string firstName; | |
string lastName; | |
address playerAddress; | |
uint createdAt; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.7.0 <0.9.0; | |
contract Coin { | |
address public minter; | |
mapping(address => uint) public balances; | |
event Sent(address from, address to, uint amount); | |
constructor() { | |
minter = msg.sender; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.7.0 <0.9.0; | |
contract LittleGame { | |
struct Player { | |
Level playerLevel; | |
string firstName; | |
string lastName; | |
address playerAddress; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.7.0 <0.9.0; | |
contract Coin { | |
address public minter; | |
mapping(address => uint) public balances; | |
event Sent(address from, address to, uint amount); | |
constructor() { | |
minter = msg.sender; |
NewerOlder