0

I am learning solidity and react and for that I want create a web platform for Social Events. The events have a id, adress (owner of the event), price and the page looks like this: enter image description here

I am connected to the page with metamask using web3js. And my idea is when the user press the blue button, the user send ethers (the price of the event) to the contract with user permission.

Thanks for all!

1 Answer 1

0

Yes you can easily create send promise that will pop up the metamask or wallet being connected to the interface using sendTransaction method of web3.

Eg.

web3.eth.sendTransaction({
    from: 'fromAddress_from_metamask',
    to: 'EOA_OR_contract_address',
    value: '1000000000000000'
})
.then(function(receipt){
    ...
});

You can view details about that in web3 doc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.