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
| # List IP address of a specific container | |
| docker inspect --format '{{.Name}} - {{ .NetworkSettings.IPAddress }}' ${CID} | |
| # List IP of all containers | |
| # $(docker ps -aq) returns an array of all container IDs | |
| # without docker-compose | |
| docker inspect -f '{{.Name}} - {{.NetworkSettings.IPAddress }}' $(docker ps -aq) | |
| # with docker-compose | |
| docker inspect -f '{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq) |
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: GPL-3.0 | |
| pragma solidity ^0.8.4; | |
| /// ogbeni | |
| error Unauthorized(); | |
| /// @custom:experimental This is an experimental contract. | |
| contract VendingMachine { | |
| address payable owner = payable(msg.sender); | |
| function withdraw() public { | |
| if (msg.sender != owner) |
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: GPL-3.0 | |
| pragma solidity ^0.8.0; | |
| contract depositing { | |
| address owner ; | |
| mapping(address => uint256) balance; |
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: GPL-3.0 | |
| pragma solidity ^0.8.0; | |
| contract vault{ | |
| // a contract where the owner create grant for a beneficiary; | |
| //allows beneficiary to withdraw only when time elapse; | |
| // allows owner to withdraw before the time elapse; | |
| // get information of a beneficiary; | |
| // amount of ethers in the smart conteact |
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.0; | |
| contract spaceEnergy{ | |
| // have total supply | |
| // tranferrable | |
| // name | |
| // symbol | |
| // decimal | |
| // user balance |
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: UNLICENSED | |
| pragma solidity ^0.8.9; | |
| contract MultiSig { | |
| ///A contract that allows 70% of validSigner to Approve before a withdrawal can be succesful | |
| address[] validSigner; | |
| uint256 ID = 1; | |
| uint256 public Quorum = 3; | |
| //maping of trnsaction Id to number of approval to status |
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.7; | |
| contract Vault { | |
| // a contract where the owner create grant for a beneficiary; | |
| // allows beneficiary to withdraw only when time elapsed | |
| // allows owner to withdraw before the time elapsed | |
| // get information of the beneficiary | |
| // amount of ethers in the smart contract |
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.7; | |
| contract Vault { | |
| // a contract where the owner create grant for a beneficiary; | |
| // allows beneficiary to withdraw only when time elapsed | |
| // allows owner to withdraw before the time elapsed | |
| // get information of the beneficiary | |
| // amount of ethers in the smart contract |
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: GPL-3.0 | |
| pragma solidity 0.8.4; | |
| contract Vault{ | |
| // a contract where the owner create grant for a beneficiary; | |
| //allows beneficiary to withdraw only when time elapse | |
| //allows owner to withdraw before time elapse | |
| //get information of a beneficiary | |
| //amount of ethers in the smart contract |
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
| require("dotenv").config({ path: ".env" }); | |
| import { BytesLike } from "ethers"; | |
| import { ethers } from "hardhat"; | |
| // import * as dotenv from "dotenv"; | |
| // import IMultiSig from "../typechain-types/Imultisig.sol" | |
| async function main() { | |
| let provider = { | |
| PrivateKey: process.env.PRIVATE_KEY as BytesLike, |
OlderNewer