Skip to content

Instantly share code, notes, and snippets.

@piorot

piorot/index.ts Secret

Created March 29, 2022 10:41
Show Gist options
  • Save piorot/8b54e19e600185e737949ba7be239364 to your computer and use it in GitHub Desktop.
Save piorot/8b54e19e600185e737949ba7be239364 to your computer and use it in GitHub Desktop.
It should be possible to transfer some shares to another user
it("It should be possible to transfer some shares to another user", async () => {
const Apartment = await ethers.getContractFactory("Apartment");
const apartment = await Apartment.deploy();
[owner, Alice] = await ethers.getSigners();
await apartment.deployed();
await apartment.transfer(Alice.address, 20);
expect(await apartment.balanceOf(Alice.address)).to.equal(20);
expect(await apartment.balanceOf(owner.address)).to.equal(80);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment