Last active
February 24, 2025 09:29
-
Star
(153)
You must be signed in to star a gist -
Fork
(52)
You must be signed in to fork a gist
-
-
Save adrianhajdin/5f6cc61fa04de7b8fa250eb295db62fd to your computer and use it in GitHub Desktop.
Build and Deploy a Modern Web 3.0 Blockchain App | Solidity, Smart Contracts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install --save-dev hardhat @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ethers ethers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const commonStyles = "min-h-[70px] sm:px-0 px-2 sm:min-w-[120px] flex justify-center items-center border-[0.5px] border-gray-400 text-sm font-light text-white"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const main = async () => { | |
const transactionsFactory = await hre.ethers.getContractFactory("Transactions"); | |
const transactionsContract = await transactionsFactory.deploy({ value: hre.ethers.utils.parseEther("0.001") }); | |
await transactionsContract.deployed(); | |
console.log("Transactions address: ", transactionsContract.address); | |
}; | |
const runMain = async () => { | |
try { | |
await main(); | |
process.exit(0); | |
} catch (error) { | |
console.error(error); | |
process.exit(1); | |
} | |
}; | |
runMain(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap"); | |
* html { | |
padding: 0; | |
margin: 0; | |
box-sizing: border-box; | |
} | |
body { | |
margin: 0; | |
font-family: "Open Sans", sans-serif; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
} | |
.gradient-bg-welcome { | |
background-color:#0f0e13; | |
background-image: | |
radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), | |
radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), | |
radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%); | |
} | |
.gradient-bg-services { | |
background-color:#0f0e13; | |
background-image: | |
radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), | |
radial-gradient(at 50% 100%, hsla(225,39%,25%,1) 0, transparent 50%); | |
} | |
.gradient-bg-transactions { | |
background-color: #0f0e13; | |
background-image: | |
radial-gradient(at 0% 100%, hsla(253,16%,7%,1) 0, transparent 50%), | |
radial-gradient(at 50% 0%, hsla(225,39%,25%,1) 0, transparent 50%); | |
} | |
.gradient-bg-footer { | |
background-color: #0f0e13; | |
background-image: | |
radial-gradient(at 0% 100%, hsla(253,16%,7%,1) 0, transparent 53%), | |
radial-gradient(at 50% 150%, hsla(339,49%,30%,1) 0, transparent 50%); | |
} | |
.blue-glassmorphism { | |
background: rgb(39, 51, 89, 0.4); | |
border-radius: 16px; | |
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2); | |
backdrop-filter: blur(5px); | |
-webkit-backdrop-filter: blur(5px); | |
border: 1px solid rgba(0, 0, 0, 0.3); | |
} | |
/* white glassmorphism */ | |
.white-glassmorphism { | |
background: rgba(255, 255, 255, 0.05); | |
border-radius: 16px; | |
backdrop-filter: blur(5px); | |
-webkit-backdrop-filter: blur(5px); | |
border: 1px solid rgba(255, 255, 255, 0.3); | |
} | |
.eth-card { | |
background-color:#a099ff; | |
background-image: | |
radial-gradient(at 83% 67%, rgb(152, 231, 156) 0, transparent 58%), | |
radial-gradient(at 67% 20%, hsla(357,94%,71%,1) 0, transparent 59%), | |
radial-gradient(at 88% 35%, hsla(222,81%,65%,1) 0, transparent 50%), | |
radial-gradient(at 31% 91%, hsla(9,61%,61%,1) 0, transparent 52%), | |
radial-gradient(at 27% 71%, hsla(336,91%,65%,1) 0, transparent 49%), | |
radial-gradient(at 74% 89%, hsla(30,98%,65%,1) 0, transparent 51%), | |
radial-gradient(at 53% 75%, hsla(174,94%,68%,1) 0, transparent 45%); | |
} | |
.text-gradient { | |
background-color: #fff; | |
background-image: radial-gradient(at 4% 36%, hsla(0,0%,100%,1) 0, transparent 53%), radial-gradient(at 100% 60%, rgb(0, 0, 0) 0, transparent 50%); | |
-webkit-background-clip: text; | |
-webkit-text-fill-color: transparent; | |
} | |
@tailwind base; | |
@tailwind components; | |
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
purge: ["./src/**/*.{js,jsx,ts,tsx}", "./public/index.html"], | |
mode: "jit", | |
darkMode: false, // or 'media' or 'class' | |
theme: { | |
fontFamily: { | |
display: ["Open Sans", "sans-serif"], | |
body: ["Open Sans", "sans-serif"], | |
}, | |
extend: { | |
screens: { | |
mf: "990px", | |
}, | |
keyframes: { | |
"slide-in": { | |
"0%": { | |
"-webkit-transform": "translateX(120%)", | |
transform: "translateX(120%)", | |
}, | |
"100%": { | |
"-webkit-transform": "translateX(0%)", | |
transform: "translateX(0%)", | |
}, | |
}, | |
}, | |
animation: { | |
"slide-in": "slide-in 0.5s ease-out", | |
}, | |
}, | |
}, | |
variants: { | |
extend: {}, | |
}, | |
plugins: [require("@tailwindcss/forms")], | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.0; | |
import "hardhat/console.sol"; | |
contract Transactions { | |
uint256 transactionCount; | |
event Transfer(address from, address receiver, uint amount, string message, uint256 timestamp, string account, string keyword); | |
struct TransferStruct { | |
address sender; | |
address receiver; | |
uint amount; | |
string message; | |
uint256 timestamp; | |
string account; | |
string keyword; | |
} | |
TransferStruct[] transactions; | |
function transfer(address payable receiver, uint amount, string memory message, string memory account, string memory keyword) public { | |
transactionCount += 1; | |
transactions.push(TransferStruct(msg.sender, receiver, amount, message, block.timestamp, account, keyword)); | |
emit Transfer(msg.sender, receiver, amount, message, block.timestamp, account, keyword); | |
receiver.transfer(amount); | |
} | |
function getAllTransactions() public view returns (TransferStruct[] memory) { | |
return transactions; | |
} | |
function getTransactionCount() public view returns (uint256) { | |
return transactionCount; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Facing same issue any solution?