curl -L https://raw.githubusercontent.com/noir-lang/noirup/refs/heads/main/install | bash
noirup
curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/refs/heads/master/barretenberg/bbup/install | bash
bbup
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
$ ~/Projects/fe/fe-v2/target/debug/fe check . | |
error: unexpected token while parsing field definition | |
┌─ /home/irenee/Projects/fe-token-demos/master/src/ERC20.fe:5:35 | |
│ | |
5 │ pub balance: solidity::Mapping<evm::Address, u256>, | |
│ ^ unexpected token | |
│ | |
= expected a newline; found symbol `<` instead | |
error: unexpected token while parsing field definition |
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.0; | |
contract P256Verifier { | |
address constant P256_PRECOMPILE = address(0x0100); | |
/// @notice Verifies a secp256r1 signature using the EIP-7212 precompile. | |
/// @param hash The 32-byte message hash that was signed. | |
/// @param r The 32-byte r component of the signature. | |
/// @param s The 32-byte s component of the signature. |
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
use ingot::evm | |
use ingot::codec::{ Cursor, Encode, Decode } | |
use ingot::evm::{ MemBuffer } | |
use ingot::mydefault::{ MyDefault } | |
use ingot::option::{ Option } | |
// Constants for the hash table | |
const TABLE_SIZE: usize = 32 // Fixed size table | |
const EMPTY: u256 = 0 | |
const DELETED: u256 = 1 |
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
use ingot::codec::{Encode, Decode} | |
use ingot::operators::{Add, Sub, AddAssign, SubAssign} | |
use ingot::default::{Default} | |
pub trait Hasher { | |
type Output | |
fn hash<T: Encode>(mut self, key: T) -> Self::Output | |
} | |
impl Hasher for Sha1 { |
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
$ cargo install --git https://github.com/ethereum/fe.git fe-language-server | |
Updating git repository `https://github.com/ethereum/fe.git` | |
Installing fe-language-server v0.26.0 (https://github.com/ethereum/fe.git#72622894) | |
Updating crates.io index | |
Updating git repository `https://github.com/micahscopes/async-lsp` | |
Updating git repository `https://github.com/salsa-rs/salsa` | |
Locking 265 packages to latest compatible versions | |
Adding codespan-reporting v0.11.1 (available: v0.12.0) | |
Adding cranelift-entity v0.115.1 (available: v0.119.0) | |
Adding derive_more v1.0.0 (available: v2.0.1) |
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.22; | |
// Contrato ejemplo de esquema commit-reveal | |
// Consiste en el juego de "Adivina cuál número del 0 al 10 estoy pensando" | |
contract SimpleNumberGuess { | |
// Hash commitment of the secret number (capped via modulo 11) | |
bytes32 public numberCommitment; | |
// Flag que indica si el número ya fué revelado | |
bool public revealed; |
title | published | description | tags |
---|---|---|---|
Privacidad sin ZK ¿Es posible a puro Solidity? |
false |
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
use std::hash::pedersen_hash; | |
fn main(root : pub Field, | |
index : Field, | |
hash_path : [Field; 2], | |
secret: Field, priv_key: Field, | |
public_param1: pub Field, | |
public_param2: pub Field) -> pub Field | |
{ | |
let note_commitment = pedersen_hash([priv_key, secret]); |
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
6027600D60003960276000F3FE7F00000000000000000000000000000000000000000000000000000000000000105F5260205FF3 |
NewerOlder