Skip to content

Commit

Permalink
fix(3355924208): deploy transaction isn't working (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
galuzan-starkware committed Oct 11, 2022
1 parent 2497c05 commit 2831c45
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/api/playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const compile = async code => {
}
return {
contractAddress: response.address,
contractClass: response.contract_class
contractDefinition: response.contract_definition
};
};

Expand Down
4 changes: 2 additions & 2 deletions src/api/starknet.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import {apiRequest} from './api-request';

const path = process.env.REACT_APP_STARKNET_ALPHA_SERVICE_URL;

const deploy = async contractClass => {
const deploy = async contractDefinition => {
let data = {
type: ActionTypes.DEPLOY,
contract_address_salt: `0x${generateRandomHex(248 / 4)}`,
contract_class: contractClass,
contract_definition: contractDefinition,
constructor_calldata: []
};
const [response, error] = await apiRequest({
Expand Down
4 changes: 2 additions & 2 deletions src/components/Features/Editor/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,10 @@ const Editor = ({filePath}) => {
};

const doDeploy = async compileResponse => {
const {contractClass} = compileResponse;
const {contractDefinition} = compileResponse;
program.addOutput(DEPLOYING_MSG);
const [response, error] = await promiseHandler(
deploy(contractClass)
deploy(contractDefinition)
);
if (error) {
DEPLOY_FAILED_MSG.push(error.message);
Expand Down

0 comments on commit 2831c45

Please sign in to comment.