Created
October 17, 2022 09:44
-
-
Save AMIYA8597/1a0cb5d108d1318866b82244e5d2f729 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.14+commit.80d49f37.js&optimize=false&runs=200&gist=
This file contains hidden or 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
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.10; | |
| contract SampleContract{ | |
| string public name; | |
| string public persona; | |
| string public company; | |
| bool public isAdmin; | |
| event DataUpdated(string name,string persona,string company,bool isAdmin); | |
| function getData() public view returns(string memory,string memory,string memory, bool){ | |
| return (name,persona,company,isAdmin); | |
| } | |
| function writeData(string memory name_, string memory persona_, string memory company_, bool isAdmin_) public { | |
| name = name_; | |
| persona = persona_; | |
| company = company_; | |
| isAdmin = isAdmin_; | |
| emit DataUpdated(name, persona, company, isAdmin); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment