casper-network / condor-info

Casper 2.0 technical outreach
Apache License 2.0
3 stars 2 forks source link

[Condor-Release]: Interpreter error: host module doesn't export function with name `casper_add_contract_version` #93

Open devendran-m opened 1 month ago

devendran-m commented 1 month ago

Category

Request for Tech Support

Your email address

nana.okada@broadleaf.co.jp

Project Name(Optional)

BroadLeaf

Casper Network

Devnet

Priority

Medium

Node Functionality

Node

Description

According to the output on Devnet, error_message:"Interpreter error: host module doesn't export function with name casper_add_contract_version", whilst the same deploy process with the same contract on Tesnet has been successful, it is likely that updating our smart contract will be required.

Would that be true? If so, where should I look for the related information besides this, casper-contract-4.0.0 > Function casper_contract::contract_api::storage::add_contract_version ?

Note that storage::add_contract_version(contract_package_hash, entry_points, Default::default()); is used in our source code.

If you could provide us tips on this, that would be appreciated.

Date Issue Began(optional)

No response

Attachments (optional)

No response

sczembor commented 1 month ago

The arguments for that host function have changed. This is how it looks now

pub fn add_contract_version(
    package_hash: PackageHash,
    entry_points: EntryPoints,
    named_keys: NamedKeys,
    message_topics: BTreeMap<String, MessageTopicOperation>,
) -> (AddressableEntityHash, EntityVersion)

So the error does make sense. For more details please refer to casper-node. An example of usage in cep-18

na-OKADA commented 1 month ago

Thanks! @sczembor ! I'll let you know that when it run successfully ;)

cspramit commented 1 month ago

Hi @na-OKADA can you update if it works now

na-OKADA commented 1 month ago

Hi @cspramit Unfortunately, it still keeps failing, https://devnet.make.services/deploys/3457da646f4d925ff1c2e669937b1e80e09b26c64c3e94e54a9cfb1f337adc5b.

In the next internal meeting, the contract developer may be able to help. In the meanwhile, if you have any other tips on that, please let me know.

na-OKADA commented 1 month ago

Hi, error_message:"Wasm preprocessing error: Deserialization error: Invalid table reference (128)"

Where am I supposed to modify to solve this error which I encountered in deploying our smart contract on to Devnet, https://devnet.make.services/deploys/194988146d2e9beea5a0ad16245dbb15fa34d2ad5837f27192cbb280c38761a3?

na-OKADA commented 1 month ago

Can we still use amount: i64 ?

na-OKADA commented 1 month ago

If you need to look through our code, please let us share in private such as email. @devendran-m

na-OKADA commented 5 days ago

Hi, one of our developers helped to modify our smart contract code and it is successfully deployed on to Devnet, here though, we are looking for a way to obtain its contract hash.

According to this, it looks like that "contract hash" has been deprecated....

Can you help on that?

na-OKADA commented 4 days ago

Hi, one of our developers helped to modify our smart contract code and it is successfully deployed on to Devnet, here though, we are looking for a way to obtain its contract hash.

According to this, it looks like that "contract hash" has been deprecated....

Can you help on that?

->Resolved! I found "key:"entity-contract-c11a xxxxxx". Jiuhong helped.

devendran-m commented 4 days ago

Thanks, @na-OKADA and @Jiuhong-casperlabs