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

send message no response ? #15

Closed
weixuefeng opened this issue Mar 14, 2024 · 1 comment
Closed

send message no response ? #15

weixuefeng opened this issue Mar 14, 2024 · 1 comment

Comments

@weixuefeng
Copy link

curl -X POST -H "Content-Type: application/json" https://jrpc-testnet.venom.foundation/rpc -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "sendMessage",
  "params": {
    "message": "te6ccgICAAQAAQAAAUcAAAPhiAHTB1Uvjerh0Tw4uwZOfH3sWlUBz/l/PF6gz1UmjK GRhGe/RbKqP3c60EfD7cYOZ5wU2OKj24O mqn0wqubdrKP6OZkXb3NSsSKAQKQjfNDhfwXgjl2Zdd1kFAiz1quJUhSXUlsUy Tk0AAAAAAHAAAwACAAEAYkIAYCUduyOdc1Ge 0Ux ghMmxAxYzRJ8AMiyXinOzK3tb4ICAAAAAAAAAAAAAAAAAAAUAAAAABLqS2KpIIs9RVh0XO9boobPTIgF0wzH20xTuYEsWsHcGnE6X4A3v8AIN0gggFMl7ohggEznLqxn3Gw7UTQ0x/THzHXC//jBOCk8mCDCNcYINMf0x/TH/gjE7vyY 1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV RDyo/gAkyDXSpbTB9QC wDo0QGkyMsfyx/L/8ntVA=="
  }
}'

{"jsonrpc":"2.0","result":null,"id":1}⏎

how can i know my transaction had success?

@Rexagon
Copy link
Member

Rexagon commented Apr 1, 2024

This method only broadcasts the message. An account state should be polled via getContractState and on every change of lastTransactionId field of responce, new transactions could be received by getTransactionsList (using logical time to specify a range). If the message was not delivered, lastTransactionId might not be changed, and you should poll until genUtime field of the responce is larger than the message expiration time.

The API is quite low-level, it is assumed that it is used only through libraries.

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

3 participants