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.4.0; | |
| contract ArraySol { | |
| address dono; | |
| uint numeroSorteado; | |
| uint contadorDeSorteios = 0; | |
| uint [ ] numerosSorteados; | |
| constructor (uint numeroInicial) public payable comCustoMinimo (1000) { |
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.4.0; | |
| contract ArraySol { | |
| address dono; | |
| uint numeroSorteado; | |
| uint contadorDeSorteios = 0; | |
| uint [ ] numerosSorteados; | |
| constructor (uint numeroInicial) public payable comCustoMinimo (1000) { |
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
| const _deploy_contracts = require("../migrations/2_deploy_contracts") | |
| var DappToken = artifacts.require('DappToken') | |
| _deploy_contracts('DappToken', function(accounts)){ | |
| it('sets the total supply upon deployment', function(){ | |
| return DappToken deployed() | |
| }) | |
| }) |
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.4.2; | |
| contract DappToken{ | |
| // Constructor | |
| // Set the Total number of tokens | |
| // Read the total number of tokens | |
| uint256 public totalSupply; | |
| constructor () public{ | |
| totalSupply = 1000000; |
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
| var DappToken = artifacts.require('DappToken.sol') | |
| contract ('DappToken', function(accounts){ | |
| it('sets the total upon deployment', function(){ | |
| return DappToken.deployed().then(function(instance){ | |
| tokenInstance = instance; | |
| return tokenInstance.totalSupply(); | |
| }).then(function(totalSupply) { | |
| assert.equal(totalSupply.toNumber(), 9000000, 'sets the total supply to 1.000.000'); |
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.4.2; | |
| contract DappToken{ | |
| // Constructor | |
| // Set the Total number of tokens | |
| // Read the total number of tokens | |
| uint256 public totalSupply; | |
| constructor (uint256 _initialSupply) public{ | |
| totalSupply = _initialSupply; |
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.4.2; | |
| contract DappToken{ | |
| // DappToken | |
| uint256 public totalSupply; | |
| mapping(address => uint256) public balanceOf; |
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.4.21 <0.7.0; | |
| contract DappToken{ | |
| event Transfer( | |
| address indexed _from, | |
| address indexed _to, | |
| uint256 _value | |
| ); |
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.4.22 <0.6.0; | |
| // Current version:0.5.3+commit.10d17f24.Emscripten.clang | |
| // Optinization: YES | |
| contract owned { | |
| address public owner; | |
| constructor() public { | |
| owner = 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE-edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Dapp Token ICO Sale - Title</title> | |
| <!-- BootStrap --> | |
| <link href="css/bootstrap.min.css" rel="stylesheet"> |