Skip to content

Instantly share code, notes, and snippets.

View iurimatias's full-sized avatar

Iuri Matias iurimatias

View GitHub Profile
@iurimatias
iurimatias / namesystem.js
Created June 20, 2018 15:04
config/namesystem.js
module.exports = {
default: {
available_providers: ["ens"],
provider: "ens"
}
}
@iurimatias
iurimatias / storage.js
Created June 20, 2018 15:05
config/storage.js
module.exports = {
default: {
enabled: true,
available_providers: ["ipfs", "swarm"],
upload: {
provider: "ipfs","host": "localhost", "port": 5001
},
dappConnection: [
"$BZZ",
{provider: swarm, host: localhost, port: 8500, getUrl: "http://localhost:8500/bzzr:/"},
@iurimatias
iurimatias / embarkjs_example.js
Created June 20, 2018 15:05
embarkjs_example.js
import EmbarkJS from "Embark/EmbarkJS";
EmbarkJS.onReady(() => {
// code
});
pragma solidity ^0.4.8;
contract Token {
event Transfer(address indexed from, address indexed to, uint value);
event Approval( address indexed owner, address indexed spender, uint value);
mapping( address => uint ) _balances;
mapping( address => mapping( address => uint ) ) _approvals;
uint public _supply;
function Token( uint initial_balance ) {
@iurimatias
iurimatias / token.sol
Last active September 29, 2018 20:06
token.sol
pragma solidity ^0.4.8;
contract Token {
event Transfer(address indexed from, address indexed to, uint value);
event Approval( address indexed owner, address indexed spender, uint value);
mapping( address => uint ) _balances;
mapping( address => mapping( address => uint ) ) _approvals;
uint public _supply;
@iurimatias
iurimatias / gist:419412be3091a53d5ebd0831dbd08a3e
Created November 9, 2018 18:01
dist/contracts/SimpleStorage.json
{
"fromIndex": 0,
"args": [
100
],
"onDeploy": [
"SimpleStorage.methods.setRegistar(web3.eth.defaultAccount).send()"
],
"className": "SimpleStorage",
"code": "608060405234801561001057600080fd5b5060405160208061036c833981016040525160005560028054600160a060020a03191633179055610326806100466000396000f3006080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630917a84f81146100875780632a1afcd9146100b757806360fe47b1146100de5780636d4ce63c146100f65780639b9616791461010b578063ce01e1ec14610149578063e93314ab14610161575b600080fd5b34801561009357600080fd5b506100b573ffffffffffffffffffffffffffffffffffffffff600435166101eb565b005b3480156100c357600080fd5b506100cc610227565b60408051918252519081900360200190f35b3480156100ea57600080fd5b506100b560043561022d565b34801561010257600080fd5b506100cc610232565b34801561011757600080fd5b50610120610238565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561015557600080fd5b506100b560043561025
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/web3@1.2.5-rc.0/dist/web3.js"></script>
</head>
<body>
<script>
document.addEventListener("DOMContentLoaded", function () {
if (typeof window === 'undefined' || !window.ethereum) {
alert('noce dice')
throw new Error("no dice");
@iurimatias
iurimatias / 1_Storage.sol
Created April 14, 2020 14:54
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.1+commit.e6f7d5a4.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.7.0;
/**
* @title Storage
* @dev Store & retreive value in a variable
*/
contract Storage {
uint256 number;
@iurimatias
iurimatias / 1_Storage.sol
Created April 14, 2020 14:55
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.1+commit.e6f7d5a4.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.7.0;
/**
* @title Storage
* @dev Store & retreive value in a variable
*/
contract Storage {
uint256 number;
@iurimatias
iurimatias / 1_Storage.sol
Created April 22, 2020 19:17
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.1+commit.e6f7d5a4.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.7.0;
/**
* @title Storage
* @dev Store & retreive value in a variable
*/
contract Storage {
uint256 number;