Giter VIP home page Giter VIP logo

everx-labs / everdev Goto Github PK

View Code? Open in Web Editor NEW
109.0 109.0 44.0 1.28 MB

TVM Development Environment - Set up all the core Developer tools and work with TVM blockchains(Everscale, TON, Venom) from a single interface

Home Page: https://docs.everos.dev/everdev/

License: Apache License 2.0

JavaScript 0.63% TypeScript 87.95% Solidity 11.42%
blockchain cli compiler everdev everscale local node solidity ton toncoin tondev venom venom-blockchain venom-developer-program

everdev's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

everdev's Issues

everdev.config.json

There are tonos-cli.config.json

It will be usefully to have something like everdev.config.json for quick deployment dev environment.

Measure consensus Nakamoto coefficient

Hi,
in order to compare the decentralisation of the consensus protocol, it would be important to know the Nakamoto coefficient, which is the measure of the smallest number of independent entities that can act collectively to block the consensus of a blockchain.
There is an interesting open source third party project that compares all major blockchains. Unfortunately, I do not have sufficient expertise to add Everscale to it. Can anyone help me in this endeavour?
Thank you

everdev contract decode-tvc error: incompatible architecture (have 'arm64', need 'x86_64')

I'm trying to run everdev contract decode-tvc on my Macbook Air:

everdev c dt container.abi.json 
Error: dlopen(/usr/local/lib/node_modules/everdev/node_modules/@eversdk/lib-node/eversdk.node, 0x0001): tried: '/usr/local/lib/node_modules/everdev/node_modules/@eversdk/lib-node/eversdk.node' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

or

everdev c dt container.tvc     
Error: dlopen(/usr/local/lib/node_modules/everdev/node_modules/@eversdk/lib-node/eversdk.node, 0x0001): tried: '/usr/local/lib/node_modules/everdev/node_modules/@eversdk/lib-node/eversdk.node' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

I have:

uname -a
Darwin Alexeys-MacBook-Air.local 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101 arm64

Also, probably there is an error in help text:

everdev c dt --help            
EverDev Version: 1.2.1
Use: everdev contract decode-tvc file
Args:
    file  ABI file
Options:
    --help, -h  Show command usage

Instead ABI file should be tvc file, right?

`tondev clang create clang --folder` doesn't create a folder

When I run tondev clang create clang --folder I expect that it will create a new folder if I specified it but it gives me an error:

Error: ENOENT: no such file or directory

If you're not going to create it then you should say this clearly in help:

tondev clang create -h
TONDev Version: 0.7.3
Use: tondev clang create name [options]
Args:
    name  Contract Name
Options:
    --help, -h  Show command usage
    --folder    Target folder (current is default)

Instead of --folder Target folder (current is default)
something like --folder Target existing folder (current is default)

`tondev clang set --compiler 7.0.0` doesn't work as expected.

I have:

tondev clang version
Component  Version  Available
---------  -------  --------------------------------------------------------------------------
clang      7.6.0    7.6.0, 7.5.0, 7.4.10, 7.4.9, 7.4.8, 7.4.7, 7.4.5, 7.4.3, 7.4.1, 7.0.0, ...

I want to use compiler version 7.0.0 which is available in the list but I can't:

tondev clang set --compiler 7.0.0
All components already up to date.

tondev clang set --compiler 7.0.0 -f doesn't help either:

tondev clang set --compiler 7.0.0 -f
Downloading from https://binaries.tonlabs.io/clang-for-tvm/clang-for-tvm-7_6_0-darwin.zip......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Component  Version  Available
---------  -------  --------------------------------------------------------------------------
clang      7.6.0    7.6.0, 7.5.0, 7.4.10, 7.4.9, 7.4.8, 7.4.7, 7.4.5, 7.4.3, 7.4.1, 7.0.0, ...
> tondev clang version
Component  Version  Available
---------  -------  --------------------------------------------------------------------------
clang      7.6.0    7.6.0, 7.5.0, 7.4.10, 7.4.9, 7.4.8, 7.4.7, 7.4.5, 7.4.3, 7.4.1, 7.0.0, ...

