Skip to content

Instantly share code, notes, and snippets.

View piorot's full-sized avatar
🏠
Working from home

Piotr piorot

🏠
Working from home
View GitHub Profile
/**
*Submitted for verification at Etherscan.io on 2021-09-03
*/
/**
*Submitted for verification at Etherscan.io on 2021-08-27
*/
// SPDX-License-Identifier: MIT
@piorot
piorot / Apartment.sol
Created March 29, 2022 10:35
Contract creator should have 100 shares of apartament
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract Apartment is ERC20 {
constructor() ERC20("ApartmentContract", "APRTM") {
@piorot
piorot / apartment.test.js
Created July 3, 2021 13:06
Apartment should be shareable
describe("Apartment should be shareable", () => {
it("should be possible to have an apartment distributed among several shareholders", async () => {
//arrange
const apartmentFactory = await ethers.getContractFactory("ApartmentContract");
apartment = await apartmentFactory.deploy();
await apartment.deployed();
[owner, Alice, Bob, Joe] = await ethers.getSigners();
//act