This file contains 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 java.math.BigInteger; | |
import java.security.SignatureException; | |
import org.web3j.crypto.ECKeyPair; | |
import org.web3j.crypto.Keys; | |
import org.web3j.crypto.Sign; | |
import org.web3j.utils.Numeric; | |
/** | |
* This runnable demo summarizes my understanding of this gist after spending a |
This file contains 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
with erc20_value as ( | |
select | |
wallet_address, | |
sum(cast(amount_raw as double) / pow(10, p.decimals)) as balance, | |
sum(cast(amount_raw as double) / pow(10, p.decimals) * p.price) as value_usd, | |
token_address, | |
p.symbol | |
from transfers_ethereum.erc20 t | |
-- left join tokens.erc20 tok on t.token_address = tok.contract_address | |
left join prices.usd_latest p on t.token_address = p.contract_address |
This file contains 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
This is example code to generate a zk-proof that you know the ecdsa private key to either | |
1) an ecdsa public key part of a merkle set | |
2) an ethereum address part of a merkle set | |
Public inputs: | |
- Merkle root | |
- Message hash | |
Private inputs: | |
- Merkle path |