Grep-Fu - show all signatures for custom errors

Posted on Tue 07 March 2023 in tech • Tagged with solidity, programming

Grep-Fu

Custom errors are a feature of Solidity that allow you to display error messages to the user in a convenient and gas-efficient way. They are declared in the head of the contract and called after a revert statement.

error Unauthorized();
if (msg.sender != owner()) {
  revert Unauthorized();
}

However, a challenge …


Continue reading

Dynamic address set in solidity

Posted on Fri 17 February 2023 in tech • Tagged with solidity, ethereum, programming, tutorial

Dynamic Address Set

This is a complete step by step walkthrough implementation of a dynamic address set in Solidity for Ethereum blockchain.

Includes:

  • foundry
  • modifier
  • event
  • dynamic data structures
  • unit testing

  • Full project on GitHub

  • Full tutorial on YouTube:

Immediately get started developing smart contracts

Posted on Sat 28 January 2023 in tech • Tagged with solidity, docker, ethereum, foundry, collective

Immediately get started developing smart contracts using the Collective.

Full tutorial on YouTube:


Find event from Transaction Receipt

Posted on Sat 10 December 2022 in tech • Tagged with ethereum, solidity, typescript, ethers

Here is a trivial example that finds an event from a Transaction Receipt in ethers js.


Continue reading

Find past events in ethers js

Posted on Thu 08 December 2022 in tech • Tagged with ethereum, solidity, typescript, ethers

Although there are examples of getting events from a particular transaction using ethers js. I found it fairly difficult to find an example that searches for events from a particular block or transaction. Here is a code to do just that:


Continue reading

Ethers js trivial example

Posted on Mon 05 December 2022 in tech • Tagged with ethereum, solidity, typescript, ethers

The Internet is guilty of having a supreme lack of trivial functional examples. In the past trivial examples frequently functioned as the documentation for various libraries and utilities. While that was probably what we refert to now as the 'bad old days.' The modern focus on documentation and literate code …


Continue reading