diff --git a/README.md b/README.md index 444be50..7452e43 100644 --- a/README.md +++ b/README.md @@ -27,5 +27,4 @@ Copy these files to the web server: ## TODO -* Wait for transaction receipt and get the returned contract address * If the contract has deploy arguments, display a dialog to get them diff --git a/app.js b/app.js index 8e316d0..322906a 100644 --- a/app.js +++ b/app.js @@ -154,11 +154,11 @@ async function deploy_contract(contract_address, sourceCode, encodedByteCode) { if (info.chainid.version >= 4) { // deploy the source code const contract = herajs.Contract.fromSourceCode(sourceCode); - const payload = contract_plain.asPayload([]); + const payload = contract.asPayload([]); } else { // deploy the compiled byte code const contract = herajs.Contract.fromCode(encodedByteCode); - const payload = uint8ToBase64(contract_build.asPayload([])); + const payload = uint8ToBase64(contract.asPayload([])); } var txdata = { diff --git a/bundle.js b/bundle.js index b294677..4a93d0e 100644 --- a/bundle.js +++ b/bundle.js @@ -155,11 +155,11 @@ async function deploy_contract(contract_address, sourceCode, encodedByteCode) { if (info.chainid.version >= 4) { // deploy the source code const contract = herajs.Contract.fromSourceCode(sourceCode); - const payload = contract_plain.asPayload([]); + const payload = contract.asPayload([]); } else { // deploy the compiled byte code const contract = herajs.Contract.fromCode(encodedByteCode); - const payload = uint8ToBase64(contract_build.asPayload([])); + const payload = uint8ToBase64(contract.asPayload([])); } var txdata = {