The contract resolution failed, but the browser succeeded

Hello, everyone
When I invoked the contract, I was prompted that the resolution failed, but the browser checked successfully. Is there any difference between the browser and the interface


It looks like a success here


This is a failure

Contract address
ct_2U7CWpb9farBDFNUzzpqj5manfNCtCd1Qbbc7MXCcTSdfnv2zZ

hash
th_YteUmBUzKT2nYPxuyoacgu7zGp9WZy5czfzHXwM3j4nhUGrff

methods
getAccounts

the explorer decodes automatically, in the deprecated contracts interface you have to manually provide the type to decode, which was probably the wrong one passed

How do I set up automatic decoding? Like https://mainnet.aeternal.io/

if you use the high-level contract interface of the js sdk your call results include a .decodedResult object.

Similar to this https://github.com/thepiwo/ae-oracle-pricefeed/blob/master/src/exampleSDK.js#L31

I use HTTP to decode. If it is HTTP, is there a better solution?
https://latest.compiler.aepps.com/decode-call-result

you can use the http compiler to do it manually as well, internally the sdk does the same, just automatically so its easier for a developer using it

I tried to use the increment return type, but it also failed

map is not a valid type, you need to specify the types within your map as well

That doesn’t seem right either

map_accounts is not a valid sophia type

How is this return type defined?

you have to specify the full sophia type that you expect returned, types that are defined in your contract are not known by the decoder, the way it is called in the deprecated contracts editor.

also for your map_accounts there is no need to wrap it in a one attribute record, this can also yield errors from the compiler

the contracts editor is deprecated, as I mentioned multiple times, it can make some things harder than expected. Did you try aestudio?

I have tried Aestudio, but I was in China, and some of the network access was blocked. For me, only aestudio could write the code, but it could not be used for compiling and other operations. I was too pitiful

1 Like

did you give feedback about these issues to @nikitafuchs.chain in his thread about aeproject?

1 Like

No, I’m just checking to see if it’s studio.

hey @Baixin.chain , glad to hear aestudio did the trick for you, at least partly. But as <i understand you right, you would like to get the compiler output, too, and probably other things ? What is it that you are missing and what would you like to use that for ?