Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 6 from a total of 6 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Add Device | 6301993 | 2732 days ago | IN | 0 ETH | 0.00017386 | ||||
| Add Device | 6301991 | 2732 days ago | IN | 0 ETH | 0.00017386 | ||||
| Add Device | 6301989 | 2732 days ago | IN | 0 ETH | 0.00011361 | ||||
| Add Device | 6301982 | 2732 days ago | IN | 0 ETH | 0.00017361 | ||||
| Add Device | 6301974 | 2732 days ago | IN | 0 ETH | 0.00021733 | ||||
| Add Device | 6301972 | 2732 days ago | IN | 0 ETH | 0.00021733 |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
WyoMesh
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2018-09-09
*/
pragma solidity ^0.4.0;
contract WyoMesh {
struct Device {
string name;
bool permissioned;
// last TX hash?
//more meta data
}
struct IPFS_Hash {
string ipfs_hash;
bool auditor_signed; //
}
// need a store of the last *transaction* that a device successfully submitted - so you get a list you can scan back in the contrac twith latest -> latest -1 -> ... original.
address public auditor;
mapping(address => Device) private devices;
IPFS_Hash[] ipfs_hashes;
uint hash_index;
/// Create a new Master and auditor with $(_maxHashes) different ipfs_hashes.
constructor(uint8 _maxHashes) public {
auditor = msg.sender;
ipfs_hashes.length = _maxHashes;
devices[msg.sender].permissioned = true;
hash_index = 0;
}
/// Give $(toDevice) the right to add data on this contract
/// May only be called by $(auditor).
function addDevice(address toDevice) public returns(bool){
if (msg.sender != auditor) return false;
devices[toDevice].permissioned = true;
return true;
}
/// Submit an IPFS_Hash
function submitHash(string newIPFS_Hash) public returns(bool){
if(!devices[msg.sender].permissioned || hash_index >= ipfs_hashes.length-1) return false;
ipfs_hashes[hash_index].ipfs_hash = newIPFS_Hash;
hash_index++;
return true;
}
/// Get a submited IPFS_Hash
function getHash(uint8 index_) public returns(string){
return ipfs_hashes[index_].ipfs_hash;
}
/// Sign-off on event as a known auditor
function signAudit(uint8 index_) public returns(bool){
if(msg.sender != auditor) return false;
ipfs_hashes[index_].auditor_signed = true;
return true;
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":false,"inputs":[{"name":"index_","type":"uint8"}],"name":"signAudit","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"auditor","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"toDevice","type":"address"}],"name":"addDevice","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"index_","type":"uint8"}],"name":"getHash","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newIPFS_Hash","type":"string"}],"name":"submitHash","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_maxHashes","type":"uint8"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"}]Contract Creation Code
608060405234801561001057600080fd5b5060405160208061061c833981016040525160008054600160a060020a0319163317905560ff811661004360028261006b565b505033600090815260016020819052604082208101805460ff19169091179055600355610133565b81548183558181111561009757600202816002028360005260206000209182019101610097919061009c565b505050565b6100cf91905b808211156100cb5760006100b682826100d2565b5060018101805460ff191690556002016100a2565b5090565b90565b50805460018160011615610100020316600290046000825580601f106100f85750610116565b601f0160209004906000526020600020908101906101169190610119565b50565b6100cf91905b808211156100cb576000815560010161011f565b6104da806101426000396000f30060806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632ffc321481146100715780633ec045a6146100a0578063b111cb84146100de578063e11d57ab1461010c578063fb94bec11461019c575b600080fd5b34801561007d57600080fd5b5061008c60ff600435166101f5565b604080519115158252519081900360200190f35b3480156100ac57600080fd5b506100b5610263565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100ea57600080fd5b5061008c73ffffffffffffffffffffffffffffffffffffffff6004351661027f565b34801561011857600080fd5b5061012760ff600435166102de565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610161578181015183820152602001610149565b50505050905090810190601f16801561018e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101a857600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261008c9436949293602493928401919081908401838280828437509497506103919650505050505050565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461021d5750600061025e565b600160028360ff1681548110151561023157fe5b906000526020600020906002020160010160006101000a81548160ff021916908315150217905550600190505b919050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6000805473ffffffffffffffffffffffffffffffffffffffff1633146102a75750600061025e565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526001602081905260409091208101805460ff19168217905590565b606060028260ff168154811015156102f257fe5b60009182526020918290206002918202018054604080516001831615610100026000190190921693909304601f8101859004850282018501909352828152929091908301828280156103855780601f1061035a57610100808354040283529160200191610385565b820191906000526020600020905b81548152906001019060200180831161036857829003601f168201915b50505050509050919050565b3360009081526001602081905260408220015460ff1615806103bd575060016002805490500360035410155b156103ca5750600061025e565b8160026003548154811015156103dc57fe5b90600052602060002090600202016000019080519060200190610400929190610413565b5050600380546001908101909155919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061045457805160ff1916838001178555610481565b82800160010185558215610481579182015b82811115610481578251825591602001919060010190610466565b5061048d929150610491565b5090565b6104ab91905b8082111561048d5760008155600101610497565b905600a165627a7a72305820a14c6750ff0a2fa5917deaa724874d7f1b867116da933a1d5153773a13262af100290000000000000000000000000000000000000000000000000000000000000010
Deployed Bytecode
0x60806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632ffc321481146100715780633ec045a6146100a0578063b111cb84146100de578063e11d57ab1461010c578063fb94bec11461019c575b600080fd5b34801561007d57600080fd5b5061008c60ff600435166101f5565b604080519115158252519081900360200190f35b3480156100ac57600080fd5b506100b5610263565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100ea57600080fd5b5061008c73ffffffffffffffffffffffffffffffffffffffff6004351661027f565b34801561011857600080fd5b5061012760ff600435166102de565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610161578181015183820152602001610149565b50505050905090810190601f16801561018e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101a857600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261008c9436949293602493928401919081908401838280828437509497506103919650505050505050565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461021d5750600061025e565b600160028360ff1681548110151561023157fe5b906000526020600020906002020160010160006101000a81548160ff021916908315150217905550600190505b919050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6000805473ffffffffffffffffffffffffffffffffffffffff1633146102a75750600061025e565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526001602081905260409091208101805460ff19168217905590565b606060028260ff168154811015156102f257fe5b60009182526020918290206002918202018054604080516001831615610100026000190190921693909304601f8101859004850282018501909352828152929091908301828280156103855780601f1061035a57610100808354040283529160200191610385565b820191906000526020600020905b81548152906001019060200180831161036857829003601f168201915b50505050509050919050565b3360009081526001602081905260408220015460ff1615806103bd575060016002805490500360035410155b156103ca5750600061025e565b8160026003548154811015156103dc57fe5b90600052602060002090600202016000019080519060200190610400929190610413565b5050600380546001908101909155919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061045457805160ff1916838001178555610481565b82800160010185558215610481579182015b82811115610481578251825591602001919060010190610466565b5061048d929150610491565b5090565b6104ab91905b8082111561048d5760008155600101610497565b905600a165627a7a72305820a14c6750ff0a2fa5917deaa724874d7f1b867116da933a1d5153773a13262af10029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000010
-----Decoded View---------------
Arg [0] : _maxHashes (uint8): 16
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000010
Swarm Source
bzzr://a14c6750ff0a2fa5917deaa724874d7f1b867116da933a1d5153773a13262af1
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.