Psychedelic / cap

Open Internet Service to store transaction history for NFTs/Tokens on the Internet Computer - https://cap.ooo/
GNU General Public License v3.0
44 stars 16 forks source link

contract id #34

Open cymqqqq opened 2 years ago

cymqqqq commented 2 years ago

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 commented 2 years ago

It's a canister id.

cymqqqq commented 1 year ago

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?