Skip to content

Instantly share code, notes, and snippets.

@nicosampler
nicosampler / analysis.md
Last active April 1, 2025 18:48
real state rental

Architecture Analysis

🧠 Server Analysis

📦 Dependencies

  • Missing package-lock.json file.

🗂 Project Structure

  • For a project that requires multiple services, a monorepo or splitting the frontend and backend into separate projects is recommended.

dappBooster WETH example.

In this tutorial, we'll be developing a decentralized application (dApp) using the dappBooster starter kit. We'll be integrating with a WETH contract that has been deployed on the Sepolia testnet. This dApp will enable users to deposit and withdraw WETH.

Setup instructions

  1. Clone the dappBooster Repository: Start by cloning the dappBooster repository using the following command:

npx dappbooster

name = "greeter-foundry-nico"
version = "<%= package.version %>"
description = "Simple project to verify the functionality of cannon"
keywords = ["sample", "greeter"]
[var.main]
salt = "greeter"
msg = "my library was deployed in txn <%= contracts.library.deployTxnHash %>"
[deploy.library]
@nicosampler
nicosampler / challenge.md
Last active October 25, 2023 15:56
react/web3 challenge - Bootnode

Bootnode: react/web3 challenge

The new Web3 era has allowed us to solve old problems in a decentralized way. One such solution is the idea of payment streams, where two people can agree on how payments will work. For example, Bob agrees to pay Alice 1000 thousand USDC over six months. Once they make this agreement, a smart contract is created to handle the payments. Now, Alice can withdraw some money from this program whenever she wants, based on how much time has passed since they made the agreement. This way, Alice can get her money as time goes by.

Challenge We have develop a set of escrow smart contracts that enable the implementation of a payment system similar to the one described above. These smart contracts have already been deployed on the Sepolia chain.

TODO: Add addresses

Your task is to create a Dapp. The DApp should operate as follows:

curl --location --request POST 'https://api.thegraph.com/index-node/graphql' --data-raw '{"query":"{ indexingStatusForCurrentVersion(subgraphName: \"<SUBGRAPH-NAME>\") { subgraph fatalError { message } nonFatalErrors {message } } }"}'
@nicosampler
nicosampler / .deps...npm...@openzeppelin...contracts...token...ERC1155...ERC1155.sol
Created December 14, 2022 16:27
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.16+commit.07a7930e.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol)
pragma solidity ^0.8.0;
import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
@nicosampler
nicosampler / .deps...npm...@openzeppelin...contracts...token...ERC1155...ERC1155.sol
Created December 14, 2022 15:59
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.16+commit.07a7930e.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol)
pragma solidity ^0.8.0;
import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
@nicosampler
nicosampler / .deps...npm...@openzeppelin...contracts...token...ERC1155...ERC1155.sol
Created December 14, 2022 12:46
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.16+commit.07a7930e.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol)
pragma solidity ^0.8.0;
import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
@nicosampler
nicosampler / .deps...npm...@openzeppelin...contracts...token...ERC1155...ERC1155.sol
Created December 14, 2022 12:44
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.16+commit.07a7930e.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol)
pragma solidity ^0.8.0;
import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
@nicosampler
nicosampler / contracts...ERC1155.sol
Created December 14, 2022 12:30
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.16;
import { ERC1155 } from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import { ERC1155URIStorage } from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol";
contract ERC1155Mint is ERC1155URIStorage {
constructor() ERC1155("") {}
function mint(