Skip to content

Instantly share code, notes, and snippets.

View abrandec's full-sized avatar
💾

Abran DeCarlo abrandec

💾
  • 15:16 (UTC -07:00)
View GitHub Profile
@abrandec
abrandec / bitpackCounter.sol
Last active April 7, 2022 11:34
An example of adding values to a bitpack & reading them.
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.4;
import "openzeppelin-contracts/contracts/utils/Strings.sol";
/// @title bitpackCounter
/// @author Abran DeCarlo <abrandecarlo@protonmail.com>
/// @notice An example of adding values to a bitpack & reading them.
contract bitpackCounter {
using Strings for uint256;
using Strings for uint32;
@abrandec
abrandec / attestation.txt
Created April 7, 2022 00:59
Attestation
I contributed to the Semaphore Trusted Setup Multi-Party Ceremony.
The following are my contribution signatures:
Circuit: semaphore31
Contributor # 129
Hash: 63f3c949 060a764a 492609d5 f1d9ad59
8993337a 24cbbe38 f2b505ec 7fb4fd4c
57020e24 abc7f8db 9b56e3c7 43d13048
23ef63fa 435c296e cec181f8 84e2e498
@abrandec
abrandec / ArrayIterationInAssembly.sol
Last active April 6, 2022 11:27
Example on how to loop through an array in inline assembly
pragma solidity ^0.8.4;
contract ArrayIterationInAssembly {
// Interate through an array in assembly
// Copy a value into 3 elements in an array
function CopyValue3xInArray() public view returns (uint[] memory) {
uint[] memory arr = new uint[](3);
uint value = 7;