This file contains hidden or 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
contract MaceDcaManagerTest is Test { | |
MaceDcaManagerScript deployer; | |
MaceDcaManager maceDcaManager; | |
address initialOwner = 0x748DE9BFBDD651bD461a1cf95F9D8c6F7ab93B06; | |
IERC20 shmon = IERC20(0x3a98250F98Dd388C211206983453837C8365BDc1); | |
address fastlaneAddressHub = 0xC9f0cDE8316AbC5Efc8C3f5A6b571e815C021B51; | |
address payable public constant dexRouter = payable(0x5cdE7aD5D6657c09a35fE56E7D2532048728665d); | |
address user = 0x748DE9BFBDD651bD461a1cf95F9D8c6F7ab93B06; |
This file contains hidden or 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 React, { useState } from "react"; | |
import { Provider, Account, ec, number } from "starknet"; | |
const StarknetTransaction = () => { | |
const [txHash, setTxHash] = useState(null); | |
const sendTransaction = async () => { | |
try { | |
const provider = new Provider({ baseUrl: "https://alpha4.starknet.io" }); |
This file contains hidden or 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
715398979 |
This file contains hidden or 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
use starknet::ContractAddress; | |
#[derive(Copy, Clone, Drop, Debug, PartialEq, Serde, starknet::Store)] | |
pub struct UsersInfo { | |
pub name: felt252, | |
pub bio: felt252, | |
pub status: Status, | |
} | |
#[derive(Copy, Drop, Debug, PartialEq, Serde, starknet::Store)] | |
pub enum Status { |
This file contains hidden or 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
{ | |
"name": "hardhat-project", | |
"devDependencies": { | |
"@nomicfoundation/hardhat-ethers": "^3.0.6", | |
"@nomicfoundation/hardhat-ignition-ethers": "^0.15.5", | |
"@nomicfoundation/hardhat-toolbox": "^5.0.0", | |
"@nomicfoundation/hardhat-verify": "^2.0.8", | |
"@nomicfoundation/ignition-core": "^0.15.5", | |
"ethers": "^6.13.1", | |
"hardhat": "^2.22.5" |
This file contains hidden or 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: MIT | |
pragma solidity ^0.8.24; | |
contract Encoder { | |
uint public num1 = 0; | |
uint public num2 = 1; | |
function encode(string memory name) public pure returns(bytes memory){ | |
return abi.encode(name); |
This file contains hidden or 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: MIT | |
pragma solidity ^0.8.0; | |
import "./NgnNft.sol"; | |
import "./NgnToken.sol"; | |
contract NigerianContract { | |
NgnNft public ngnNft; // address 0 | |
NgnToken public ngnToken; // address 0 |
This file contains hidden or 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
// rules of my lotteery contract | |
// 1. min everybody must deposit 0.01 ether; | |
// when 100 people have deposited pick a random winner | |
// send the money to the person | |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.24; | |
contract Lottery{ | |
error InsufficentAmount(uint amountSent, uint amountExpected); |
This file contains hidden or 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: MIT | |
pragma solidity ^0.8.24; | |
// a contract that allows deposit and withdrawal of funds.... 1 | |
// modify it to become a lottery contract.... | |
// deploy it sepolia testnet | |
// verify the contract.... | |
// sepolia, mumbai, goerli,rinskeby |
This file contains hidden or 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: MIT | |
pragma solidity ~0.8.20; | |
contract ageCalculator{ | |
uint public davidAge = 0; | |
uint public ayoAge = 2; | |
uint public UgoAge = 3000; |
NewerOlder