boscore/referendum

remove proposal_name that require proposer to fill in as PK

libhasheos opened this issue · 1 comments

Currently there are two parameters in propose page:
proposal name and title which is confusing for developers.

Basically proposal_name is the PK for proposal_row table

struct [[eosio::table]] proposal_row {
name proposal_name;
name proposer;
string title;
string proposal_json;
time_point_sec created_at;
time_point_sec expires_at;
auto primary_key()const { return proposal_name.value; }
uint64_t by_proposer() const { return proposer.value; }
bool is_expired() const { return current_time_point_sec() >= expires_at; }
bool can_be_cleaned_up() const { return current_time_point_sec() > (expires_at + FREEZE_PERIOD_IN_SECONDS); }
};

It's necessary to remove the burden for develop to key in this 12 character primary key and allow either auto-incremental PK or random identifier to be generated to identify a particular proposal.

https://boswps.io
image

Using auto increment makes it very challenging for others to find/approve a particular escrow.

This is the same as submitting an MSIG proposal, adding a 12 character unique ID is very easy for devs/propopers