https://github.com/ozwaldorf/asset_canister_factory
Asset canister factory
https://github.com/ozwaldorf/asset_canister_factory
Last synced: 2 months ago
JSON representation
Asset canister factory
- Host: GitHub
- URL: https://github.com/ozwaldorf/asset_canister_factory
- Owner: ozwaldorf
- Created: 2022-11-04T01:44:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-04T02:35:23.000Z (over 2 years ago)
- Last Synced: 2025-02-15T20:20:39.135Z (4 months ago)
- Language: Rust
- Homepage:
- Size: 313 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Asset Canister Factory
This is a simple canister factory that spins up asset canisters on behalf of the caller. The users must be added manually by the initial deployer.
## Usage
Start the local network
```shell
dfx start --clean --background
```Deploy the canister factory with 64T cycles
```shell
dfx deploy factory --with-cycles 64000000000000
```Call the `deploy` method to spawn a new canister preloaded with 3T cycles
```shell
dfx canister call factory deploy
```Call the `upgrade` method to upgrade an existing canister with the currently stored wasm
```shell
dfx canister call factory upgrade '(principal "r7inp-6aaaa-aaaaa-aaabq-cai")'
```## User Management
The initial deployer can add users to the factory by calling the `add_user` method
```shell
dfx canister call factory add_user '(principal "aaaaa-aa")'
```Users can be removed by calling the `del_user` method
```shell
dfx canister call factory del_user '(principal "aaaaa-aa")'
```