goat-systems / go-tezos

Go Tezos Is a Go library that exposes and builds upon the Tezos RPC.
MIT License
71 stars 45 forks source link

Failed attempt to create a transaction using the example #190

Closed Weltburger closed 2 years ago

Weltburger commented 3 years ago

I'm using an example from example/transaction, and I got an error while using the method InjectionOperation Inside this method, we use Marshal: v, err := json.Marshal(input.Operation), and then we transmit the received data v into Client.post resp, err := c.post("/injection/operation", v, input.contructRPCOptions()...), and now, in this method, the received data is displayed incorrectly immediately after receiving it. func (c *Client) post(path string, body interface{}, opts ...rpcOptions) (*resty.Response, error), when entering the method, body parameter contains: <unsupported type: []uint8>, but before calling the method c.post, during debagging, you can see that the transmitted data is correct. As a result, in this line, in resp we get [{"kind":"temporary","id":"failure","msg":"Error while applying operation ooiFyhgHPwwyBepsp19jS2PRzXVFJMnonUdJCbYuGLHAZ5CLtZw:\n branch refused (Error:\n Unrevealed manager key for contract tz1bpzyfVGfFfKiNTHGquRNcbYDLghjcotZa.\n)"}]

ygcool commented 2 years ago

Hi, have you solved this problem?

Weltburger commented 2 years ago

Yes, I just rewrote the function in my package

ygcool commented 2 years ago

Can you provide an example that can transfer?

Weltburger commented 2 years ago

Example