Taken from StackExchange
Thanks to LangLangC
For temperature and other improvements see https://gist.github.com/cdleon/d16e7743e6f056fedbebc329333d79df
Taken from StackExchange
Thanks to LangLangC
For temperature and other improvements see https://gist.github.com/cdleon/d16e7743e6f056fedbebc329333d79df
$body = new \Square\Models\CreateOrderRequest; | |
//Add 5 of the same line items | |
//We are creating them dynamically | |
$qty = 5; | |
$lineItem = new \Square\Models\OrderLineItem($qty); | |
$lineItem->setName('Latte'); | |
$money = new \Square\Models\Money; | |
$money->setCurrency('CAD'); | |
//Amount in Cents e.g. $5.50 |
let pancakeSwapAbi = [ | |
{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"}, | |
]; | |
let tokenAbi = [ | |
{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}, | |
]; | |
const Web3 = require('web3'); | |
/* | |
Required Node.js |
REMIX EXAMPLE PROJECT | |
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer. | |
It contains 3 directories: | |
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. | |
2. 'scripts': Holds two scripts to deploy a contract. It is explained below. | |
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity. | |
SCRIPTS |
Install Xampp from https://www.apachefriends.org/index.html