Coder Social home page Coder Social logo

eth_sendtransaction error about laravel-ethereum HOT 5 OPEN

jcsofts avatar jcsofts commented on September 14, 2024
eth_sendtransaction error

from laravel-ethereum.

Comments (5)

amandiobm avatar amandiobm commented on September 14, 2024

hi @halilulker, that function expects an EthereumTransaction class, your code should be like this.

$from = '0x410a0cbc08011d65b4ab11b2199534e86a1131fa';
$to = '0xabe713314023f63b690c02737f079fb0f74a1741';
$gas = '0x76c0';
$gasPrice = '0x9184e72a000';
$value = '0x9184e72a';
$data = '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675';
               
$transaction = new EthereumTransaction($from, $to, $value, $gas, $gasPrice, $data);
return Ethereum::eth_sendTransaction($transaction);

Hope that helped.

Kind regards.

from laravel-ethereum.

halilulker avatar halilulker commented on September 14, 2024

thank you @amandiobm but i get this error now:
Class 'EthereumTransaction' not found

from laravel-ethereum.

amandiobm avatar amandiobm commented on September 14, 2024

@halilulker did you imported?! After your namespace has those two lines?

use Jcsofts\LaravelEthereum\Facade\Ethereum;
use Jcsofts\LaravelEthereum\Lib\EthereumTransaction;

Just to ensure, my composer.json has this "jcsofts/laravel-ethereum": "dev-master" as the version installed.

from laravel-ethereum.

danirabbani90 avatar danirabbani90 commented on September 14, 2024

Hi there i am getting this error can you help while using the send Transaction Only support send transaction with ipc

from laravel-ethereum.

Vikasvekariya avatar Vikasvekariya commented on September 14, 2024

How to generate $data value?

$from = '0x410a0cbc08011d65b4ab11b2199534e86a1131fa';
$to = '0xabe713314023f63b690c02737f079fb0f74a1741';
$gas = '0x76c0';
$gasPrice = '0x9184e72a000';
$value = '0x9184e72a';
$data = '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675';

$transaction = new EthereumTransaction($from, $to, $value, $gas, $gasPrice, $data);
return Ethereum::eth_sendTransaction($transaction);

from laravel-ethereum.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.