Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am bvalosek on github.
  • I am bvalosek (https://keybase.io/bvalosek) on keybase.
  • I have a public key whose fingerprint is 1543 A5D2 3F4A 3D73 4748 2916 4983 6DBF 3D34 69F5

To claim this, I am signing this object:

did:3:bafyreiap6e5t3vpdpptpuveam4wd3jq5igf3codrksf3nekji4v24vd34y
@bvalosek
bvalosek / MerkleMarket.sol
Created June 8, 2023 06:13
Onchain vending machine with inventory management via a Merkle list
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol";
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
struct Order {
string itemId;