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
| // SPDX-License-Identifier: MIT | |
| // Compatible with OpenZeppelin Contracts ^5.0.0 | |
| pragma solidity ^0.8.20; | |
| contract RefriToken { | |
| uint public id_da_latinha = 4321; // identificador da latinha | |
| address public dono = msg.sender; // dono inicial da latinha é quem cria o contrato | |
| uint public quantos_ml = 310; // volume de liquido na latinha quantos_ml | |
| function comprar() public payable { |
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
| // SPDX-License-Identifier: MIT | |
| // Compatible with OpenZeppelin Contracts ^5.0.0 | |
| pragma solidity ^0.8.20; | |
| contract RefriToken { | |
| // identificador da latinha | |
| uint latinha = 4321; | |
| // dono inicial da latinha é quem cria o contrato | |
| address public dono = 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
| // SPDX-License-Identifier: GPL-3.0 | |
| pragma solidity >=0.7.0 <0.9.0; | |
| // @title Contrato para votar no melhor sanduíche | |
| contract Votoiche { | |
| // quem votou em qual grupo | |
| mapping(address => uint8) public voto; | |
| // número de votos de cada grupo | |
| mapping(uint8 => uint) public numeroDeVotos; |
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
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.5.0; | |
| // dCoin - contract @ 0x9824eB5D5FfA57b0F7C4EC8cF73cE07adB2c7812 | |
| // ---------------------------------------------------------------------------- | |
| // ERC Token Standard #20 Interface | |
| // | |
| // ---------------------------------------------------------------------------- | |
| contract ERC20Interface { |
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
| /// SPDX-License-Identifier: GPL-3.0 | |
| pragma solidity >=0.7.0 <0.9.0; | |
| // Adapted from https://ethereum.stackexchange.com/questions/45277/calling-one-contract-to-another-contract-method | |
| contract Base { | |
| uint public dataA; | |
| bytes4 public dataB; |
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.6.6; | |
| import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
| contract SimpleCollectible is ERC721 { | |
| uint256 public tokenCounter; | |
| constructor () public ERC721 ("Dogie", "DOG"){ | |
| tokenCounter = 0; | |
| } | |
| function createCollectible(string memory tokenURI) public returns (uint256) { | |
| uint256 newItemId = tokenCounter; | |
| _safeMint(msg.sender, newItemId); |
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
| // SPDX-License-Identifier: GPL-3.0 | |
| pragma solidity >=0.7.0 <0.9.0; | |
| contract Pizzaria { | |
| uint public precoDaPizza = 1 ether; | |
| address payable public comprador; | |
| address payable public donoDaPizzaria; | |
| 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
| # Static files (CSS, JavaScript, Images) | |
| # https://docs.djangoproject.com/en/2.2/howto/static-files/ | |
| STATIC_URL = '/static/' | |
| DIR_STATIC = 'static' | |
| STATICFILES_DIRS = [ | |
| os.path.join(BASE_DIR, DIR_STATIC), | |
| '/var/www/static/', |
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
| // SPDX-License-Identifier: GPL-3.0 | |
| pragma solidity >=0.7.0 <0.9.0; | |
| contract StoreWeather { | |
| enum Weather { sunny, cloudy, rainy, snow } | |
| address public owner = msg.sender; | |
| Weather currentWeather; |
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
| // SPDX-License-Identifier: GPL-3.0 | |
| pragma solidity >=0.7.0 <0.8.0; | |
| contract Strings { | |
| string myString; | |
| function store(string memory _entrada) public { | |
| myString = _entrada; | |
| } |