I’m doing the motokobootcamp.com chapter 1 and trying this simple code, the canister doesn’t run on Gitpod.
import Buffer "mo:base/Buffer";
actor {
let name : Text = "deFiSport";
var manifesto : Text = "deFiSport is a DAO that rules few canisters & dApps allowing young sportsmen & sportwomen to earn money thanks to their performances, image & more."
let goals : Buffer.Buffer = Buffer.Buffer<Text>(0);
public shared query func getName() : async Text {
return name;
};
public shared query func getManifesto() : async Text {
return manifesto;
};
public func setManifesto(newManifesto : Text) : async () {
manifesto := newManifesto;
return;
};
public func addGoal(newGoal : Text) : async () {
goals.add(newGoal);
return;
};
public shared query func getGoals() : async [Text] {
return Buffer.toArray(goals);
};
};
I tried to :
-
Copy-Paste the solution, it doesn’t work
-
Watching the tutorial
-
Read the docs, especially about Buffer