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.8.0; | |
pragma experimental ABIEncoderV2; | |
contract SavingsAccount { | |
struct Member{ | |
uint id; | |
string name; | |
uint balance; | |
} | |
mapping (uint => Member) public members; | |
event savingsEvent(uint indexed _memberId); |
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.8.0; | |
contract isItContract{ | |
// this function gets the address of a contract | |
function contractAddress() public view returns (address) { | |
address theAddress = address(this); //contract address | |
return theAddress; | |
} | |
// these functions check if the address is a smartcontract | |