cybercongress / cybaca

Small app for huge community growth
https://etherscan.io/address/0x61B81103e716B611Fff8aF5A5Dc8f37C628efb1E#writeContract
16 stars 0 forks source link

can not get ABI with solc #1

Open abitrolly opened 5 years ago

abitrolly commented 5 years ago

npm install passed well, but getting ABI with solc fails.

➜  cyberc0n git:(master) npx solc contracts/Cybercon.sol --abi
In file included from /home/anatoli/.node-gyp/8.12.0/include/node/node.h:63,
                 from ../src/addon.cc:1:
/home/anatoli/.node-gyp/8.12.0/include/node/v8.h: In static member function ‘static void v8::V8::SetAllowCodeGenerationFromStringsCallback(v8::DeprecatedAllowCodeGenerationFromStringsCallback)’:
/home/anatoli/.node-gyp/8.12.0/include/node/v8.h:10311:19: warning: cast between incompatible function types from ‘v8::DeprecatedAllowCodeGenerationFromStringsCallback’ {aka ‘bool (*)(v8::Local<v8::Context>)’} to ‘v8::FreshNewAllowCodeGenerationFromStringsCallback’ {aka ‘bool (*)(v8::Local<v8::Context>, v8::Local<v8::String>)’} [-Wcast-function-type]
           callback));
                   ^
/home/anatoli/.node-gyp/8.12.0/include/node/v8.h: In static member function ‘static void v8::V8::RemoveGCPrologueCallback(v8::GCCallback)’:
/home/anatoli/.node-gyp/8.12.0/include/node/v8.h:10356:53: warning: cast between incompatible function types from ‘v8::GCCallback’ {aka ‘void (*)(v8::GCType, v8::GCCallbackFlags)’} to ‘v8::Isolate::GCCallback’ {aka ‘void (*)(v8::Isolate*, v8::GCType, v8::GCCallbackFlags)’} [-Wcast-function-type]
       reinterpret_cast<Isolate::GCCallback>(callback));
                                                     ^
/home/anatoli/.node-gyp/8.12.0/include/node/v8.h: In static member function ‘static void v8::V8::RemoveGCEpilogueCallback(v8::GCCallback)’:
/home/anatoli/.node-gyp/8.12.0/include/node/v8.h:10363:53: warning: cast between incompatible function types from ‘v8::GCCallback’ {aka ‘void (*)(v8::GCType, v8::GCCallbackFlags)’} to ‘v8::Isolate::GCCallback’ {aka ‘void (*)(v8::Isolate*, v8::GCType, v8::GCCallbackFlags)’} [-Wcast-function-type]
       reinterpret_cast<Isolate::GCCallback>(callback));
                                                     ^
In file included from ../src/addon.cc:2:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2208:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
In file included from ../src/addon.cc:1:
../src/addon.cc: At global scope:
/home/anatoli/.node-gyp/8.12.0/include/node/node.h:505:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE, Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
       (node::addon_register_func) (regfunc),                          \
                                           ^
/home/anatoli/.node-gyp/8.12.0/include/node/node.h:536:3: note: in expansion of macro ‘NODE_MODULE_X’
   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
   ^~~~~~~~~~~~~
../src/addon.cc:86:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(keccak, Init)
 ^~~~~~~~~~~
In file included from /home/anatoli/.node-gyp/8.12.0/include/node/node.h:63,
                 from ../src/addon.cc:1:
/home/anatoli/.node-gyp/8.12.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
/home/anatoli/.node-gyp/8.12.0/include/node/node_object_wrap.h:85:78:   required from here
/home/anatoli/.node-gyp/8.12.0/include/node/v8.h:9307:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
                reinterpret_cast<Callback>(callback), type);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/anatoli/.node-gyp/8.12.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
../../nan/nan_object_wrap.h:66:61:   required from here
/home/anatoli/.node-gyp/8.12.0/include/node/v8.h:9307:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
Cannot find module './smtchecker.js'
dzianisv commented 5 years ago

I noticed that developers forgot to commit an infura config:

$ docker run -ti --rm node bash
...
# root@ccb3bb37ee9c:/workspace/cyberc0n# node_modules/.bin/truffle compile
Error: Cannot find module './infura_rinkeby_deploy.json'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
    at Function.Module._load (internal/modules/cjs/loader.js:529:25)
    at Module.require (internal/modules/cjs/loader.js:659:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/workspace/cyberc0n/truffle.js:4:29)
    at Module._compile (internal/modules/cjs/loader.js:723:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:734:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Module.require (internal/modules/cjs/loader.js:659:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Function.Config.load (/workspace/cyberc0n/node_modules/truffle/build/webpack:/packages/truffle-config/index.js:324:1)
    at Function.Config.detect (/workspace/cyberc0n/node_modules/truffle/build/webpack:/packages/truffle-config/index.js:313:1)
    at Object.run (/workspace/cyberc0n/node_modules/truffle/build/webpack:/packages/truffle-core/lib/commands/compile.js:47:1)
    at Command.run (/workspace/cyberc0n/node_modules/truffle/build/webpack:/packages/truffle-core/lib/command.js:103:1)
    at Object.<anonymous> (/workspace/cyberc0n/node_modules/truffle/build/webpack:/packages/truffle-core/cli.js:37:1)
    at __webpack_require__ (/workspace/cyberc0n/node_modules/truffle/build/webpack:/webpack/bootstrap 56a96bb050199dd9ea24:19:1)
    at /workspace/cyberc0n/node_modules/truffle/build/webpack:/webpack/bootstrap 56a96bb050199dd9ea24:65:1
    at Object.<anonymous> (/workspace/cyberc0n/node_modules/truffle/build/cli.bundled.js:71:10)
    at Module._compile (internal/modules/cjs/loader.js:723:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:734:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:776:12)
    at executeUserCode (internal/bootstrap/node.js:342:17)
    at startExecution (internal/bootstrap/node.js:276:5)
    at startup (internal/bootstrap/node.js:227:5)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
root@ccb3bb37ee9c:/workspace/cyberc0n# find . -name infura_rinkeby_deploy.json
root@ccb3bb37ee9c:/workspace/cyberc0n# 
abitrolly commented 5 years ago

How to fix that?