Follow these steps to fund a NEAR Drop for a user:
- Instantiate a near-api-js connection
const { connect, KeyPair } = require('nearlib');
const near = await connect({
deps: { keyStore },
| pragma solidity ^0.5.1; | |
| contract Factory { | |
| function createExchange(address token) public returns (address); | |
| function getExchange(address token_addr) public view returns (address); | |
| function getToken(address exchange) public view returns (address); | |
| function getTokenWithId(uint256 token_id) public view returns (address); | |
| } | |
| pragma solidity ^0.4.0; | |
| import "SafeMath.sol"; | |
| import "IERC20Token.sol"; | |
| /** | |
| * @dev Implements a capped token sale using a second-price auction. | |
| * | |
| * @author Nick Johnson <[email protected]> | |
| * |
| (defn fizzbuzz [start end] | |
| (map | |
| #(if (and (= 0 (mod % 3))(= 0 (mod % 5))) "Fizzbuzz" | |
| (if (= 0 (mod % 3)) "Fizz" | |
| (if (= 0 (mod % 5)) "Buzz" %))) | |
| (range start end) | |
| ) | |
| ) |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Calculator.js</title> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> | |
| <script src="http://fb.me/react-0.12.2.js"></script> | |
| <script src="http://fb.me/JSXTransformer-0.12.2.js"></script> | |
| <script src="http://code.jquery.com/jquery-1.10.0.min.js"></script> | |
| <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> | |
| </head> |
| def calculate_qbr(completions, pass_attempts, passing_yards, touchdowns, interceptions): | |
| first_delta = ((float(completions)/pass_attempts) - 0.3)*5 | |
| if first_delta > 2.375: | |
| first_delta = 2.375 | |
| elif first_delta < 0: | |
| first_delta = 0 | |
| second_delta = ((float(passing_yards)/pass_attempts) - 3)*0.25 | |
| if second_delta > 2.375: | |
| second_delta = 2.375 |