Во время развертывания контракта ошибка: транзакция была отменена EVM: - PullRequest
0 голосов
/ 04 июня 2019

мой файл deploy.js:

const HDWalletProvider = require('truffle-hdwallet-provider');
const Web3 = require('web3');
const { interface, bytecode } = require('./compile');

const provider = new HDWalletProvider(
  'author wreck frown ladder bench bag inside dutch mandate pipe home extend',
  'https://rinkeby.infura.io/v3/4c368968d0004941bf8c567b4ddf93ca'
);

const web3 = new Web3(provider);

const deploy = async () => {
  const accounts = await web3.eth.getAccounts();
  console.log("Attempting to deploy from accounts",accounts[0]);
  await new web3.eth.Contract(JSON.parse(interface))
    .deploy({data: bytecode, arguments: ['Hi There!']})
    .send({gas:'1000000',from: accounts[0] });
  console.log('Contract deployed to',result.options.address);
};
deploy();

при запуске npm в терминале:

Ошибка: транзакция была отменена EVM: {"blockHash": "0xe8897e8ba4b283b198702aa9606de4d354f5b94441cf12e4b5c15a16a7514101" , "blockNumber": 4500938, "contractAddress": "0xba3294B11cc9Aa98cb0Fa0fC2F5d832093dA836B", "cumulativeGasUsed": 2783089, "от": "0x7cfe96f849eb98d7220aa5a7911926c30a019df3",
"gasUsed": 1000000., "журналы": [], "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "статус" ложь "в": нулевой, "actionHash ":" 0xaf0b95a399f60d26c3769007ed7a1a864e7f74781b56555b707dd067e3929810 "," TransactionsIndex ": 17} на SafeSubscriber._next (/home/shreyas/inbox/node_modules/62:j-sho.jd-weho-c) -c3-cd-c3-c3-c3-c3-c3-c3-c3-c3-c3-c3-c3-c3-c3-c3-c3-c3-c3-c3_c))SafeSubscriber .__ tryOrUnsub (/home/shreyas/inbox/node_modules/rxjs/internal/Subscriber.js:205:16) в SafeSubscriber.next (/home/shreyas/inbox/node_modules/rxjs/internal/Subscriber.js)) в Subscriber._next (/home/shreyas/inbox/node_modules/rxjs/internal/Subscriber.js:89:26) в Subscriber.next (/home/shreyas/inbox/node_modules/rxjs/internal/Subscriber.js:66): 18) в TransactionObserver.emitNext (/home/shreyas/inbox/node_modules/web3-core-method/dist/web3-core-method.cjs.js:454:16) в _callee2 $ (/ home / shreyas / inbox /node_modules / web3-core-method / dist / web3-core-method.cjs.js: 424: 24) в tryCatch (/home/shreyas/inbox/node_modules/regenerator-runtime/runtime.js:45:40) в Генераторе.invoke [as _invoke] (/home/shreyas/inbox/node_modules/regenerator-runtime/runtime.js:271: 22) в Generator.prototype.[как далее] (/home/shreyas/inbox/node_modules/regenerator-runtime/runtime.js:97:21) в asyncGeneratorStep (/home/shreyas/inbox/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3: 24) в _next (/home/shreyas/inbox/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9) в processTicksAndRejection (внутренняя / process / task_queues.js: 89: 5) Ошибка: транзакция выполненавернулся в EVM: { "blockHash": "0xe8897e8ba4b283b198702aa9606de4d354f5b94441cf12e4b5c15a16a7514101", "blockNumber": 4500938, "contractAddress": "0xba3294B11cc9Aa98cb0Fa0fC2F5d832093dA836B", "cumulativeGasUsed": 2783089, "от": "0x7cfe96f849eb98d7220aa5a7911926c30a019df3",
"gasUsed": +1000000, "журналы": [], "logsBloom": «0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" , "статус" ложь "в": нулевой, "transactionHash": "0xaf0b95a399f60d26c3769007ed7a1a864e7f74781b56555b707dd067e3929810", "transactionIndex": 17} на SafeSubscriber._next (/ дом / Shreyas / Входящие / node_modules / web3-ядро-метод / расстояние/web3-core-method.cjs.js:1062:32) в SafeSubscriber .__ tryOrUnsub (/home/shreyas/inbox/node_modules/rxjs/internal/Subscriber.js:205:16) в SafeSubscriber.next (/ home / shreyas)/inbox/node_modules/rxjs/internal/Subscriber.js:143:22)в Subscriber._next (/home/shreyas/inbox/node_modules/rxjs/internal/Subscriber.js:89:26) в Subscriber.next (/home/shreyas/inbox/node_modules/rxjs/internal/Subscriber.js:66:18) в TransactionObserver.emitNext (/home/shreyas/inbox/node_modules/web3-core-method/dist/web3-core-method.cjs.js:454:16) в _callee2 $ (/ home / shreyas / inbox / node_modules)/web3-core-method/dist/web3-core-method.cjs.js:424:24) в tryCatch (/home/shreyas/inbox/node_modules/regenerator-runtime/runtime.js:45:40) в Генераторе.вызвать [as _invoke] (/home/shreyas/inbox/node_modules/regenerator-runtime/runtime.js:271:22) в Generator.prototype.[как далее] (/home/shreyas/inbox/node_modules/regenerator-runtime/runtime.js:97:21) в asyncGeneratorStep (/home/shreyas/inbox/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3: 24) в _next (/home/shreyas/inbox/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9) в processTicksAndRejected (внутренний / process / task_queues.js: 89: 5)

/ home / shreyas / inbox / node_modules / solc / soljson.js: 24 (Module.asmGlobalArg, Module.asmLibraryArg, буфер); var __GLOBAL__sub_I_ABIFunctions_cpp = Module ["__ GLOBAL__sub_I_ABIFunctions_cI_AB_AB_IB_IB_B_J_LB_IB_BL_B_ _ _ _ _ _ _L_B_LB_BL_B_BL_BL_B_L_B_I_AB_BL_B_LB_BL_B_B_L_L_B_L_B_LB" ") =][ "__GLOBAL__sub_I_ABI_cpp"] = АНМ [ "__ GLOBAL__sub_I_ABI_cpp"]; вар __GLOBAL__sub_I_ASTJsonConverter_cpp = Модуль [ "__ GLOBAL__sub_I_ASTJsonConverter_cpp"] = ASM [ "__ GLOBAL__sub_I_ASTJsonConverter_cpp"]; вар __GLOBAL__sub_I_AST_cpp = Модуль [ "__ GLOBAL__sub_I_AST_cpp"] = ASM [ "__ GLOBAL__sub_I_AST_cpp"]; уаг __GLOBAL__sub_I_ArrayUtils_cpp =Модуль [ "__ GLOBAL__sub_I_ArrayUtils_cpp"] = [ассемблерный "__ GLOBAL__sub_I_ArrayUtils_cpp "]; вар __GLOBAL__sub_I_AsmAnalysis_cpp = Модуль [" __ GLOBAL__sub_I_AsmAnalysis_cpp "] = ASM [" __ GLOBAL__sub_I_AsmAnalysis_cpp "]; вар __GLOBAL__sub_I_CompilerContext_cpp = Модуль [" __ GLOBAL__sub_I_CompilerContext_cpp "] = ASM [" __ GLOBAL__sub_I_CompilerContext_cpp "]; вар __GLOBAL__sub_I_CompilerStack_cpp = Модуль [" __ GLOBAL__sub_I_CompilerStack_cpp "] = ASM ["__GLOBAL__sub_I_CompilerStack_cpp"] прервать ({}).Сборка с -s ASSERTIONS = 1 для получения дополнительной информации.

Любое решение?

...