Coder Social home page Coder Social logo

koko37 / cappedset Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 133 KB

Solidity Test Assignment

Home Page: https://goerli.etherscan.io/address/0xf43587B709Cd6E523495C718C2c499eCAC94ba51

Solidity 66.40% TypeScript 33.60%
ethersjs hardhat solidity binary-search-tree

cappedset's Introduction

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:

npx hardhat test
REPORT_GAS=true npx hardhat test

npx hardhat --network goerli run scripts/deploy.ts
npx hardhat --network goerli verify --contract "contracts/CappedSet.sol:CappedSet" 0xf43587B709Cd6E523495C718C2c499eCAC94ba51 5

Contract Addresses

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.