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.18; | |
contract DepositWithdraw { | |
address private owner; | |
event LogDebug(uint256 amount); | |
event LogDepositReceived(address sender, uint256 value); | |
Depositor[] public depositors; | |
function DepositWithdraw() 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
//defini a versão de compilação do solidty | |
pragma solidity ^0.4.18; | |
contract RegisterNameToken { | |
//variável map onde a chave é uma array de bytes e o valor booleano(true ou false) | |
mapping (bytes32=>bool) mapNames; | |
//array de bytes | |
bytes32[] public names; | |
//evento para ser utilizado como callback pela nossa aplicação web | |
event LogNameRegistered(string _name, uint256 time); |
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
// prama informa a EVM a versão do solidity, | |
pragma solidity ^0.4.18; | |
contract Pessoa { | |
//variável do tipo string | |
string public nome; | |
string public email; | |
//eventos | |
event LogPersonEmailAlterado(address _pessoa, string emailAlterado); | |
// construtor |
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.18; | |
//https://github.com/ethereum/EIPs/issues/223 | |
contract ERC223Token { | |
string public name = "GoBlockchain Token"; | |
uint8 public decimals = 0; | |
string public symbol = "GBC"; | |
string public version = "GBC 1.0"; | |
uint256 public totalSupply; | |
mapping(address => uint) balancesOf; |
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.18; | |
/* New ERC23 contract interface */ | |
//https://github.com/ethereum/EIPs/issues/223 | |
contract ERC223 { | |
// Get the total token supply | |
function totalSupply() public constant returns (uint _supply); | |
//Compatibility with ERC20 transfer | |
function transfer(address to, uint value) public returns (bool ok); |
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
public function getDimensions(&$products) | |
{ | |
$width = 0; | |
$height = 0; | |
$depth = 0; | |
$weight = 0; | |
foreach ($products as &$product) { | |
if ($product['weight']) { | |
if (self::$weightUnit == 'KGS') { |
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 express = require('express'); | |
var app = express(); | |
var server = require('http').createServer(app); | |
var bodyParser = require('body-parser') | |
app.use( bodyParser.json() ); | |
app.use(bodyParser.urlencoded({ | |
extended: true | |
})); |
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
0x329b5b7c699c2bc3bff7ecbcb0ae29f5ce1f811e |
NewerOlder