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
cd ~ && curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh && sudo bash nodesource_setup.sh && sudo apt install nodejs -y && sudo npm i -g npm && sudo npm i -g pm2 && sudo npm i -g yarn && rm -rf nodesource_setup.sh && sudo apt update && sudo apt install nginx -y && sudo ufw allow ‘Nginx Full’ && sudo ufw status && systemctl status nginx && sudo systemctl start nginx && sudo systemctl enable nginx |
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; | |
import "https://github.com/nibbstack/erc721/src/contracts/tokens/nf-token-metadata.sol"; | |
import "https://github.com/nibbstack/erc721/src/contracts/ownership/ownable.sol"; | |
/** | |
* @dev This is an example contract implementation of NFToken with metadata extension. | |
*/ | |
contract MyArtSale is |
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
// contracts/BEP20.sol | |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
contract BEP20 is ERC20 { | |
constructor(uint256 initialSupply, string memory _name, string memory _symbol) ERC20(_name, _symbol) { | |
_mint(msg.sender, initialSupply); | |
} |
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; | |
contract BSCNS { | |
struct Record { | |
address owner; | |
string domainName; | |
uint expirationDate; | |
} |
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; | |
import "./SafeMath.sol"; | |
import "./ERC20.sol"; | |
contract ImmunXFactory { | |
using SafeMath for uint; | |
ERC20 private usdtAddress; |
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 detectEthereumProvider from '@metamask/detect-provider' | |
const provider = await detectEthereumProvider() | |
if (provider) { | |
console.log('Ethereum successfully detected!') | |
// From now on, this should always be true: | |
// provider === window.ethereum |
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
/* | |
* @dev Module Explanation - Creating a Transaction | |
* tronWeb.transactionBuilder.sendTrx(to, amount, from, options); | |
* * The Addresses uses below are randomly generated addresses | |
*/ | |
const tradeobj = await tronWeb.transactionBuilder.sendTrx("TNo9e8MWQpGVqdyySxLSTw3gjgFQWE3vfg", 100,"TM2TmqauSEiRf16CyFgzHV2BVxBejY9iyR"); | |
/* | |
* @dev Module Explanation - Signing a Transaction | |
* PRIVATE_KEY are not meant to shared public so it's better keep in environment. |
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 provider = new ethers.providers.Web3Provider(window.ethereum, "any"); | |
await provider.send("eth_requestAccounts", []); | |
const signer = provider.getSigner() | |
const usdc = { | |
address: "0x68ec573C119826db2eaEA1Efbfc2970cDaC869c4", | |
abi: [ | |
"function name() view returns (string)", | |
"function symbol() view returns (string)", | |
"function gimmeSome() external", |
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
#include <stdio.h> | |
#include <stdlib.h> | |
struct SLL{ | |
int data; | |
struct SLL *next; | |
}; | |
struct SLL *head = NULL; |
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 cluster = require("cluster"); | |
// deepcode ignore HttpToHttps: https provided on production with NGINX | |
const http = require("http"); | |
const numCPUs = require("os").cpus().length; | |
const process = require("process"); | |
const statik = require("node-static"); | |
/** | |
* @dev folder listener |