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

Feat/add lightnet #98

Closed
wants to merge 26 commits into from
Closed

Feat/add lightnet #98

wants to merge 26 commits into from

Conversation

MartinMinkov
Copy link
Contributor

No description provided.

This commit introduces a new contract.ts file in the zkapp directory. This file contains the logic for a HelloWorld smart contract, including state variables, methods, and events.

feat(zkapp): add tsconfig.test.json for TypeScript configuration
This commit also adds a new tsconfig.test.json file in the zkapp directory. This file contains the TypeScript configuration for the test environment.
…t files using its specific tsconfig.test.json file
… to ensure compatibility with testing frameworks
This script includes the following functionalities:
- Network configuration
- Fee payer setup
- zkApp compilation and deployment
- zkApp state update
- zkApp event emissions
- zkApp action emissions and reductions
- Tear down

This script is essential for testing and running the zkApp smart contract operations.
…nhance security

fix(contract.ts): replace account.delegate.set with actionState.set to correct state initialization
refactor(contract.ts): remove admin parameter from update method to simplify function signature
refactor(contract.ts): refactor reduceStructAction method for better readability and maintainability
Add utility functions for zkApp including network configuration, account fetching, contract deployment, state updating, event emitting, action emitting and reducing, and transaction sending. This is to provide a set of reusable functions for zkApp operations.
…tions

The code in run.ts was simplified by extracting the logic into utility functions. This was done to improve readability and maintainability of the code. The utility functions are now responsible for setting network configuration, fetching account info, deploying and updating contract state, emitting events and actions, and reducing actions.
…e lightnet lifecycle

feat(utils.ts): add execShellCommand function to execute shell commands from Node.js
These changes allow the application to start and stop the lightnet as needed, and to execute shell commands directly from the application.
…Lightnet lifecycle

This change allows the application to start and stop the Lightnet service as needed, improving resource management.
… startLightnet and stopLightnet functions for more reliable status checking

refactor(utils.ts): modify execShellCommand to return exit code instead of stdout for more precise command execution result handling
…ators

fix: add file extensions to all imports for compatibility with new TypeScript configuration
style: add missing semicolons and adjust line breaks for better code readability
feat: update 'target' and 'moduleResolution' in tsconfig.json to use ES2021 and Node's native ESM support
fix: remove outdated tsconfig.test.json from zkapp directory
This change was made to update the TypeScript configuration for tests and remove the outdated configuration from the zkapp directory.
…nction to ensure Lightnet starts successfully within 1 minute, improving reliability and error handling
…bility with different environments

This change is necessary because some environments or tools might require explicit file extensions in import statements.
feat(run.ts): add comment to ensure running a local archive node for better user guidance
Imported modules from 'o1js' and '../zkapp/utils.js' to provide more comprehensive testing capabilities. Also updated import paths for 'resolvers' and 'context' to include '.js' extension for better compatibility.
… for better compatibility

feat(resolvers.test.ts): add more comprehensive tests for events and actions
fix(resolvers.test.ts): update PG_CONN string for better database connection
refactor(resolvers.test.ts): replace beforeAll with before and after for better test setup and teardown
feat(resolvers.test.ts): add keypair and contract setup for more realistic testing
@MartinMinkov MartinMinkov deleted the feat/add-lightnet branch January 30, 2024 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant