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
"""contract.cairo test file.""" | |
import os | |
import pytest | |
from starkware.starknet.testing.starknet import Starknet | |
# The path to the contract source code. | |
CONTRACT_FILE = os.path.join("contracts", "contract.cairo") | |
# The testing library uses python's asyncio. So the following |
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
# Declare this file as a StarkNet contract and set the required | |
# builtins. | |
%lang starknet | |
%builtins pedersen range_check | |
from starkware.cairo.common.cairo_builtins import HashBuiltin | |
# Define a storage variable. | |
@storage_var | |
func balance() -> (res : felt): |
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
async def deploy(path): | |
contract_definition = compile_starknet_files([path], debug_info=True) | |
starknet = await Starknet.empty() | |
contract_address = await starknet.deploy(contract_definition=contract_definition) | |
contract = StarknetContract( | |
starknet=starknet, | |
abi=contract_definition.abi, | |
contract_address=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
const fetch = require('node-fetch'); | |
import { ethers } from "ethers"; | |
const sendingAccount = { | |
privateKey: '...', | |
address: '...' | |
}; | |
async function main(): Promise<void> { | |
const provider = new ethers.providers.JsonRpcProvider(); |
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
### Keybase proof | |
I hereby claim: | |
* I am martriay on github. | |
* I am martriay (https://keybase.io/martriay) on keybase. | |
* I have a public key whose fingerprint is F714 C54B 7F29 8961 0FFD D6FB 140C 0058 62C5 8D28 | |
To claim this, I am signing this object: |
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
/* | |
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses | |
Floated div edition | |
01-05-2017 | |
(c) 2017 - Loran Kloeze - loran@ralon.nl | |
This script creates a UI on top of the WhatsApp Web interface. It enumerates certain kinds | |
of information from a range of phonenumbers. It doesn't matter if these numbers are part | |
of your contact list. At the end a table is displayed containing phonenumbers, profile pics, | |
about texts and online statuses. The online statuses are being updated every |
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
var session, form, login, insert, submit, articles | |
, baseurl = 'http://54.200.215.217/' | |
; | |
document.onreadystatechange = function () { | |
if (document.readyState == 'complete') { | |
articles = document.getElementById('articles'); | |
form = document.getElementsByTagName('form')[0]; | |
login = document.getElementById('session'); | |
insert = document.getElementById('insert'); |
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
#!/usr/bin/env sh | |
help() { | |
cat <<EOF | |
Synopsis: Convert files to datauri format. | |
Usage: datauri [options] files | |
Options: |