Images are from https://www.refactoringui.com/ book
- 0° is red
- 120° is green
- 240° is blue.
Images are from https://www.refactoringui.com/ book
/** | |
* @notice Determine whether or not a given target and calldata is valid | |
* @dev In order to be valid, target and calldata must pass the allowlist conditions tests | |
* @param targetAddress The target address of the method call | |
* @param data The raw calldata of the call | |
* @return isValid True if valid, false if not | |
*/ | |
function validateCalldataByOrigin( | |
string memory originName, |
{ | |
"id": "TOKEN_APPROVE_VAULT", | |
"implementationId": "IMPLEMENTATION_YEARN_VAULTS", | |
"methodName": "approve", | |
"paramTypes": ["address", "uint256"], | |
"requirements": [ | |
["target", "isVaultUnderlyingToken"], | |
["param", "isVault", "0"] | |
] | |
} |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.2; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
contract MyToken is ERC20, Ownable { | |
constructor() ERC20("Weed", "WEED") { | |
_mint(0xCA88C5D43Bb11eDBcBC1436fEFA9d578d8D64489, 420 * 10 ** decimals()); | |
} |
If you have no other cryptos yet create and account at an exchange, for buying FTM we recommend Binance - Same link without referal code because it integrates the Fantom Opera network (the main fantom network)
After creating an account at an exchange, deposit FIAT money (that's crypto lingo for paper money) into your exchange balance
Once you have deposited funds you can either purchase FTM directly from a market or use the binance automatic converter.
Moved to: https://osu.ppy.sh/users/951875
const seed = 1234 | |
const shuffledDeck = shuffle(seed, deck) |
const { pipe, sortBy, prop, pluck } = require('ramda') | |
const shuffle = (seed, deck) => { | |
const routine = pipe( | |
deck => deck.map((card, index) => ({ | |
rank: seededRandom(seed + index), | |
card, | |
})), | |
sortBy(prop('rank')), | |
pluck('card') |
const seededRandom = seed => Math.abs(Math.sin(seed)) |
// http://ramdajs.com/docs/#pipe | |
const { pipe, curry } = require('ramda') | |
const addToTop = curry((card, deck) => [card, ...deck]) | |
const addToBottom = curry((card, deck) => [...deck, card]) | |
const addBoth = pipe( | |
addToTop({ name: 'Ice Wall', damage: 3, cost: 1 }), | |
addToBottom({ name: 'Earth Strike', damage: 6, cost: 3 }) |