Package unavailable in registry

tondev on npm returns a 404

https://www.npmjs.com/package/tondev

Screenshot 2021-06-01 at 00 11 38

On the CLI

$ yarn add -D tondev
yarn add v1.22.10
[1/4] 🔍  Resolving packages...
error Received malformed response from registry for "tondev". The registry may be down.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Error: Giver <wc:address> has unknown code hash

everx-labs/evernode-se@365d6ba

for compiler v0.59.1 code hash is cca210b159ff5331643bf5b4537b37b0a68543a0704771763ed847933ceab369

https://github.com/tonlabs/everdev/blob/5ca87885b9120afcb2637285fb6282ef1eb3c77c/src/core/known-contracts.ts#L64-L65

npx everdev network giver se <wc:address> --signer giver
Error: Giver <wc:address> has unknown code hash <code_hash>

To solve this problem, there are several options:

  • add new hash codes (which may be different if the developer collects the contract on his own)
  • remove the restriction for the giver contract
  • add option force adding

🤲🟦🟥

Error ("boc":null) on deploying solidity helloWorld smart contract on TONLabs/local-node

  1. I've launched tonlabs/local-node image on my Desktop Docker (OS: Windows 10, Docker: v4.11.1).
    Successfully started web-server.

  2. Using VSCode created helloWorld contract:

everdev sol create helloWorld
everdev sol compile helloWorld.sol

While deploying contract I met some error:
everdev c i helloWorld

Configuration

  Network: se (http://localhost)
  Signer:  owner_keys (public 18c05ccc253deb1c2f3481a45f32645d66a51f6f198f1ef6811e3667d2067f30)

Address:   0:e077fd0s7a01ce9b12643fdecf24caf6cbfd39d2ca3143cbac534d8e48324020 (calculated from TVC and signer public)    
Error: Invalid parameters: invalid type: null, expected a string at line 1 column 11
params: {"boc":null}

Error: found argument 'compile' which wasn't expected, or isn't valid in this context

npx everdev sol create app
# replace uint128 amount to varuint16 amount

npx everdev sol set --compiler 0.74.0
npx everdev sol compile app.sol
Error: error: Found argument 'compile' which wasn't expected, or isn't valid in this context

USAGE:
tvm_linker <SUBCOMMAND>

For more information try --help

workaround

npx everdev sol create app
# replace uint128 amount to varuint16 amount

npx everdev sold set --version 0.74.0
export PATH=~/.everdev/sold:$PATH
sold app.sol

I can't send an external message weighing ~600kb

npx everdev cr -n main -d _randomNonce:0 build/FTDistribute distribute -i amount:'[903, 1540, 570, 1500, 547]',to:'[0:0c20ea44b8338241b3f38b812865956c2b88798cf36b7341881020c4f5361d4b, 0:c7bef77d00ac62aaee46a513a2ca07e1b6eafd5a9a5a80d4ab9555f4f4a4abd2, 0:00c1a898b5ee0c85607acea171db4ae801b421c56e079402fefc02b499814202, 0:fd58219be7923a1036bcfc89bf1c19db153064d9943d4878d7028fa89681212f, 0:12ef44aa42582d9775cf2e2607a99e94d714c57db78c074ca4f7274df937870a]'

Configuration

Network: main (mainnet.evercloud.dev)
Signer: coder (public badd982fe93f354087f03648889b8a5105cb50d05473ad7851778f782380d6fb)

Address: 0:fa39a72d4d9e789d77d4fcc4cbd6227a1fd41ccd440517a12bee6cf9e1ba1473 (calculated from TVC and signer public)

Fatal error in , line 0

Fatal JavaScript invalid size error 169220804

#FailureMessage Object: 0x309a08820
1: 0x100407f52 node::NodePlatform::GetStackTracePrinter()::$_3::__invoke() [/usr/local/bin/node]
2: 0x101583373 V8_Fatal(char const*, ...) [/usr/local/bin/node]
3: 0x10069eba6 v8::internal::FactoryBasev8::internal::Factory::NewFixedArray(int, v8::internal::AllocationType) [/usr/local/bin/node]
4: 0x100878b32 v8::internal::(anonymous namespace)::ElementsAccessorBase<v8::internal::(anonymous namespace)::FastPackedObjectElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)2> >::GrowCapacity(v8::internal::Handlev8::internal::JSObject, unsigned int) [/usr/local/bin/node]
5: 0x100ac44c8 v8::internal::Runtime_GrowArrayElements(int, unsigned long*, v8::internal::Isolate*) [/usr/local/bin/node]
6: 0x100ec3ff9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/usr/local/bin/node]
zsh: trace trap npx everdev cr -n main -d _randomNonce:0 build/FTDistribute distribute -i

