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

contract id #34

Open
cymqqqq opened this issue Jul 4, 2022 · 2 comments
Open

contract id #34

cymqqqq opened this issue Jul 4, 2022 · 2 comments

Comments

@cymqqqq
Copy link

cymqqqq commented Jul 4, 2022

Hi, in this function "async fn deploy_plug_bucket(contract_id: Principal, cycles: u64) {"
the input parameter 'contract_id': Is it a canister id or plug address?

@qti3e
Copy link
Collaborator

qti3e commented Aug 12, 2022

It's a canister id.

@cymqqqq
Copy link
Author

cymqqqq commented Dec 21, 2022

Hello, I'm here again.
So the problem is how to deploy the cap-root canister in the local environment.
I read the code snippet of lib.rs in cap-root canister:
#[init]
fn init(contract: Principal, writers: BTreeSet) {
let data = ic::get_mut::();
data.cap_id = ic::caller();
data.bucket = Bucket::new(contract, 0);
data.writers = writers;
}
and
"dfx deploy cap-root --argument '(principal "", vec {})'" is not work.
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
Failed while trying to install all canisters.
Failed to install wasm module to canister 'cap-root'.
Failed to install wasm in canister 'rrkah-fqaaa-aaaaa-aaaaq-cai'.
Failed to install wasm.
The Replica returned an error: code 5, message: "Canister rrkah-fqaaa-aaaaa-aaaaq-cai trapped explicitly: Custom(No more values on the wire, the expected type principal is not opt, reserved or null)"

So, how to fix it?

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

No branches or pull requests

2 participants