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
// TODO: how include from different files? | |
extern { | |
// TODO: is it possible to use the same name for different functions? | |
fn usize_as_u256(_ value: usize) -> u256 | |
fn u8_as_u256(_ value: u8) -> u256 | |
fn u256_as_usize(_ value: u256) -> usize | |
fn todo() -> ! | |
} | |
use ingot::evm |
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
// TODO: how include from different files? | |
extern { | |
// TODO: is it possible to use the same name for different functions? | |
fn usize_as_u256(_ value: usize) -> u256 | |
fn u8_as_u256(_ value: u8) -> u256 | |
fn u256_as_usize(_ value: u256) -> usize | |
fn todo() -> ! | |
} | |
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
// We'll use the official node-telegram-bot-api library to interact with the Telegram API and ethers to verify the signature | |
const TelegramBot = require("node-telegram-bot-api"); | |
const { ethers } = require("ethers"); | |
require("dotenv").config(); | |
const express = require("express"); | |
const cors = require("cors"); | |
const bot = new TelegramBot(process.env.BOT_TOKEN, { polling: true }); | |
const CHAIN_ID = process.env.CHAIN_ID; | |
const WEB_DAPP_URL = process.env.WEB_DAPP_URL; |
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
mod std { | |
pub mod evm { | |
pub type Address = u256 | |
pub struct Wei { value: usize } | |
pub struct Ptr { pub location: usize } | |
pub struct Buf { pub offset: Ptr, pub len: usize } | |
const HASH_SCRATCH_OFFSET: u256 = 0x0 | |
extern { | |
pub fn __call(gas: Wei, address: Address, value: Wei, args: Buf, ret: Buf) | |
pub fn __mstore(_ loc: u256, _ data: u256) |
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
mod std { | |
pub mod evm { | |
pub type Address = u256 | |
pub struct Wei { value: usize } | |
pub struct Ptr { pub location: usize } | |
pub struct Buf { pub offset: Ptr, pub len: usize } | |
const HASH_SCRATCH_OFFSET: u256 = 0x0 | |
extern { | |
pub fn __call(gas: Wei, address: Address, value: Wei, args: Buf, ret: Buf) | |
pub fn __mstore(_ loc: u256, _ data: u256) |
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
// std/evm.fe | |
mod std { | |
pub mod evm { | |
pub type Address = u256 | |
pub struct Wei { value: usize } | |
pub struct Ptr { pub location: usize } | |
pub struct Buf { pub offset: Ptr, pub len: usize } | |
const HASH_SCRATCH_OFFSET: u256 = 0x0 | |
extern { | |
pub fn __call(gas: Wei, address: Address, value: Wei, args: Buf, ret: Buf) |
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
## Install | |
sudo dnf install ffmpeg | |
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm | |
sudo dnf install ffmpeg | |
sudo dnf install python3 python3-pip | |
pip install openai-whisper |
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.23; | |
import { IEAS, AttestationRequest, AttestationRequestData, RevocationRequest, RevocationRequestData } from "@ethereum-attestation-service/eas-contracts/contracts/IEAS.sol"; | |
import { NO_EXPIRATION_TIME, EMPTY_UID } from "@ethereum-attestation-service/eas-contracts/contracts/Common.sol"; | |
contract SwapAttestation | |
{ | |
address easAddress = 0xaEF4103A04090071165F78D45D83A0C0782c2B2a; |
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
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production. | |
- using env: export GIN_MODE=release | |
- using code: gin.SetMode(gin.ReleaseMode) | |
[GIN-debug] GET /debug/pprof/ --> github.com/gin-contrib/pprof.RouteRegister.WrapF.func1 (2 handlers) | |
[GIN-debug] GET /debug/pprof/cmdline --> github.com/gin-contrib/pprof.RouteRegister.WrapF.func2 (2 handlers) | |
[GIN-debug] GET /debug/pprof/profile --> github.com/gin-contrib/pprof.RouteRegister.WrapF.func3 (2 handlers) | |
[GIN-debug] POST /debug/pprof/symbol --> github.com/gin-contrib/pprof.RouteRegister.WrapF.func4 (2 handlers) | |
[GIN-debug] GET /debug/pprof/symbol --> github.com/gin-contrib/pprof.RouteRegister.WrapF.func5 (2 handlers) | |
[GIN-debug] GET /debug/pprof/trace --> github.com/gin-contrib/pprof.RouteRegister.WrapF.func6 (2 handlers) |
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 L1ArrayDemo { | |
uint[5] myArray; | |
constructor() { | |
myArray[0] = 10; | |
myArray[1] = 20; | |
myArray[2] = 30; |