Skip to content

Commit

Permalink
Update Deploy.js
Browse files Browse the repository at this point in the history
called the getAllSellers function from contract.sol to display sellers on new page
  • Loading branch information
salonii04 authored Mar 17, 2024
1 parent 2f27a9c commit 79abb1f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/Deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ async function main() {
console.log('Contract address: ' + contract.address);



// Call getAllSellers function
const [sellerAddresses, sellerNames] = await contract.getAllSellers();
console.log('Retrieved seller addresses:', sellerAddresses);
console.log('Retrieved seller names:', sellerNames);

for (let i = 0; i < sellerNames.length; i++) {
console.log(`Seller ${i + 1}: ${sellerNames[i]}`);
}


}
Expand Down

0 comments on commit 79abb1f

Please sign in to comment.