Skip to content

Instantly share code, notes, and snippets.

View derawl's full-sized avatar
🎯
Focusing

D. Rawllings derawl

🎯
Focusing
View GitHub Profile
@derawl
derawl / .deps...npm...hardhat...console.sol
Created May 4, 2022 06:45
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.6.0+commit.26b70077.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity >= 0.4.22 <0.9.0;
library console {
address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);
function _sendLogPayload(bytes memory payload) private view {
uint256 payloadLength = payload.length;
address consoleAddress = CONSOLE_ADDRESS;
assembly {
@derawl
derawl / contracts...SimpleStorage.sol
Created May 3, 2022 14:41
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.6.12+commit.27d51765.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
contract SimpleStorage{
//gets initialized to zero
uint256 favouriteNumber;
struct Person{
string name;
@derawl
derawl / contracts...SimpleStorage.sol
Created May 3, 2022 14:40
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.6.12+commit.27d51765.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
contract SimpleStorage{
//gets initialized to zero
uint256 favouriteNumber;
struct Person{
string name;
@derawl
derawl / contracts...SimpleStorageFacotry.sol
Created May 3, 2022 14:40
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.6.12+commit.27d51765.js&optimize=false&runs=200&gist=
pragma solidity ^0.6.0;
import "./SimpleStorage.sol";
contract SimpleStorageFactory is SimpleStorage{
//goals
//Create instances of the simple storage contract
//To allow users to interact with the various instances
//Users can store and retrieve data from individual contracts\