Deploy Sophia contract with JS SDK


#1

Hey all,
I have that piece of code:

var client = await Ae.create(host, { debug: true });
var contract = Contract.create(client, { wallet: Wallet.create(client, keypair) })
var compiled = await contract.compile(code);
var deployed = await compiled.deploy()

Problem is that deploy transaction can’t be mined for more than 20 minutes. I have tried to post TX to my local epoch and http://52.10.46.160:3013. Any ideas?

Thanks!

[edit] After a while I got this error (node:70584) UnhandledPromiseRejectionWarning: Error: Giving up after 10 blocks mined


#2

[edit] After attempts to deploy, transaction has been mined.


#3

Hey @lcsavov,

Great, keep us posted about your progress.

Regards,
The AE Team