Skip to content

Instantly share code, notes, and snippets.

View termslang's full-sized avatar

#termslang official repo termslang

  • Mikhail Baynov
View GitHub Profile
0xc40966dd2c5af51ef1f431dc6b937ae1cab07be6
pragma solidity ^0.4.9;
contract Publication {
address public author;
address[] public sources;
address[] public referrers;
address[] public positive_reviews;
address[] public negative_reviews;
[{"constant":false,"inputs":[{"name":"amount","type":"uint256"},{"name":"token","type":"address"},{"name":"price_each","type":"uint256"},{"name":"spot","type":"uint256"}],"name":"willbuy","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"updateAvailable","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"},{"name":"user","type":"address"}],"name":"balanceApprovedForToken","outputs":[{"name":"amount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"us
Terms revision develop
Contract "ERC20 token"
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
Write 1000 to record SUPPLY.
Write 1000 to record 1 of ORIGIN CONSTANT.
Write ORIGIN CONSTANT to record OWNER.
function sleep(miliseconds) {
var currentTime = new Date().getTime();
while (currentTime + (miliseconds * 1000) >= new Date().getTime()) {
}
}
function deploy() {
0x9a35Dc994d3fF3Db2Aeab2773d7B2dd3f0B0F86E
exports.bursa_abi = [{"constant":false,"inputs":[{"name":"amount","type":"uint256"},{"name":"token","type":"address"},{"name":"price_each","type":"uint256"},{"name":"spot","type":"uint256"}],"name":"willbuy","outputs":[{"name":"","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"updateAvailable","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"},{"name":"order","type":"uint256"}],"name":"checkVolumeSell","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type
--
-- HASKELL NEW PROJECT
stack new my-project simple
stack setup
stack ghci
stack build
stack exec my-project
@termslang
termslang / report.md
Last active January 21, 2019 20:06
Михаил Байнов

Тренировочная задача


  • 1. Реализация Final Tagless на базе готового примера
    Ознакомлен с концепцией модулей в OCaml
  • 2. Ознакомление с исходным кодом проекта Tezos
    Ознакомление с реализацией примитивов в модуле lib_crypto проекта Tezos
  • 3. Функторы для модулей окэмл, модификация калькулятора
    Ознакомлен с функторами на примере Map
homebase:dht mb$ cd bin
homebase:bin mb$ make all
All done.
dune build client_server.exe
Entering directory '/Users/mb/ocaml/dht'
../scripts/peers_up.sh
Entering directory '/Users/mb/ocaml/dht'
Entering directory '/Users/mb/ocaml/dht'
Entering directory '/Users/mb/ocaml/dht'
Entering directory '/Users/mb/ocaml/dht'
homebase:bin mb$ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
EHC29: flags=0<> mtu 0