joticajulian / kondor-website

MIT License
1 stars 0 forks source link

UI - /vapor/new-proposal - page to create new proposal #4

Open joticajulian opened 7 months ago

joticajulian commented 7 months ago

Page to create a new proposal http://localhost:3000/vapor/new-proposal

Inputs:

use it to call the contract.

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",
  monthly_payment: "100000000000", // 1000 koin
  starting_date: "1698796800000", // 2023-11-01
  ending_date: "1730419200000", // 2024-11-01
  beneficiary: "1B2Us2ynMLjCEGNJEewTXSzymQSQSeDUer",
  fee: "2000000000", // 20 koin
});
frank-weijers commented 6 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
});
aaron-ic commented 5 months ago

Hey @frank-weijers, a few things I'm curious about with this function:

  1. What is the purpose of the 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.
  2. Is it only possible to assign a single 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?
  3. Is there any expectation about the relationship of 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)
  4. Am I right in assuming the payment is made in arrears (at the end of the first interval) rather than in advance (at the start of the first interval)?

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.