[Solved] Browser IDE - deploy error, Forgae test error, inconsistency with the documentation

Hello,

There are a few problems I have encountered while writing smart contracts on aeternity (sophia language).

1. Let’s start with the first one:
I have tried to compile, deploy and then play around with the code on https://testnet.contracts.aepps.com/ but I couldn’t.
The code can be compiled but it can’t be deployed. It comes with the following error for me:

Deploy Errors:
Error: While calling getTransactionByHash (hash), GET to https://sdk-testnet.aepps.com/v2/transactions/th_2Pys1tnxnJcHBpuWVjfmr88ij7S6S19kqMx5kVBaQEJ5gtAP1W failed with 404: Transaction not found

2. Let’s continue … I have played around with Forgae.
Created folder -> Initialized aepp: forgae init -> started local development network: forgae node -> wrote some smart contracts and then -> deploy the them: forgae deploy.

The documentation says you will have the following output, e.g.:

===== Contract: FungibleToken.aes has been deployed =====
{ owner: ‘ak_2mwRmUeYmfuW93ti9HMSUJzCk1EYcQEfikVSzgo6k2VghsWhgU’,
transaction: ‘th_6X1YbK2XyhJfWW9JhUS4iZHjsRZXxgxpyXZHVMujJmmD8aSLG’,
address: ‘ct_2WySoghJDfuVeXnaW94bYDyk7jYrG6sovSMi4FQob8ofimz5jZ’,
call: [Function],
callStatic: [Function],
createdAt: 2019-01-21T10:58:12.534Z }
Your deployment script finished successfully!
But I get, e.g.:
===== Contract: TestContact.aes has been deployed =====
Your deployment script finished successfully!
Where is the contract address?

3. I wrote one basic test to check if the smart contract is compiled and deployed successfully and when I run the following command: forgae test, I get the following output:

Error: Http request for https://compiler.aepps.com/compile failed with status code 502. Status: Bad Gateway.
Error data: “”

What are the reasons for these errors? How can I test the smart contracts and where? Is there anyone I can talk to or maybe a Hotliner from the aeternity team who deals with the bugs?

Thanks
Sevgin Mustafov

1 Like

Part of me tells me to shut up, but there is that other part which makes me say: “Welcome to da club”

About the 2nd question: you can get the result object from the deploy function and there you will find the contract address.

hey Servin, always sad to hear people having a bad experience - but that feedback is also absolutely invaluable. Generally, please always provide code and version info when posting issues.

For the first one: I can’t replicate, successfully deploying contracts. I have the feeling it can have something to do with a downtime that might have occured because of the updates due to the latest release and hard fork.

Second issue: Here the same thing from the first issue might apply, but anyways it is recommended to use a local compiler. Here is the command how to use forgae compile with a local compiler: https://github.com/aeternity/aepp-forgae-js/blob/develop/doc/developer-documentation/forgae-cli/compile.md and here you can find it: https://github.com/aeternity/aesophia_http - it exposes the necessary http interface on localhost. Not sure about how things are going with supporting the local cli compiler, @MartinG surely knows ! :wink:

Hi @nikita-fuchs, firstly its Sevgin* :slight_smile: Then, the problem is general for all contracts I have tried (sorry for not providing code) but let’s say: https://github.com/sMustafov/satellite-operators-voting/blob/master/SatelliteOperator.aes. It’s working, I have tested it almost a month ago.

Now everything is okay.

Hey @Sevgin_Mustafov,

Thanks for the feedback, and sorry for the bad experience. Here are the answers to your questions.

  1. There was an issue with the ContractsAepp, which was fixed and now currently it should work. We have released a new version at about 17:30 GMT +3 time.

  2. Currently, the deployment script works like that, it doesn’t logs everything to the console. You can simply console.log() your result from the deployment transaction and you will have all of the information that you will need. Or, you can use the forgae history command to check your previous deployments with a lot of information.

  3. Currently, the https://compiler.aepps.com/compile is not supported by forgae, there is a standalone spawned compiler that you can use. By not supported I mean that different team handles this compiler, not forgae, of course, that you can use it in your tests and scripts. For this issue though I can’t give you a more accurate answer or a solution because I am missing some code and configurations. If you can provide them I will be more than happy to help.

Best,
Martin

1 Like

Thanks a lot @MartinG!

Yes, now everything is fine with the online IDE. :slight_smile:

Best,
Sevgin

1 Like

“Thank you for your warm welcome!” :slight_smile:

I just wanted to note that the documentation needs to be updated.

Hey @Sevgin_Mustafov,

Which part of the documentation do you think that should be updated?
Can we mark this thread as solved?

Martin