Skip to content

Instantly share code, notes, and snippets.

View gyan0890's full-sized avatar

Gyan gyan0890

View GitHub Profile
const { ethers, JsonRpcProvider } = require('ethers');
const axios = require('axios');
// Initialize ethers provider
const provider = new JsonRpcProvider('https://rpc.ankr.com/flare_coston2/7c66d8fb2d926f141f7fd511165a470c2ff3495f699afa835a4fd7f2f3bfb976');
// Replace with the desired address to get the transaction count
const address = '0xA745Cc25C9E5BB2672D26B58785f6884eF50F2c6';
//0xA745Cc25C9E5BB2672D26B58785f6884eF50F2c6
// Smart contract address and ABI
const contractAddress = '0xC67DCE33D7A8efA5FfEB961899C73fe01bCe9273';
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.2 <0.9.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
* @custom:dev-run-script ./scripts/deploy_with_ethers.ts
*/
contract ModelCheck {
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.2 <0.9.0;
/**
* @title Accountability
* @dev Create tasks with timeline and assign an accountability partner for it
*/
contract Accountability {
@gyan0890
gyan0890 / semaphore-v4-ceremony_attestation.log
Created June 12, 2024 12:26
Attestation for Semaphore V4 Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm gyan0890-27683905 and I have contributed to the Semaphore V4 Ceremony.
The following are my contribution signatures:
Circuit # 1 (semaphorev4-1)
Contributor # 78
Contribution Hash:
3a1e4c67 220fa4c7 2bc731a8 70f754bf
4d2bb264 9feb051d 7b85c4ca cb72ba0b
ac732184 0b5feba9 dc236b8b 1c0fa9d1
3e1e22c7 6dd2ff49 e2a946ce b93b40f9
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.2 <0.9.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
/**
* @title StaxerFactory
* @dev Deploy the SalaryContract, Airdrop Contract and/or VAT Contract
* @custom:dev-run-script ./scripts/deploy_with_ethers.ts
*/
@gyan0890
gyan0890 / Staxer.sol
Created March 2, 2024 05:59
Staxer-EDEN2024 Contracts
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.2 <0.9.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
/**
* @title StaxerFactory
* @dev Deploy the SalaryContract, Airdrop Contract and/or VAT Contract
* @custom:dev-run-script ./scripts/deploy_with_ethers.ts
*/
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
contract VotingContract {
address public owner;
enum State { NotStarted, InProgress, Ended }
State public currentState;
uint256 public startTime;
[
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"internalType": "string",
@gyan0890
gyan0890 / SuiReach.sol
Created October 20, 2023 17:55
Reach platform code for Unfold'23
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/utils/Counters.sol";
contract DeReach {
using Counters for Counters.Counter;
Counters.Counter private cIds; //Campaign IDs
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
/// This example demonstrates a basic use of a shared object.
/// Rules:
/// - anyone can create a campaign
/// - recepient can receive funds from the campaign
module basics::sui_reach {
use sui::transfer;
use sui::balance::{Self, Balance};