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 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
struct Foo { | |
value: String, | |
} | |
impl Foo { | |
#[cfg(not(target_os = "macos"))] | |
fn xxx(&mut self) { | |
self.value.push_str(".not macOS.") | |
} |
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
pragma solidity ^0.8.0; | |
interface IERC20 { | |
function totalSupply() external view returns (uint256); | |
function balanceOf(address account) external view returns (uint256); | |
function allowance(address owner, address spender) external view returns (uint256); | |
function transfer(address recipient, uint256 amount) external returns (bool); | |
function approve(address spender, uint256 amount) external returns (bool); |
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
[package] | |
name = "lola-nft" | |
version = "0.1.4" | |
authors = ["Nikita Kuznetsov <n@8gen.team>"] | |
edition = "2018" | |
[dependencies] | |
near-sdk = "4.0.0" | |
# near-sdk-sim = "4.0.0-pre.9" | |
near-contract-standards = "4.0.0" |
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
running 1 test | |
test test_claim ... ok | |
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 23.04s | |
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 os | |
import tornado.ioloop | |
import tornado.web | |
from eth_account.messages import encode_defunct | |
from eth_account.account import Account | |
PRIVATE_KEY = os.environ.get("PRIVATE_KEY") | |
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 python | |
import sys | |
import csv | |
import typing | |
import requests | |
all_owners: typing.List[str] = [] | |
contract_id = None |
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 python2 | |
# encoding: utf-8 | |
import math | |
import socket | |
import threading | |
from time import sleep, time | |
from hashlib import sha1 | |
from random import randint | |
from struct import pack, unpack | |
from socket import inet_ntoa |
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
use near_sdk::borsh::{self, BorshDeserialize, BorshSerialize}; | |
use near_sdk::collections::{LookupMap, UnorderedSet}; | |
use near_sdk::json_types::Base64VecU8; | |
use near_sdk::{near_bindgen, BorshStorageKey, PanicOnDefault, env}; | |
#[near_bindgen] | |
#[derive(BorshDeserialize, BorshSerialize, PanicOnDefault)] | |
pub struct Contract { | |
key1: LookupMap<u8, UnorderedSet<u8>>, | |
key2: LookupMap<u8, UnorderedSet<u8>>, |
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
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.8.9; | |
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; | |
contract Test { | |
address[] public routers; | |
address[] public connectors; |