I hereby claim:
- I am pscott on github.
- I am biliklok (https://keybase.io/biliklok) on keybase.
- I have a public key ASBArWpOM9HK_CdhQ3c7WXRr3xR0IULHlG5yUQqvl91j1wo
To claim this, I am signing this object:
| # THIS IS PSEUDO CODE AND NEEDS REVIEWING | |
| # attest_data the attestation data corresponding to the attestation we're evaluating | |
| # attestation_history is a vector of ValidatorHistoricalAttestation structs | |
| def check_inner_attestations(attest_data, history_before_attest_target): | |
| inner_attestations = [] | |
| # creating a list of attestations contained between SOURCE and TARGET of attestation | |
| for prev_attest in history_before_attest_epoch: | |
| if prev_attest.target_epoch < attest_data.target.epoch: |
| trait MyTrait<U, T> { | |
| fn signing_func(&self, challenger: &U, history: &[T]) -> Result<usize, &'static str>; | |
| } | |
| impl MyTrait<TypeA, TypeB> | |
| for HistoryInfo<TypeB> | |
| { | |
| fn signing_func( | |
| &self, | |
| challenger: &TypeA, |
I hereby claim:
To claim this, I am signing this object:
| import struct | |
| import argparse | |
| from binascii import hexlify, unhexlify | |
| DEFAULT_SIGNATURE = "9A9EE708C47D8CE568D272223277FABF7C6EF6EE" | |
| DEFAULT_SIGNATURE1 = "000000013045022100DAD508227E3ABEC13A80691EE03BF64684CD87E1669E53C6B9C21403D742B4640220516824C46E3D424A7A2BA247BB0D1821754874A91C301996AA11C39321E597DB" | |
| DEFAULT_SIGNATURE2 = DEFAULT_SIGNATURE1 | |
| parser = argparse.ArgumentParser() |
| const SHORT_STR_SIZE = 31; | |
| function shortStrToFelt(str: string): bigint { | |
| let res = "0x"; | |
| if (str.length > SHORT_STR_SIZE) { | |
| // String too big | |
| return BigInt(0) | |
| } |
| %lang starknet | |
| from starkware.cairo.common.alloc import alloc | |
| from starkware.cairo.common.cairo_builtins import HashBuiltin | |
| @storage_var | |
| func _whitelist(address: felt) -> (is_valid: felt): | |
| end | |
| @external |
| const { expect } = require("chai"); | |
| import { StarknetContract} from 'hardhat/types'; | |
| import { stark } from 'starknet'; | |
| import { starknet, ethers } from 'hardhat'; | |
| describe("Tuples and type aliases", function () { | |
| it("Should work with felt", async function () { | |
| const Greeter = await starknet.getContractFactory('./contracts/starknet/test.cairo'); | |
| const greeter: StarknetContract = await Greeter.deploy(); |
| %lang starknet | |
| from openzeppelin.account.IAccount import IAccount | |
| from openzeppelin.account.library import AccountCallArray | |
| @external | |
| func foo{syscall_ptr: felt*, range_check_ptr}(target: felt, call_array_len: felt, call_array: AccountCallArray*, calldata_len: felt, calldata: felt*, nonce: felt): | |
| IAccount.__execute__(contract_address=target, call_array_len=call_array_len, call_array=call_array, calldata_len=calldata_len, calldata=calldata, nonce=nonce) | |
| return () | |
| end |