0

I have not a lot experience with ethereum and this problem very hard for me.

I have project in php laravel, which must send project's internal coins to user and with this transaction I must save extra data about user's job, for which there is a payment.

The smartcontract's address is 0x64be6b77cc723e5518687a04b4e62824e89fd8bb

First I installed geth and synced ethereum. Then I imported account (with 0 account balance).

Then I started work with two different php libraries and many manuals and examples, but for now I have no understanding, how I can solve this.

With both I can successfully connect to local ethereum instance (http://127.0.0.1:8545), get protocol version, account balance and call other simple methods. But not understand yet, how I can call contract with recipient's address, amount and extra data.

I use this libs: digitaldonkey/ethereum-php and sc0vu/web3.php

Expected result - transaction created, extra json data saved into transaction, transaction id saved into mysql.

EdChum
  • 376,765
  • 198
  • 813
  • 562
Ssmarty
  • 11

1 Answers1

0

To interact with the blockchain you have to create the Distributed Application. The dapp use the Web3 library to interact with the blockchain. One approach to solve your problem would be to create a angularJs app and use the web3 library to interact with the Smart Contract. Depending upon the code in Smart Contract you can also store extra data in the event field but that has to be coded in the Smart Contract.

For the transaction to be executed you can use MetaMask plugin. Metamask also allows to create new user on ethereum network. Once you login in the Metamask all the transaction you execute through the web3 library goes through the Metamask and you have to confirm transaction before execution.

A good way to start would be to see in detail about truffle framework as it ease the development of Smart Contract and Distributed application. You can download the angular box and start developing the distributed application.

Uahmed
  • 1,847
  • 5
  • 29
  • 45