Guest User

Untitled

a guest
Aug 19th, 2023
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. import { HardhatUserConfig } from "hardhat/config";
  2. import "@nomicfoundation/hardhat-toolbox";
  3. import 'dotenv/config';
  4.  
  5. const config: HardhatUserConfig = {
  6. solidity: {
  7. version: "0.8.19",
  8. settings: {
  9. optimizer: {
  10. enabled: false,
  11. runs: 200
  12. }
  13. }
  14. },
  15. defaultNetwork: "bsc_l1",
  16. networks: {
  17. hardhat: {
  18. loggingEnabled: false
  19. },
  20. bsc_l1: {
  21. loggingEnabled: true,
  22. url: "http://127.0.0.1:8545",
  23. chainId: 900,
  24. accounts: [
  25. "59ba8068eb256d520179e903f43dacf6d8d57d72bd306e1bd603fdb8c8da10e8", //0x04d63aBCd2b9b1baa327f2Dda0f873F197ccd186
  26. ],
  27. }
  28. }
  29. };
  30.  
  31. export default config;
  32.  
  33.  
  34. import hre from "hardhat";
  35. import { Signer, Transaction } from "ethers";
  36. import { formatEther } from "ethers";
  37. import { Minimal } from "../typechain-types";
  38. import chai, {expect} from "chai";
  39. import chaiAsPromised from "chai-as-promised";
  40. import sharp from 'sharp';
  41. import {getSvgFromTokenUri} from "./utils"
  42.  
  43. chai.use(chaiAsPromised);
  44.  
  45. describe("TestNft", function() {
  46. let nft: TestNft;
  47. let Owner: Signer;
  48.  
  49. it("should deploy Minimal contract sucessfully at low deploy costs", async () => {
  50. [Owner] = await hre.ethers.getSigners();
  51. const ownerAddress = await Owner.getAddress();
  52. const balance = await hre.ethers.provider.getBalance(ownerAddress);
  53.  
  54. console.log("Owner Address:", ownerAddress);
  55. console.log("Balance:", formatEther(balance), "ETH");
  56.  
  57. const contractFactory = await hre.ethers.getContractFactory("Minimal");
  58. const min = await contractFactory.connect(Owner).deploy() as Minimal;
  59. await min.waitForDeployment();
  60. });
  61. }
Advertisement
Add Comment
Please, Sign In to add comment