Address io1zn394ps4gu85avpm5pte9nplgd7cpcs660cvjd

Contract Overview

Balance:
0 IOTX

IOTX Value:
$ 0

Token:
Txn Hash
Block
From
To
Value [Txn Fee]
be206349a65523d8bb99134c07eb7a81a95f12867ba21c188a3cd619591e230f 23190293 2023-11-09 11:15:40 +0000 UTC 6 months ago io1e7nw00zex33s64hl0am8faxw5zvupqv2rdhve3  IN    Contract: SmartBulb 0 IOTX 0.015872
43057a76b591a51c0194b40810eef568290dcc60125b7a3e805fbcee1f33a2ff 23190269 2023-11-09 11:13:30 +0000 UTC 6 months ago io1e7nw00zex33s64hl0am8faxw5zvupqv2rdhve3  IN    Contract: SmartBulb 0 IOTX 0.015872
fa8ae649fd445faa27620ec2063c4162a4b40faa4754393494514f3614277aa5 23190260 2023-11-09 11:12:45 +0000 UTC 6 months ago io1e7nw00zex33s64hl0am8faxw5zvupqv2rdhve3  IN    Contract: SmartBulb 0 IOTX 0.032891
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SmartBulb

Compiler Version
v0.8.5+commit.a4f2e591

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

// SPDX-License-Identifier: MIT

pragma solidity 0.8.5;
// import the "Ownable" interface from OpenZepplin, that implements
//the "onlyOwner" modifier we use to make sure the contract owner
// can operate the with the light
// Title Simple Smart Bulb
// @dev Very Simple smart contract to manage the state of a smart light
// @Author PGG, RedAlertLabs
contract SmartBulb  {

    // Keeps the status of the smart bulb : true = Light is ON!
    bool public BlueLightState;
    bool public GreenLightState;
    
    // For Safety, lets initialize the state to false (Light is OFF)
    constructor ()  {
        BlueLightState = false;
        GreenLightState = false;
    }
    // Toggles the state of the blue smart bulb,
    // Only the contract Owner account can call this function!
    function toggleBlueLight() public  {

         BlueLightState = !BlueLightState; 

    }
    // Toggles the state of the blue smart bulb,
    // Only the contract Owner account can call this function!
    function toggleGreenLight() public { 

        GreenLightState = !GreenLightState; 

    }
}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BlueLightState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GreenLightState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleBlueLight","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleGreenLight","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Contract Creation Code

608060405234801561001057600080fd5b506004361061004c5760003560e01c80634a69ab39146100515780634c0d5cba1461006f57806388ac65d11461008d578063c26fe86914610097575b600080fd5b6100596100a1565b6040516100669190610129565b60405180910390f35b6100776100b4565b6040516100849190610129565b60405180910390f35b6100956100c5565b005b61009f6100f1565b005b600060019054906101000a900460ff1681565b60008054906101000a900460ff1681565b600060019054906101000a900460ff1615600060016101000a81548160ff021916908315150217905550565b60008054906101000a900460ff16156000806101000a81548160ff021916908315150217905550565b61012381610144565b82525050565b600060208201905061013e600083018461011a565b92915050565b6000811515905091905056fea264697066735822122018e2470329a6654f47739a3b3d01b2b15ccde23cb49a14faaf3bc8546128925164736f6c63430008050033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.