Compile command suppresses compiler warnings

node -v
v16.13.2
npm i -g everdev
npx everdev sol set --compiler latest --linker latest
wget --quiet https://raw.githubusercontent.com/ilyar/everscale-escrow/56b8ab4b8c2cb69a21300aef186472e06d8473dc/Escrow.sol
npx everdev sol compile Escrow.sol
# suppresses compiler warnings

expect

~/.everdev/solidity/solc Escrow.sol
Code was generated and saved to file Escrow.code
ABI was generated and saved to file Escrow.abi.json
Warning: Have no effect in TON. Delete this.
--> /home/ilyar/np/everdev/local/Escrow.sol:30:5:
|
30 |     payable
|     ^^^^^^^

Error: Invalid solc version 0.47.0

everdev sol set --compiler 0.47.0
Error: Invalid solc version 0.47.0

also see #83

everdev sol set --compiler 0.28.0
Error: Invalid solc version 0.28.0

Add --include-path to everdev

Many contracts use interfaces and libraries from broxus and itgold that are provided as npm packages and are stored in the node_modules folder.

A typical import looks like this:

import '@itgold/everscale-tip/contracts/TIP4_1/TIP4_1Nft.sol';

solc has the flag that allows you to compile the contract to add additional directories for import resolution.

Example:

solc Nft.sol --include-path node_modules

It would be very useful to have this flag in everdev too

Example:

everdev sol compile Nft.sol --include-path node_modules

Please, add this flag to everdev.

Everdev installer doesn't work

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.3 LTS
Release:	20.04
Codename:	focal
$ node -v
v14.19.0
$ sudo npm i -g everdev
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
/usr/local/bin/everdev -> /usr/local/lib/node_modules/everdev/cli.js

> [email protected] install /usr/local/lib/node_modules/everdev/node_modules/cpu-features
> node-gyp rebuild

gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/14.19.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/everdev/node_modules/cpu-features/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/everdev/node_modules/cpu-features/.node-gyp'
gyp ERR! System Linux 5.13.0-28-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/everdev/node_modules/cpu-features
gyp ERR! node -v v14.19.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 

> [email protected] install /usr/local/lib/node_modules/everdev/node_modules/ssh2
> node install.js

gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/14.19.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/everdev/node_modules/ssh2/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/everdev/node_modules/ssh2/.node-gyp'
gyp ERR! System Linux 5.13.0-28-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "--target=v14.19.0" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/everdev/node_modules/ssh2/lib/protocol/crypto
gyp ERR! node -v v14.19.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
Failed to build optional crypto binding

> @tonclient/[email protected] postinstall /usr/local/lib/node_modules/everdev/node_modules/@tonclient/lib-node
> node install.js

