Giter VIP home page Giter VIP logo

vite.js's Issues

Decoded bool always 1 (true)

Emitting the event in the contract:

event TestEvent(bool success, string successStr);

bool success = true;
emit TestEvent(success, success ? "true" : "false");
success = false;
emit TestEvent(success, success ? "true" : "false");

Decoding the event with vite-js (abi.decodeLog):

{"success": "1", "successStr":"true"}
{"success": "1", "successStr":"false"}

Expected:

  • success = "0" (when boolean is false)
  • success = "1" (when boolean is true)

Versions used:

  • @vite/vitejs: 2.3.12
  • go-vite: 2.10.2
  • solppc: 0.4.3

abi.decodeLog() isn't working properly

  1. It returns nothing if there is only one non-indexed parameter in the event.
  2. It fails to parse the first topic as the hash of the event signature for non-anonymous events.
  3. It doesn't handle anonymous events.
  4. It cannot distinguish value types and reference types for indexed params. If it's a reference type such as a string for an indexed parameter, the blake2b hash of the value is stored as a topic instead.

accountblock import error in linux

When I try to use the lib in a linux environment, I got the following error:

node_modules/@vite/vitejs/distSrc/index.ts:6:32 - error TS2307: Cannot find module './accountblock/index' or its corresponding type declarations.

import * as _accountBlock from './accountblock/index';

node_modules/@vite/vitejs/distSrc/viteAPI/index.ts:5:118 - error TS2307: Cannot find module './../accountblock/utils' or its corresponding type declarations.

import { Default_Contract_TransactionType, encodeContractList, getTransactionType, decodeContractAccountBlock } from './../accountblock/utils';

But in Windows everything works fine. I'm using the latest version

How to use quota to send accountBlock

Hi,

I'm implementing transaction auto-receive.
My account has quota (15 UT).
If use transaction.send(), or transaction.autoSend, it throws the error "out of quota".
But transaction.sendByPoW(), it works

here is my working code, please tell me how I could use quota instead of PoW

  async receiveAccountBlock(): Promise<void> {
    const transaction = new Transaction(this.address)
      .receive({ sendBlockHash: this.hash })

    transaction.setProvider(this.client)
    transaction.setHeight(`${this.previousAccountHeight + 1}`)
    transaction.setPreviousHash(this.previousHash)
    transaction.sign(PRIVATE_KEY)
    await transaction.sendByPoW(PRIVATE_KEY)
  }

module imports

Hi,

I'm getting into vite.js and noticing that most of the imports are broken in the @Vite\vitejs\dist\es5\ folder

for example:

Cannot find module 'utils/tools'
at Object.<anonymous> (C:\dev\vite-server\node_modules\@vite\vitejs\dist\es5\utils\encoder.js:4:15)

the import is:
var tools_1 = require("utils/tools");
However what would work for me is:
var tools_1 = require("./tools");

Does it have anything to do with my configuration?
I am using node v10.15.1

Thanks

Public RPC endpoints list

Hi!

Where I can find a list of public RPC endpoints? Perhaps I was looking badly, but in the documentation I could not find the relevant information.

Security vulnerability in dependency trim-newlines

Got the following security warning while importing vitejs package

$ npm audit

                       === npm audit security report ===


                                 Manual Review
             Some vulnerabilities require your attention to resolve

          Visit https://go.npm.me/audit-guide for additional guidance


  High            Regular Expression Denial of Service

  Package         trim-newlines

  Patched in      >=3.0.1 <4.0.0 || >=4.0.1

  Dependency of   @vite/vitejs

  Path            @vite/vitejs > conventional-changelog-cli >
                  conventional-changelog > conventional-changelog-core >
                  get-pkg-repo > meow > trim-newlines

  More info       https://npmjs.com/advisories/1753

found 1 high severity vulnerability in 339 scanned packages
  1 vulnerability requires manual review. See the full report for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.