Skip to content

Instantly share code, notes, and snippets.

@laalaguer
laalaguer / VeChainRandom.sol
Last active February 26, 2022 11:35
Random Number Generation on VeChain
pragma solidity >=0.5.3 <=0.6.4;
contract Extension {
function blake2b256(bytes memory data) public view returns(bytes32);
function blockID(uint num) public view returns(bytes32);
function blockTotalScore(uint num) public view returns(uint64);
function blockTime(uint num) public view returns(uint);
function blockSigner(uint num) public view returns(address);
function totalSupply() public view returns(uint256);
function txProvedWork() public view returns(uint256);
@Birdi7
Birdi7 / callback_data_factory_simple.py
Last active October 29, 2024 18:25
A simple example of usage of callback data factory from aiogram
"""
This is a simple example of usage of CallbackData factory
For more comprehensive example see callback_data_factory.py
"""
import asyncio
import logging
from aiogram import Bot, Dispatcher, executor, types
from aiogram.contrib.fsm_storage.memory import MemoryStorage