@@ -22,14 +22,14 @@ public static void main(String[] args) throws Exception {
2222 String ptivateKey = "e19d05c5452598e24caad4a0d85a49146f7be089515c905ae6a19e8a578a6930" ;
2323 // Populate the wallet with an account
2424 String address = wallet .addByPrivateKey (ptivateKey );
25- HttpProvider provider = new HttpProvider ("https://api.zilliqa.com" );
25+ HttpProvider provider = new HttpProvider ("https://dev- api.zilliqa.com" );
2626 //get balance
2727 HttpProvider .BalanceResult balanceResult = provider .getBalance (address ).getResult ();
2828 System .out .println ("balance is: " + balanceResult .getBalance ());
2929
3030 //construct non-contract transaction
3131 Transaction transaction = Transaction .builder ()
32- .version (String .valueOf (pack (2 , 8 )))
32+ .version (String .valueOf (pack (333 , 1 )))
3333 .toAddr ("zil16jrfrs8vfdtc74yzhyy83je4s4c5sqrcasjlc4" )
3434 .senderPubKey ("0246e7178dc8253201101e18fd6f6eb9972451d121fc57aa2a06dd5c111e58dc6a" )
3535 .amount ("10000000" )
@@ -101,7 +101,9 @@ public static void main(String[] args) throws Exception {
101101 List <Value > init = Arrays .asList (Value .builder ().vname ("_scilla_version" ).type ("Uint32" ).value ("0" ).build (), Value .builder ().vname ("owner" ).type ("ByStr20" ).value ("0x9bfec715a6bd658fcb62b0f8cc9bfa2ade71434a" ).build ());
102102
103103 ContractFactory factory = ContractFactory .builder ().provider (new HttpProvider ("https://api.zilliqa.com/" )).signer (wallet ).build ();
104+
104105 Contract contract = factory .newContract (code , (Value []) init .toArray (), "" );
106+
105107 DeployParams deployParams = DeployParams .builder ().version (String .valueOf (pack (2 , 8 ))).gasPrice ("1000000000" ).gasLimit ("10000" ).senderPubKey ("0246e7178dc8253201101e18fd6f6eb9972451d121fc57aa2a06dd5c111e58dc6a" ).build ();
106108
107109 //deploy contract, this will take a while to track transaction util it been confirmed or failed
0 commit comments