generate a random hex string in python

Posted on Thu 08 June 2023 in tech • Tagged with python, programming

Here is a simple gist that demonstrates how to generate a random hex string in Python. This is pseudo-random and designed only to be used for generating test data.


UUPS ERC-1822 Proxy Contract Implementation

Posted on Fri 21 April 2023 in tech • Tagged with solidity, programming, tutorial

Universal Upgradeable Proxy Standard UUPS ERC-1822 Tutorial and Complete Working Example

The first time I had to implement a UUPS proxy I found no clear example anywhere on the Internet. There are many trial implementations and even builders that enable one to implement a proxy in the background. It is …


Continue reading

Collective Governance Deployment to Sepolia TestNet

Posted on Mon 17 April 2023 in tech • Tagged with solidity, programming, ethereum, web3, deployment

Collective Governance 0.9.8 is deployed on Sepolia TestNet.

Sepolia TestNet

Contract Ethereum Address Version
Constant 0xD5DA9B812806E080948476A801d2004f3305E63F 0.9.8
CommunityBuilder 0x4ba7E0dc43180Cb10EF53FF9Da923E02f459Ec9F 0.9.8
GovernanceBuilder 0xe1a13ea37F2BFE35B612799fcf9eBD43efA00B87 0.9.8

Collective Governance is a smart contract that allows communities to decide outcomes on-chain. Collective Governance is also designed to …


Continue reading

Confirming GitHub commits signed by Codespaces

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

Commit signature verification is a way of ensuring that the commits you make or receive are authentic and have not been tampered with. By signing your commits with a cryptographic key, you can prove that you are the author of the code and that no one else has modified it …


Continue reading

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: