Skip to content

Instantly share code, notes, and snippets.

View agoiabel's full-sized avatar

Agoi Abel Adeyemi agoiabel

  • Aveiro Portugal
View GitHub Profile
import React, { Component } from 'react';
import styles from './App.module.css';
class App extends Component {
state = {
users: null,
total: null,
per_page: null,
/** associate without labels */
enum Trade {
case Buy(String, amount)
case Sell(String, Int)
}
Trade.Buy("Firstbank PLC", 300)
Trade.Sell("Firstbank PLC", 700)
/** associate with labels */
pragma solidity ^0.6.4;
contract Token {
...
...
mapping(address => uint) public balanceOf;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
pragma solidity ^0.6.4;
contract Token {
...
...
mapping(address => uint) public balanceOf;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
function transfer(address _to, uint _value) public returns (bool success) {
pragma solidity ^0.6.4;
contract Token {
uint public totalSupply;
mapping(address => uint) public balanceOf;
constructor(uint _totalSupply) {
totalSupply = _totalSupply;
balance[msg.sender] = _totalSupply;
}
pragma solidity ^0.6.4;
contract Token {
uint public totalSupply;
constructor(uint _totalSupply) {
totalSupply = _totalSupply;
}
}
pragma solidity ^0.6.4;
contract Token {
}
pragma solidity ^0.6.4;
contract Token {
uint public decimals = 18;
string public symbol = 'AT';
string public name = 'Agoi Token';
}
module.exports = {
networks: {
development: {
host: "127.0.0.1", // Localhost (default: none)
port: 7545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
},
},
Person {
var firstname: String
var middlename: String
var lastname: String
}
//this will definitely work because i have a middlename
let me = Person(firstname: "Abel", middlename: "abel", lastname: "Adeyemi")
//This will throw an error