Skip to content

Instantly share code, notes, and snippets.

View tlatkdgus1's full-sized avatar
🇰🇷

Ss5h tlatkdgus1

🇰🇷
View GitHub Profile
pragma solidity ^0.4.24;
contract publicNetwork{
mapping (address => uint) users;
privateNetwork public privateBlog;
event _CallbackShowForm(bytes32 _userName, bytes32 subject, bytes32 body);
function setPrivateNet(address _address){
privateBlog = privateNetwork(_address);
}
@tlatkdgus1
tlatkdgus1 / game.sol
Created October 31, 2018 05:45
sample_callback
pragma solidity ^0.4.24;
// ------------------ Public Network Part -----------------------
contract publicGame{
privateGame public privateNet;
address public privateAddr;
event _CallbackSetPlayer(uint userId, address msgSender);
event SetPlayer(bytes32 _userName, bytes32 _comment, address msgSender);
event Winner(bytes32 winnerName);
pragma solidity ^0.4.24;
contract publicNetwork{
mapping (address => uint) users;
privateNetwork public privateBlog;
function createBlog(bytes32 _nickname){
uint userId = privateBlog.createBlog(_nickname);
users[msg.sender] = userId;
}
pragma solidity ^0.4.24;
// ------------------ Public Network Part -----------------------
contract publicGame{
privateGame internal privateNet;
mapping(address => uint) userIds;
mapping(uint => address) idUsers;
mapping(uint => uint) betAmount;
.file "speculate.s"
.intel_syntax noprefix
.text
.globl speculate
.type speculate, @function
speculate:
mfence
call herring
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <immintrin.h>
#include <unistd.h>
#include <string.h>
#include <sys/syscall.h>
void speculate(const char* target, const char* detector);
uint64_t timed_read(const char* target);
INFO [11-23|10:40:26] Submitted contract creation
fullhash=0x5e899bbed2b30cc1f70c83c21610aea780212bf9709a588d7bf9f8216fb93c0c
contract=0x4a72f
miner.start()
INFO [11-23|10:40:32] Updated mining threads threads=0
INFO [11-23|10:40:32] Transaction pool price threshold updated
price=18000000000
tx_hash : 0x5e899bbed2b30cc1f70c83c21610aea780212bf9709a588d7bf9f8216fb93c0c
contract_address0x4a72fe8b80e26aef00a9a7e648ea9934ca5122d0
<web3.contract.ConciseContract object at 0x7fc312471cf8>
['kk', '', '']
Contract value: ['kk', '', '']
import json
import time
from web3 import Web3, HTTPProvider,TestRPCProvider
from solc import compile_source
from web3.contract import ConciseContract
contract_source_code = '''
pragma solidity ^0.4.11;
contract contract_log {