Categories
Cryptocurrency Ethereum Mastering Development

Is it possible to analyze transaction with a smart contract by inputting a transaction ID?

EDIT: Alright, this is a duplicate: Can a contract view the details of a transaction, given a transaction id? Edit2: answer is either to oraclize or do the API call to, for example, etherscan: https://etherscan.io/apis Lets say user A sends either a token or Ethereum to a contract address B. This generates a transaction ID […]

Categories
Mastering Development

JSON to Python List

Context: Using Visual Studio Code, trying to convert my JSON response into a Python list, so I can add it to a Google Sheet. I’d like to convert my response into a List of JSON Lists (like the "working example" below) Working Example RandomJson = [ [‘hello’,2], ["hi",3] ] bla = sheet.values().update(spreadsheetId=SAMPLE_SPREADSHEET_ID, range=’sheet1!A1′, valueInputOption="USER_ENTERED", body={"values":RandomJson}).execute() […]

Categories
Mastering Development

No Access-Control-Allow-Origin after many calls edit > Axios network error catch

I’ve googled this issue very often and I think I’ve inserted them all which I know is redundant but I’m desperate. In my server I’ve added: app.use(cors()) and app.use(function (req, res, next) { res.setHeader(‘Access-Control-Allow-Origin’, ‘*’); res.setHeader(‘Access-Control-Allow-Headers’, ‘Origin, X-Requested-With, Content-Type, Accept’); res.setHeader(‘Access-Control-Allow-Methods’, ‘POST, GET, PATCH, DELETE, OPTIONS’); next(); }); and in the route, I’ve added: router.use([‘/api/’, […]

Categories
Mastering Development System & Network

ERR_CERT_COMMON_NAME_INVALID on chrome

When trying to login to my website on Chrome based browsers I get the error: Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID On firefox it works fine, tho. I installed certificates by certbot. My corresponding nginx settings look like: server { listen 80; server_name pvapp.umwelt-campus.de; return 302 https://$server_name$request_uri; } server{ # SSL configuration listen 443 ssl default_server; […]

Categories
Mastering Development

reduction from ALLtm to Etm

I am trying to understand why this "proof" of Etm undecidability is wrong. ALLtm={ < M >|M is a TM, L(M)=∑*} ETM={< M >|M is a TM, L(M)=∅} We know that ALLTM is undecidable, lets assume ETM is decidable (T is a TM that decides ETM) and get a contradiction. S= "On input < M […]

Categories
Mastering Development

Django + React Able to create new user in database, but token-auth returns 400 bad request

So I have an app that I’m writing. It’s working, for the most part, so far. I only currently have a login and signup setup, with a ‘homepage’ that just has a logout button and some text on it so I can test. When I do signup, it posts the user to the database, but […]

Categories
Mastering Development

configure nodejs rest api server and vue project with axios cors policy error

as the title sais, i’m trying to configure a local rest api server running node js and in the meantime i have a vue project with axios. i surfed the whole internet, tried every server/client configuration, server headers settings, cors package, axios header config, but i still have cors policy error inthe console. postman works […]

Categories
Mastering Development

Giving error with node/fastify Unsupported Media Type: application/x-www-form-urlencoded

index.js fastify.get("/paynow", (request, reply) => { let data = { TXN_AMOUNT: ’10’, // request amount ORDER_ID: ‘ORDER_123455’, // any unique order id CUST_ID: ‘CUST_1238w4’ // any unique customer id } // create Paytm Payment paytm.createPayment(config, data, function (err, data) { if (err) { // handle err } //store the url and checksum let url = […]

Categories
Mastering Development System & Network

Angular CORS with Nginx

Several questions for the same topic on the net but nothing worked. I have a serverXYZ running an Angular app, a backend tomcat webapp for authentication, a nginx server. Angular app on port 4200, tomcat app on 8080. Everything is on the same host. The angular app has a environment.ts file (the commented string is […]

Categories
CMS Drupal Mastering Development

Why authenticate request returned 403 after successful login?

I have front-end with AngularJS and its connected to drupal backend. I am using drupal services module for rest api. I have an angularjs web app in subdomain [admin.example.com]. My authentication subdomain [account.example.com] developed with drupal 7. I can login successfully to account.example.com from admin.example.com using http request from angularjs, so I stored newly generated […]