Closed NatPDeveloper closed 2 years ago
For now, we will include the crypto primitive host functions in a separate header file so this error doesn't occur for those not trying to use this feature.
@NatPDeveloper I started Leap release 3.1 without enabling crypto protocol feature, and pushed a simple contract compiled by CDT release/3.0's cdt-cpp; but I could not reproduce the problem. Could you share your contract and exact steps to reproduce the problem?
unable to reproduce at this time, not sure what changed will reopen if necessary
I'm facing this issue as well
On a fresh Ubuntu 18.04 VM
leap-3.1.0-rc4-ubuntu18.04-x86_64.deb
cdt_3.0.0-rc2_amd64.deb
cdt-cpp --abigen -I include -o dummy.wasm dummy.cpp
cleos set contract dummy $PWD dummy.wasm dummy.abi -p dummy@active
#include <eosio/crypto.hpp>
#include <eosio/eosio.hpp>
using namespace eosio;
CONTRACT dummy : public contract
{
public:
using contract::contract;
ACTION hi(name nm);
using hi_action = action_wrapper<"hi"_n, &dummy::hi>;
};
#include "dummy.hpp"
ACTION dummy::hi(name nm)
{
sha256("abc", 3);
}
If I comment this line sha256("abc", 3);
and recompile and deploy, it works just fine
This should be fixed by https://github.com/AntelopeIO/cdt/pull/21. Not sure if you could build a CDT on https://github.com/AntelopeIO/cdt/tree/expose_crypto_primitives to give it a try before it is officially released.
where can I find cleos?
Description of error:
When you run leap with the new cdt without enabling the crypto feature you get
env.sha3 unresolveable
, even when not using the feature.Steps to reproduce:
Try and deploy a new cdt contract without enabling the crypto feature.
Desired behavior:
No error and when the feature is being used, a better error code perhaps that specifies the feature that needs to be enabled.