Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/koko37/cappedset
Solidity Test Assignment
https://github.com/koko37/cappedset
binary-search-tree ethersjs hardhat solidity
Last synced: 4 days ago
JSON representation
Solidity Test Assignment
- Host: GitHub
- URL: https://github.com/koko37/cappedset
- Owner: koko37
- Created: 2023-10-31T09:55:14.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-01T02:07:00.000Z (about 1 year ago)
- Last Synced: 2023-11-01T11:25:57.975Z (about 1 year ago)
- Topics: binary-search-tree, ethersjs, hardhat, solidity
- Language: Solidity
- Homepage: https://goerli.etherscan.io/address/0xf43587B709Cd6E523495C718C2c499eCAC94ba51
- Size: 130 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Web3 Solidity Developer Interview Assignment
We want you to help implement a set-like structure in Solidity (using hardhat to help out) that only allows a certain amount of elements" in the set. Once you've created the Solidity contract, we want you to test it in TypeScript, not in Solidity.
## Execution
Try running some of the following tasks:```shell
npx hardhat test
REPORT_GAS=true npx hardhat testnpx hardhat --network goerli run scripts/deploy.ts
npx hardhat --network goerli verify --contract "contracts/CappedSet.sol:CappedSet" 0xf43587B709Cd6E523495C718C2c499eCAC94ba51 5
```## Contract Addresses
[0xf43587B709Cd6E523495C718C2c499eCAC94ba51](https://goerli.etherscan.io/address/0xf43587B709Cd6E523495C718C2c499eCAC94ba51)## Major Files
```
contracts/CappedSet.sol
test/CappedSet.ts
```## Notice
Please refer to `contracts/mocks/TestCappedSet.sol`. There is no way to read return values of non-view/non-pure functions from off-chain. So I used wrapper contract that executes the target function and emit result as event.