Environment and details
I am trying to use defender autotask to update my firestore database via firebase's admin SDK based on values in my smart contracts. I see we can use webpack/rollup/any bundler to bundle the packages we need. But may I know how to keep secret credential json file (not secret key) safe?
is there any way to just bundle the dependencies and write logic in autotask js browser IDE?
May I know how to update the entries in my firestore database based on values in my smart contracts in scheduled time intervals?
Below is my code that is bundled using webpack:
var admin = require("firebase-admin");
var serviceAccount = require("./SecretsForServiceAccounts.json");
admin.initializeApp({
credential: admin.credential.cert(serviceAccount)
});
const db = admin.firestore();
db.collection('myCollection').doc('MyDoc').set({fieldName: 'value'}, {merge: true})
the above code runs fine locally even with webpack. I am confused on how to implement it in autotask with ethers.js and relay wallet transactions from relayer.