Error: EACCES: permission denied, mkdir '/root/.tonlabs/binaries/1_30'
    at Object.mkdirSync (fs.js:1013:3)
    at resolveBinariesTargetPath (/usr/local/lib/node_modules/everdev/node_modules/@tonclient/lib-node/install.js:97:16)
    at main (/usr/local/lib/node_modules/everdev/node_modules/@tonclient/lib-node/install.js:111:32)
    at /usr/local/lib/node_modules/everdev/node_modules/@tonclient/lib-node/install.js:117:15
    at Object.<anonymous> (/usr/local/lib/node_modules/everdev/node_modules/@tonclient/lib-node/install.js:122:3)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12) {
  errno: -13,
  syscall: 'mkdir',
  code: 'EACCES',
  path: '/root/.tonlabs/binaries/1_30'
}
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/everdev/node_modules/cpu-features):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @tonclient/[email protected] postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @tonclient/[email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-02-07T09_00_26_395Z-debug.log

everdev contract decode-data error: TypeError: Cannot read property 'length' of undefined

Hi
I compiled a contract and deployed it to the network.
Now I'm trying to decode data from a contract deployed on the network.
With any possible arguments it gives me the same error TypeError: Cannot read property 'length' of undefined:

everdev c dd container.abi.json 
TypeError: Cannot read property 'length' of undefined

or

everdev c dd container.abi.json -n main -a 0:eb5421848ecc9129a5c16fbec91395bc495e38327f7cdc4d80560c25e654c55f
TypeError: Cannot read property 'length' of undefined

Error on npx everdev sold install

npx everdev sold install
Downloading from https://binaries.tonlabs.io/sold_0_67_0_linux.gz..............................................................................................................................................................................................................................................................................................................................................................................
Error: /home/.everdev/sold/sold: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/.everdev/sold/sold)
/home/.everdev/sold/sold: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/.everdev/sold/sold)
/home/.everdev/sold/sold: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/.everdev/sold/sold)
/home/.everdev/sold/sold: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/.everdev/sold/sold)
/home/.everdev/sold/sold: /lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.13' not found (required by /home/.everdev/sold/sold)

Error: WaitFor failed: wait_for operation did not return anything during the specified timeout

npx everdev -v
1.4.1
npx everdev se version
default: 0.36.0
npx everdev se seset
npx everdev signer add giver 172af540e43a524763dd53b26a066d472a97c4de37d5498170564510608250c3
address=0:b5e9240fc2d2f1ff8cbb1d1dee7fb7cae155e5f6320e585fcc685698994a19a5
npx everdev network giver se $address --signer giver
npx everdev sol create App
npx everdev sol update
npx everdev sol compile App.sol
npx everdev contract deploy -n se -v 5T App 

Configuration

  Network: se (http://localhost)
  Signer:  coder 

Address:   0:a3bda5b487f23e76d6a1eb2f8c3ff838c43466ac04cb3d74928cff28283d3982 (calculated from TVC and signer public)
Error: WaitFor failed: wait_for operation did not return anything during the specified timeout

and dev too

npx everdev contract deploy -n dev -v 5T App 

Configuration

  Network: dev (https://devnet-sandbox.evercloud.dev)
  Signer:  coder

Address:   0:a3bda5b487f23e76d6a1eb2f8c3ff838c43466ac04cb3d74928cff28283d3982 (calculated from TVC and signer public)
Error: WaitFor failed: wait_for operation did not return anything during the specified timeout

NPM everdev package doesn't show Warnings and Notes

Problem description.

I am using the evedev package in my vscode extension. And when I compile a contract I need to catch errors and warnings, notes too. But everdev from npm only shows errors. At the same time, the evedev in the console shows all: errors, warnings and notes. 

Broken compilation with solc 0.67.0

Environment:

Node: v18.15.0

Steps:

npx -y everdev@latest update
npx -y everdev@latest sol update
npx -y everdev@latest sol create test
npx -y everdev@latest sol compile test

Expected result:

Successfully compiled test.sol to test.tvc and test.abi.json

Actual result:

Error: --include-path option requires a non-empty base path.

I think this error occurred because solc version 0.67.0 introduced a new parameter --base-path, which is mandatory when using the --include-path option. It seems that everdev passed the value node_modules for --include-path, which caused --base-path to be required. However, it may not be possible to pass this parameter through everdev in the latest version (1.6.0).

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.