npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tokentea

v1.1.8

Published

Tea Token Testnet

Downloads

1,300

Readme

TokenTea

License: ISC

Deskripsi

TokenTea adalah proyek pengujian token untuk testnet. Proyek ini menggunakan teknologi blockchain dan smart contract untuk mengelola token.

Daftar Isi

Instalasi

Clone repositori:

git clone git@https://github.com/naufalprtm/token.git

npm install --save @openzeppelin/contracts @nomiclabs/hardhat-waffle

error?

npm install --save @openzeppelin/contracts @nomiclabs/hardhat-waffle --legacy-peer-deps or

--force saat menggunakan force sebaiknya hati-hati dan pahami vulnerabilities

Pindah ke direktori proyek:

cd tokentea

Instal dependensi:

npm install

Penggunaan

Jalankan proyek dalam mode pengembangan:

npm run dev

Aplikasi akan berjalan di http://localhost:3000.

Buat build proyek:

npm run build

Jalankan aplikasi dari build:

npm start Skrip NPM

Proyek ini dilengkapi dengan berbagai skrip NPM untuk mempermudah pengembangan, pengujian, dan lainnya. Beberapa skrip yang tersedia antara lain:

npm run lint: Jalankan linting untuk file JavaScript dan TypeScript. npm run fix: Perbaiki otomatis masalah linting. npm run format: Format kode menggunakan Prettier. npm run compile: Kompilasi smart contract. npm run test: Jalankan pengujian menggunakan Hardhat. npm run coverage: Jalankan pengujian dengan laporan cakupan. Untuk melihat daftar lengkap skrip, lihat bagian Skrip NPM.

Sepertinya ada kesalahan terkait dengan file yang terletak di dalam direktori node_modules dari proyek OpenZeppelin Contracts. Saat ini, Hardhat sedang mencoba untuk mengompilasi file yang terletak di dalam node_modules sebagai bagian dari proyek Anda, dan ini menyebabkan masalah.

Langkah-langkah yang dapat Anda lakukan:

Pastikan Anda berada di direktori proyek utama:

cd /workspace/token/token Hapus direktori node_modules dan file package-lock.json:

rm -rf node_modules rm package-lock.json Kembali ke direktori contracts:

cd contracts Clone OpenZeppelin Contracts ke dalam direktori node_modules:

git clone https://github.com/OpenZeppelin/openzeppelin-contracts.git node_modules/@openzeppelin/contracts Kembali ke direktori proyek utama:

cd .. Jalankan kembali perintah pengujian:

npx hardhat test Jika masalah masih terjadi, Anda mungkin perlu mengonfigurasi Hardhat untuk mengabaikan file di dalam node_modules saat mengompilasi. Dalam file hardhat.config.js, Anda dapat menambahkan konfigurasi berikut:

javascript

module.exports = {
  // ... konfigurasi lainnya ...
  solidity: {
    settings: {
      // Mengabaikan file di dalam node_modules saat mengompilasi
      external: {
        sources: [
          {
            path: './node_modules/@openzeppelin/contracts',
            patterns: ['*.sol'],
          },
        ],
      },
    },
  },
};

Simpan perubahan dan jalankan kembali perintah pengujian:

npx hardhat test Konfigurasi ini seharusnya membantu Hardhat untuk mengabaikan file di dalam node_modules selama proses kompilasi. Jika Anda masih mengalami masalah

Untuk mengonfigurasi Hardhat agar mengabaikan file di dalam node_modules saat proses kompilasi, Anda dapat menambahkan pengaturan eksternal dalam konfigurasi Solidity. Berikut adalah contoh konfigurasi yang dapat Anda gunakan:

require('@nomiclabs/hardhat-waffle');

module.exports = {
  solidity: {
    version: '0.8.1',
    settings: {
      optimizer: {
        enabled: true,
        runs: 200,
      },
    },
    paths: {
      sources: ['./contracts'], // Sesuaikan dengan struktur direktori proyek Anda
      tests: './test',
      cache: './cache',
      artifacts: './artifacts',
    },
    // Mengabaikan file di dalam node_modules saat mengompilasi
    external: {
      contracts: [
        {
          path: './node_modules/@openzeppelin/contracts',
          pattern: '**/*.sol',
          // Tambahkan aturan eksklusi untuk file tertentu
          exclude: ['certora/harnesses/AccessControlDefaultAdminRulesHarness.sol'],
        },
      ],
      deployments: {
        path: './node_modules/@openzeppelin/contracts',
        pattern: '**/*.sol',
      },
    },
  },
  networks: {
    hardhat: {
      chainId: 1337,
    },
    localhost: {
      url: 'http://localhost:8545', // Sesuaikan dengan port node lokal Anda
    },
  },
};

Pastikan untuk menyesuaikan nilai-nilai seperti sources, tests, cache, dan artifacts sesuai dengan struktur direktori proyek Anda. Konfigurasi ini harus membantu Hardhat untuk mengabaikan file di dalam node_modules selama proses kompilasi.

Kontribusi Anda dapat berkontribusi pada proyek ini dengan membuka pull requests dan melaporkan issues di https://github.com/naufalprtm/token/issues.

© 2024 Naufal Pratama