Arbitraries/Examples for Solidity/Ethereum types
See original GitHub issue💬 Question and Help
Hi! Im interested in implementing fast-check
for smart contract testing, allowing me to randomly create values to test different sets of functions and parameters in our smart contracts in Solidity.
Are there any examples or types that are already prepared for this that I can reuse? (like creating addresses, valid amounts, etc all compatible with Solidity/Eth types). Specifically we are using ethers.js
in our case.
A possible amount could be uint256
which max amount is : 2**256 - 1. We have to use a BigNumber library for this and I don’t see that being supported in fast-check
right?
Any help would be appreciated. Would love to be able to use this. Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Types — Solidity 0.8.17 documentation
Types . Solidity is a statically typed language, which means that the type of each variable (state and local) needs to be specified....
Read more >Solidity Cheatsheet and Best practices - Manoj
This document is a cheatsheet for Solidity that you can use to write Smart Contracts for Ethereum based blockchain. This guide is not...
Read more >HackPedia: 16 Solidity Hacks/Vulnerabilities, their Fixes and ...
This blog was written by Dr. Adrian Manning in this SigmaPrime Blog. If you are interested in IPFS, Libp2p, Ethereum, Zero-knowledge Proofs, DeFi, ......
Read more >Contracts Calling Arbitrary Functions - Program the Blockchain
In this post, I'll show how smart contracts can use low-level message passing to make arbitrary calls into other contracts. I'll use this ......
Read more >101 Smart Contracts and Decentralized Apps in Ethereum
Smart contracts are a new way to build decentralized applications in a Blockchain.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You probably want to do that:
Ideally I could do the clean-up by resetting the
mocha
/waffle
context to the one before that single test executed. But couldn’t find a way to do that. Mocking the blockchain is what im doing in the “Model” (yes im doing Model Based testing which is quite suitable for my use case). So my real test needs to be with the actual blockchain.Do you know if
mocha
provides a way to reset the context of a test which I could trigger in theafterEach
for example?Thanks for all your support!