NEARFoundation / ui.grants

Easy to set up end to end grant application form for DAOs on NEAR Protocol
GNU General Public License v3.0
0 stars 2 forks source link

Create a full featured basic form with 3 to 6 fields #42

Closed sandoche closed 2 years ago

sandoche commented 2 years ago

Features

Tasks

sandoche commented 2 years ago

Proposal code example

          await window.contract.add_proposal(
            {
              proposal: {
                description: e.target.proposalDescription.value.trim(),
                kind: {
                  Transfer: {
                    token_id: paymentOption === 'NEAR' ? '' : e.target.proposalFT.value,
                    receiver_id: e.target.proposalTarget.value,
                    amount:
                      paymentOption === 'NEAR'
                        ? amountYokto
                        : amount.mul('1e' + r.metadata.decimals).toFixed()
                  }
                }
              }
            },
            new Decimal('30000000000000').toString(),
            daoPolicy.proposal_bond.toString()
          );
sandoche commented 2 years ago

https://github.com/sandoche/sputnik-dao-2-ui-reference/blob/dev-ux-improvements-and-multi-vote/src/components/dao/Dao.jsx#L1225

sandoche commented 2 years ago

Get the transactionHashes and save it

sandoche commented 2 years ago

Canceled transaction: ?errorCode=userRejected&errorMessage=User%2520rejected%2520transaction