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.0; | |
interface AggregatorV3Interface { | |
function decimals() external view returns (uint8); | |
function description() external view returns (string memory); | |
function version() external view returns (uint256); |
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 std::fs; | |
use std::path::Path; | |
fn list_files(path: &Path) { | |
let metadata = match fs::metadata(path) { | |
Ok(metadata) => metadata, | |
Err(_) => return, | |
}; | |
if metadata.is_file() { |
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 NETWORKID = "testnet04"; | |
/** | |
* Check if is X-Wallet installed | |
*/ | |
const isXWalletInstalled = () => { | |
const { kadena } = window; | |
return Boolean(kadena && kadena.isKadena); | |
}; | |
const initialize = async () => { |
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 HELP = `Usage example: \n\nnode transfer-create.js k:{public-key} amount -- Replace {public-key} with an actual key`; | |
import Pact from "pact-lang-api" | |
const NETWORK_ID = 'development'//'testnet04'; | |
const CHAIN_ID = '0'; | |
const API_HOST = `http://localhost:8080/chainweb/0.0/${NETWORK_ID}/chain/${CHAIN_ID}/pact`; | |
const KEY_PAIR = { | |
publicKey: "368820f80c324bbc7c2b0610688a7da43e39f91d118732671cd9c7500ff43cca", | |
secretKey: "251a920c403ae8c8f65f59142316af3c82b631fba46ddea92ee8c95035bd2898" | |
}; |
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: GPL-3.0 | |
pragma solidity >=0.4.22 <0.9.0; | |
library TestsAccounts { | |
function getAccount(uint index) pure public returns (address) { | |
address[15] memory accounts; | |
accounts[0] = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4; | |
accounts[1] = 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2; |
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: GPL-3.0 | |
pragma solidity >=0.4.22 <0.9.0; | |
library TestsAccounts { | |
function getAccount(uint index) pure public returns (address) { | |
address[15] memory accounts; | |
accounts[0] = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4; | |
accounts[1] = 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2; |
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: GPL-3.0 | |
pragma solidity >=0.4.22 <0.9.0; | |
library TestsAccounts { | |
function getAccount(uint index) pure public returns (address) { | |
address[15] memory accounts; | |
accounts[0] = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4; | |
accounts[1] = 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2; |
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
// Sells B for BNB from pancakeswap for address ${targetAccounts[targetIndex].address} | |
var fs = require('fs') | |
var Tx = require('ethereumjs-tx').Transaction; | |
var Web3 = require('web3') | |
var Common = require('ethereumjs-common').default; | |
const ankrlRpcUrl = 'https://rpc.ankr.com/bsc/'; | |
var web3 = new Web3(new Web3.providers.HttpProvider(ankrlRpcUrl)) |
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 main | |
import "fmt" | |
// List represents a singly-linked list that holds | |
// values of any type. | |
type List[T comparable] struct { | |
next *List[T] | |
val T | |
} |
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 main | |
import "golang.org/x/tour/pic" | |
import "image" | |
import "image/color" | |
type Image struct{ | |
w int | |
h int | |
} |
NewerOlder