Skip to content

Instantly share code, notes, and snippets.

View 0x3bfc's full-sized avatar
🌍
Focusing

Ahmed 0x3bfc

🌍
Focusing
View GitHub Profile
pragma solidity ^0.4.25;
contract FirstContract{
uint256 private counter = 0;
event newEvent(string _value, uint256 _counter) anonymous;
function testEvent() public {
counter +=1;
emit newEvent("test event", counter);
}
}

Previously described at: ERC20 critical problems medium article.

Description.

ERC20 is the most common Ethereum token standard. It should be noted that it is also the first Ethereum's token standard as well.

It is also important that the original ERC20 proposal is a definition of token interface. EIP20 does not define a reference implementation for this token standard. Here is OpenZeppelin implementation of ERC20 token: https://github.com/OpenZeppelin/zeppelin-solidity/tree/master/contracts/token/ERC20

ERC20 token standard implementation assumes two ways of token transferring: (1) transfer function and (2) approve + transferFrom pattern.

Basic requirements:

  • 5+ years design/implementation/consulting experience with distributed applications
  • Bachelor’s degree in Computer Science/Engineering/MIS, Math or related field or equivalent experience

Preferred Qualifications

  • Intermediate/advanced knowledge of AWS services, Microsoft Azure or Google Cloud.
  • At least 2 years of hands-on software development, DevOps engineering, or systems architecture.
  • Expertise in Object Oriented Programming and Design concepts (OOP), Software Oriented Architecture (SOA)
@0x3bfc
0x3bfc / README_truebit_simple.md
Created April 2, 2018 16:57 — forked from nolash/README_truebit_simple.md
Working build configuration for truebit proof-of-concept "coindrop" example

EMSCRIPTEN SETUP

https://github.com/juj/emsdk @ 2324e5d8

  • LLVM_CMAKE_ARGS="-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly" emsdk install sdk-tag-1.37.28-64bit (be patient!)

To activate correct paths for emscripten and dependencies use:

  • ./emsdk activate sdk-tag-1.37.28-64bit
  • ./emsdk_env.sh

Keybase proof

I hereby claim:

  • I am aabdulwahed on github.
  • I am aabdulwahed (https://keybase.io/aabdulwahed) on keybase.
  • I have a public key ASDczd7By1Pgnlloa5v0v1immlNCWdnJ_wjQ9wBoWSbdWQo

To claim this, I am signing this object:

@0x3bfc
0x3bfc / telethon_error
Created February 3, 2018 19:04
ERROR - Telethon using large group ID
Traceback (most recent call last):
File "exporter.py", line 18, in <module>
chat, limit=100)
File "/usr/local/lib/python3.4/dist-packages/telethon/telegram_client.py", line 758, in get_message_history
hash=0
File "/usr/local/lib/python3.4/dist-packages/telethon/telegram_bare_client.py", line 438, in __call__
result = self._invoke(call_receive, *requests)
File "/usr/local/lib/python3.4/dist-packages/telethon/telegram_bare_client.py", line 483, in _invoke
self._sender.send(*requests)
File "/usr/local/lib/python3.4/dist-packages/telethon/network/mtproto_sender.py", line 106, in send
# For more info about the below commands check out the below links:
# https://hyperledger.github.io/composer/installing/development-tools.html
# https://hyperledger.github.io/composer/tutorials/developer-tutorial.html
curl -O https://hyperledger.github.io/composer/prereqs-ubuntu.sh
chmod u+x prereqs-ubuntu.sh
./prereqs-ubuntu.sh
@0x3bfc
0x3bfc / coro.py
Created October 28, 2017 14:14 — forked from keis/coro.py
asyncio examples
import asyncio
@asyncio.coroutine
def waiting(r):
print("hello from waiting -", r)
yield from asyncio.sleep(2)
print("bye from waiting -", r)
return r
"""Simple failure detector"""
import time
import zmq
def pingo(url, hosts, node_id):
ctx = zmq.Context.instance()
server = ctx.socket(zmq.REP)
server.bind(url)
@0x3bfc
0x3bfc / Djapi.py
Created September 28, 2017 18:52
Sample Django API
from rest_framework.generics import (ListAPIView,
RetrieveAPIView,
DestroyAPIView,
RetrieveUpdateAPIView,
CreateAPIView,
GenericAPIView,
)
from rest_framework.mixins import UpdateModelMixin, DestroyModelMixin
from rest_framework.parsers import MultiPartParser, FormParser
from rest_framework.serializers import ValidationError