Open joticajulian opened 7 months ago
Updated method:
const { transaction, receipt } = await contract.functions.create_proposal({
title: "Marketing campaign in Twitter and Youtube 🚀" ,
summary: "Contact with influencers in twitter and youtube to show the advantages of koinos. Contact with influencers in twitter and youtube to show the advantages of koinos. Contact with influencers in twitter and youtube to show the advantages of koinos. Contact with influencers in twitter and youtube to show the advantages of koinos. Contact with influencers in twitter and youtube to show the advantages of koinos. Contact with influencers in twitter and youtube to show the advantages of koinos. Contact with influencers in twitter and youtube to show the advantages of koinos.",
url: "https://koinos.io",
payment_token: "koin", // Name of whitelisted token to receive payments in = KOIN
payment_amount: "100000000000", // 1000 koin
payment_interval: "monthly",
starts_at: "1698796800000", // 2023-11-01
ends_at: "1730419200000", // 2024-11-01
beneficiary: "1B2Us2ynMLjCEGNJEewTXSzymQSQSeDUer",
fee: "2000000000", // 20 koin
});
Hey @frank-weijers, a few things I'm curious about with this function:
fee
parameter? My best guess is that there is a fee to create a proposal but I couldn't see why it would be passed to the function, instead of being a read_only attribute of the contract OR calculated by another function based on project length, proposal value and/or proximity to start date, for example.beneficiary
for the payment? Is that just to get started, because it is simplest or expected that the beneficiary will handle disbursement to multiple parties if necessary?starts_at
and ends_at
in terms of the payment_interval
? I.e. should ends_at
be a whole number of weeks or months after starts_at
OR will the final payment be prorated OR will payments be made in the chosen interval until ends_at
has passed (even if that means not paying the full period)Feel free to be as terse or descriptive as you like with each of these but figured it could be useful to play through some alternate interpretations. It could be handy when it comes to what would be valuable to cover in documentation.
Page to create a new proposal http://localhost:3000/vapor/new-proposal
Inputs:
use it to call the contract.