Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any documentation with common examples? #348

Open
JTorresConsulta opened this issue Mar 24, 2024 · 2 comments
Open

Any documentation with common examples? #348

JTorresConsulta opened this issue Mar 24, 2024 · 2 comments

Comments

@JTorresConsulta
Copy link

JTorresConsulta commented Mar 24, 2024

Hi ! Thanks for the library but It is a madness :/

Any documentation with common examples?

I am trying to get the Symbol of a ERC-20 like this:

$contract->at($contractAddress)->getData('symbol');

The return: 95d89b41 (the result would be Uni 2.6)

I am trying to convert from Utils::toString, utf_encode, utf_decode, pack.... nothing works

Thanks.

@JTorresConsulta
Copy link
Author

This code solved it:


$contract->at($contractAddress)->call('symbol', function ($err, $result) {
  if ($err !== null) { return; } 
  echo 'The symbol: ' .  $result[0];
});


@JTorresConsulta
Copy link
Author

Any way to getPastEvents with this library?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant