This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from web3 import * | |
from hexbytes import * | |
# ^ HexBytes allows for the type identifier. | |
# Loop through all uint8 values, 0-255. | |
for i in range(0,256): | |
# It is important to hash the value the same way Solidity would. | |
# You must declare the value as a uint8 as it will change the resulting hash. | |
a = Web3.soliditySha3(['uint8'],[i]) | |
# Unneccary but provides nice feedback. Does not print value as hexbyte! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.25; | |
contract VisitorsLog{ | |
uint logCount = 0; | |
/* Create Struct */ | |
struct Guest{ | |
string _note; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.21; | |
contract OnOff{ | |
bool public kill_switch = false; | |
address Owner = msg.sender; | |
modifier IsOwner(){ | |
require(msg.sender == Owner); | |
_; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.25; | |
/*Test Solidity Upload*/ | |
contract test{ | |
uint number = 8; | |
function WhatNumber()public view returns(uint){ | |
return number; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.25; | |
/* Welcome to my submission for EthSF! | |
This is a Payroll System built for ether miners. | |
I hope you enjoy. */ | |
// # Now collected in one contract! # // | |
// # And hopefully less overflows! # // | |
//github: https://github.com/DanteAlabastro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.25; | |
contract Mapping{ | |
mapping (string => address) _Address; | |
mapping (string => uint256) _Balance; | |
mapping (string => bool) _Lock; | |
event broadcast( string ); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
letter = 'a' | |
n = 1 | |
# input - strip white space and punctuation. all lowercase. | |
# key | |
key = 'test' | |
# key as list | |
keyL = list(key) |