Creating a promise
How to create a promise?
Last updated
How to create a promise?
Last updated
There are two ways of creating a promise:
using the App ;
from the contract.
Using the App to create a promise will allow its content to get verified, and spare you the trouble of sending it to IPFS, and eventually to Arweave.
The process is rather straightforward:
Enter a name for your promise (max 70 characters).
Input data for at least one participant:
Name (min 2 - max 30 characters) ;
Ethereum address (a valid Ethereum address) ;
Twitter username (optional ; a valid Twitter handle).
Add as many participants as needed.
Choose whether you want to send the files to Arweave (if you do so, you will need to sign a message to connect your wallet to the Bundlr network Sending to Arweave with Bundlr).
Upload as many files as needed (max 10 MB).
You must be included as a participant, so you won't be able to delete the row that includes your address.
You cannot add duplicate Ethereum addresses.
You need to upload file by file ; you can't upload a folder directly.
Files won't be uploaded to IPFS or Arweave until you click the Create button.
Once you click Create, the process of "uploading" to IPFS / Arweave and submitting the transaction will start.
If you chose not to send the content to Arweave, you will only need to confirm one transaction, which will create the promise contract holding all its information.
If you chose to send the content to Arweave, there are a few additional steps:
Funding your Bundlr wallet: you will be prompted to confirm a transaction, that will transfer the required amount in MATIC to your Bundlr wallet ; it will be used for sending the files to the Arweave blockchain.
Authorizing Bundlr: you will be asked to sign a message to authorize Bundlr to send the files on Arweave.
Once you have completed these steps, the promise will be created, and available both in the Explore promises and the Dashboard pages.
The promise creation window provides a link to create the promise by directly interacting with the contract.
If you create a promise from the contract, without using the App, we won't be able to verify that the files have indeed been uploaded to IPFS & Arweave.
Once in the createPromiseContract
function, you will need to provide the following parameters:
_promiseName
New promise
Any string. Max length is 70 characters.
_ipfsCid
bafybe...ci
Any IPFS CID.
_arweaveId
E1X...WU
Any Arweave ID.
_encryptedProof
...
It doesn't matter here, since it won't be able to get verified. At least one character must be provided.
_partyNames
['Bob']
An array of strings.
It needs to be encapsulated in brackets: [...]
.
Each name must be in quotes: 'name'
.
Names must be separated by a comma: 'name', 'name'
.
_partyTwitterHandles
['bobtwitter']
An array of strings.
It needs to be encapsulated in brackets: [...]
.
Each handle must be in quotes: 'handle'
.
Handles must be separated by a comma: 'handle', 'handle'
.
The @ must not be provided.
For no handle, an empty string must be supplied: ''
.
_partyAddresses
[0x000...00]
An array of addresses.
It needs to be encapsulated in brackets: [...]
.
Addresses must be separated by a comma: '0x000...', '0x000...'
.
You must put your address as the first one in the array, otherwise the transaction will be reverted.
All fields need to be filled up in order to submit the transaction.
The arrays _partyNames
, _partyTwitterHandles
and _partyAddresses
need to have the same length.
When all the fields have been filled correctly, you can submit the transaction, and refresh the App to see your promise displayed.
Therefore, the promise will be displayed with the tag "Not verified" on the App UI.