Capturing the Contract Details
Learn how to capture the contract details.
We'll cover the following
Overview
Our smart contract requires two addresses and the corresponding split ratios to be provided. We’ll create input fields to capture this data, and we’ll have a submit button to deploy the contract with this given data.
We should start by defining the application state that’ll represent this data. We can create an array of objects, where each object will have a field for the object id
, the address of the user, the label
for the input field, the error message
for the field, and the split ratio (split
). We’ll call this array partners
. Each object inside the array will be a partner
object.
Get hands-on with 1400+ tech skills courses.