constaxios=require('axios');constapiUrl='http://localhost:8889/wallet/deployContract';constheaders= {'Content-Type':'application/json','ChainId':'xxxx',};constrequestData= { abi:'Base64 of the abi', byteCode:'byte code of the contract', walletId:'xxxxxxxxxxxx', ChainId:'xxxx', params: [],};axios.post(apiUrl, requestData, { headers }).then((response) => {console.log('Response:',response.data); }).catch((error) => {console.error('Error:', error); });
import requestsimport jsonurl ='http://localhost:8889/wallet/deployContract'headers ={'Content-Type':'application/json','ChainId':'xxxx',}data ={"abi":"Base64 of the abi","byteCode":"byte code of the contract","walletId":"xxxxxxxxxxxx","ChainId":"xxxx","params": [],}try: response = requests.post(url, json=data, headers=headers) response.raise_for_status()# Raise an exception for 4xx or 5xx status codesprint('Response:', response.json())except requests.exceptions.RequestException as error:print('Error:', error)