<stellar-slack>
<sacarlson> so I take it in in the right place but don't know how to decode base64
<stellar-slack>
<sacarlson> as the error codes here are in decimal
<stellar-slack>
<scott> sacarlson: All of the base64-encoded values are byte streams that contain an XDR-encoded data structures. https://tools.ietf.org/html/rfc4506 is the specification for how you go from a byte stream to in-memory structures
<stellar-slack>
<scott> the actual structure encoded in any given value is not very well documented, as shown by fredolafritte’s question
<stellar-slack>
<scott> for example, the value in the `txresult` column is a `TransactionResultPair` strucut, or the `txmeta` column is the `TransactionMeta` struct.
<stellar-slack>
<scott> So, the procedure to get to that decimal value is 1) decode the base64 value to a raw byte stream 2) decode that byte stream to an in-memory XDR struct of the appropriate type 3) access the in-memory field to retrieve the decimal value
<stellar-slack>
<scott> make sense?
<stellar-slack>
<sacarlson> ya makes sense but I think it's out of my pay grade ha ha
<stellar-slack>
<sacarlson> I'll await the released utility that converts it to a more readable format
<stellar-slack>
<sacarlson> or force known errors and see what results I see and maybe the results will show a pattern
<stellar-slack>
<scott> so, luckily we have that utility for ruby, javascript, and go. That’s what ruby-stellar-base is: https://github.com/stellar/ruby-stellar-base for example
<stellar-slack>
<scott> We convert those .x files into c++, ruby, etc. to make it easier to go into the in-memory representation.
<stellar-slack>
<scott> Let me explain how you would go from "AAAAAAAAAAD////7AAAAAA==“ to the error code:
<stellar-slack>
<sacarlson> ok
<stellar-slack>
<scott> That script will output `Stellar::TransactionResultCode.tx_bad_seq(-5)`
<stellar-slack>
<sacarlson> cool in ruby I love it
<stellar-slack>
<scott> :)
slippy has quit [Ping timeout: 246 seconds]
<stellar-slack>
<sacarlson> so from this then I am guessing fredolafritte's code 't1qpS2SGmIWfZXnpmlFsZBt6JYb2+YIUC5RcngrmvCoAAAAAAAAD6P////8AAAABAAAAAAAAAAP////5AAAAAA==' is .tx_insufficient_balance(-7)
<stellar-slack>
<scott> That’s incorrect… the -7 in that data structure is a member of the `ManageOfferResultCode` enum, which is `manage_offer_underfunded`
<stellar-slack>
<scott> If you inspect the whole data structure:
<stellar-slack>
<sacarlson> ok
de_henne has quit [Remote host closed the connection]