Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make livenet work with contracts without events #412

Closed
kubaplas opened this issue Apr 24, 2024 · 2 comments · Fixed by #464
Closed

Make livenet work with contracts without events #412

kubaplas opened this issue Apr 24, 2024 · 2 comments · Fixed by #464

Comments

@kubaplas
Copy link
Contributor

Currently, loading a contract which doesn't use CES events panics, because livenet env loads events count internally.
This makes impossible testing contracts which don't use CES.

kubaplas added a commit that referenced this issue Apr 29, 2024
@kubaplas kubaplas mentioned this issue Apr 29, 2024
@zie1ony
Copy link
Contributor

zie1ony commented May 9, 2024

You should remove querying for event count in the register contract method on HostEnv. It should be loaded lazily.

@kpob
Copy link
Contributor

kpob commented May 29, 2024

Steps to reproduce:

  1. Download some casper cep implementation eg https://github.com/casper-ecosystem/cep-78-enhanced-nft
  2. Setup a local network
  3. Deploy a contract manually, without CES support, eg
casper-client put-deploy --node-address http://localhost:11101/rpc/ \
--chain-name "casper-net-1" \
--payment-amount 500000000000 \
--secret-key ./secret_key.pem \
--session-path ./contract.wasm \
--session-arg "collection_name:string='CEP-78-collection'" \
--session-arg "collection_symbol:string='CEP78'" \
--session-arg "total_token_supply:u64='100'" \
--session-arg "ownership_mode:u8='2'" \
--session-arg "nft_kind:u8='1'" \
--session-arg "nft_metadata_kind:u8='0'" \
--session-arg "json_schema:string='nft-schema'" \
--session-arg "identifier_mode:u8='0'" \
--session-arg "metadata_mutability:u8='0'"
  1. Interact with the contract using livenet client.

@kpob kpob linked a pull request May 29, 2024 that will close this issue
@kpob kpob closed this as completed in #464 Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants