Encountered another problem: if there are a lot of string type variables in Solidity contract than it's impossible to deploy contract.
Example of contract:
Strings are just random symbols, content doesn't matter.
It compiles correctly, but when you try to deploy it following error occures:
{
code: 414,
message: "Contract execution was terminated with error: compute phase isn't succeeded, exit code: -14 (out of gas). Check account balance. For more information about exit code check the contract source code or ask the contract developer",
data: {
core_version: '1.9.0',
phase: 'computeVm',
exit_code: -14,
exit_arg: 10260,
account_address: '0:bec974fd38ad880a45de4e3c6b60be6d81bc1c94a2422f616c788c48a8e25196',
gas_used: 0,
description: 'out of gas',
transaction_id: '2955686a15c1c2230db770b45fd78de5e3ece16ee3d723134692777833f6f53b',
config_servers: [ 'http://localhost:3333' ],
query_url: 'http://localhost:3333/graphql'
}
}
It can be fixed by adding constant modificator to variables. Maybe there is a problem with Solidity compiler and strings. So, valid contract looks like this:
Encountered another problem: if there are a lot of string type variables in Solidity contract than it's impossible to deploy contract. Example of contract:
Strings are just random symbols, content doesn't matter.
It compiles correctly, but when you try to deploy it following error occures:
It can be fixed by adding
constant
modificator to variables. Maybe there is a problem with Solidity compiler and strings. So, valid contract looks like this: