Code Monkey home page Code Monkey logo

html-fund-me-f24's Introduction

html-fund-me-f24

This is a minimalistic example to illustrate how you can interactive with smart contract by browser.

Requirements

  • git
  • MetaMask
  • Vscode
  • LiveServer

Quickstart

  1. Clone the repo
git clone https://github.com/lightrao/html-fund-me-f24
cd html-fund-me-f24
code .
  1. Run the file.

You can usually just double click the file to "run it in the browser". Or you can right click the file in your VSCode and run "open with live server".

And you should see a small button that says "connect".

Connect

Hit it, and you should see metamask pop up.

Execute a transaction

I have deployed FundMe contract on sepolia for testing.

Introduction to function selectors

cast sig "fund()"
# 0xb60d4288
cast sig "withdraw()"
# 0x3ccfd60b

When you click respective button, then view MetaMask HEX DATA: 4 BYTES, you get same number:

0xb60d4288
0x3ccfd60b

cast calldata-decode

https://book.getfoundry.sh/reference/cast/cast-calldata-decode#cast-calldata-decode

html-fund-me-f24's People

Contributors

lightrao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.