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
| -- Seed data for indexer_metrics_api local development. | |
| -- Usage: make db-reset && make migrate && then paste this into psql | |
| -- ============================================================================ | |
| -- Blocks (one per day, spanning 2026-01-20 to 2026-02-08) | |
| -- ============================================================================ | |
| INSERT INTO blocks (block_hash, prev_block_hash, height, block_time) VALUES | |
| (decode('0000000000000000000000000000000000000000000000000000000000000001','hex'), | |
| decode('00000000000 |
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; | |
| interface IVRFCoordinator { | |
| function requestRandomNumbers(uint32 numNumbers, uint256 seed) external returns (uint256); | |
| } | |
| contract VRFBenchmark { | |
| IVRFCoordinator public constant coordinator = IVRFCoordinator(0x9d57aB4517ba97349551C876a01a7580B1338909); |
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; | |
| /* Autogenerated file. Do not edit manually. */ | |
| // Import store internals | |
| import { IStore } from "@latticexyz/store/src/IStore.sol"; | |
| import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; | |
| import { StoreCore } from "@latticexyz/store/src/StoreCore.sol"; | |
| import { Bytes } from "@latticexyz/store/src/Bytes.sol"; |
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
| $ forge init hello | |
| $ cd hello | |
| $ forge build | |
| $ forge script CounterScript --rpc-url https://testnet.riselabs.xyz --broadcast --private-key 0x123123 --via-ir | |
| $ forge verify-contract --rpc-url https://testnet.riselabs.xyz --verifier blockscout --verifier-url https://explorer.testnet.riselabs.xyz/api/ --via-ir 0x2F47eFFda91FEF070Df725704F8546DF3F3356De src/Counter.sol:Counter | |
| Start verifying contract `0x2F47eFFda91FEF070Df725704F8546DF3F3356De` deployed on 11155931 | |
| Submitting verification for [src/Counter.sol:Counter] 0x2F47eFFda91FEF070Df725704F8546DF3F3356De. | |
| Submitted contract for verification: | |
| Response: `OK` |
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.27; | |
| import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
| import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; | |
| contract MyToken is ERC20 { | |
| constructor() ERC20("My Simple ERC20", "MS") { | |
| _mint(msg.sender, 21_000_000); | |
| } |
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; | |
| import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; | |
| import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol"; | |
| import {GachaToken} from "./GachaToken.sol"; | |
| contract TwoPartyWarGame is Ownable, Pausable { | |
| enum State { NotStarted, Committed, HashPosted, Revealed, Forfeited } |
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; | |
| import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; | |
| import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol"; | |
| import {GachaToken} from "./GachaToken.sol"; | |
| contract TwoPartyWarGame is Ownable, Pausable { | |
| enum State { NotStarted, Committed, HashPosted, Revealed, Forfeited } |
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: GPL-3.0 | |
| pragma solidity >=0.7.0 <0.9.0; | |
| contract Test { | |
| uint amountCount; | |
| mapping (address org => uint amount) amountCountOrg; | |
| function deposit(uint amount, address org) public payable { | |
| require(msg.value >= 0.0001 ether, ""); | |
| amountCountOrg[org] += msg.value; |
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 'dotenv/config' | |
| import { createPublicClient, http } from 'viem' | |
| import { scrollSepolia } from 'viem/chains' | |
| import { toSimpleSmartAccount } from 'permissionless/accounts' | |
| import { createSmartAccountClient } from 'permissionless' | |
| import { createPimlicoClient } from 'permissionless/clients/pimlico' | |
| import { privateKeyToAccount } from 'viem/accounts' | |
| async function main() { | |
| const apiKey = process.env.PIMLICO_API_KEY! |
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
| irenee@fedora:~/Projects/borrame/testi$ cat Cargo.toml | |
| [package] | |
| name = "testi" | |
| version = "0.1.0" | |
| edition = "2024" | |
| [dependencies] | |
| ghost-crab = "0.10.1" | |
| irenee@fedora:~/Projects/borrame/testi$ cargo build | |
| Compiling zstd-sys v2.0.15+zstd.1.5.7 |
NewerOlder