How to access abi of deployed contract with truffle? - ethereum

I have deployed my contract on rinkeby test network, now I have to connect my contract with the frontend and for this I need to access the ABI of the deployed contract. I am using truffle framework and I saw somewhere that ABI is in the build folder but I can't find it. Please help

You can find it in the auto-generated json file under the ./build/contracts folder, and then just extract it. For more detailed information you can read this article: https://piyopiyo.medium.com/how-to-get-contract-abi-in-truffle-22d0c0457ceb
Hope it is useful :)

Related

change and update twilio serverless function

I have deployed few functions in twilio serverless.If I mistakenly delet that local file from where I deployed the function.Or if this function is deployed by someone else.As there is no way to change the functions from UI,we must have to do it from cli.
The way I found is fetching,updating,building,deploying function by providing its service ,enviornment ,function ,build,deploy sid each time by function api by curl/twilio cli.Its very tedious and error prone to provide all those sid mentioned above. there should be an easy way just like when I have all the file locally and with a one twilio cli command I can change and deploy.
Whats the easiest way to download the file from serverless to local environment to change and re-deploy it again from cli just like I did first time( just run twilio serveless:deploy )?
You can modify Twilio Functions (via the GUI) created with the serverless cli by sending the following request.
Read only services and editing in the new Functions UI
Example:
client.serverless.services('ZSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.update({uiEditable: true})
.then(service => console.log(service.friendlyName));
You can also use tooling for the severless API to make working with it incredibly easy, reference:
Deploy Twilio Functions with the Serverless extension for VSCode

v3 where to get git_url?

I am trying to clone to my local git repository.
From Mac terminal:
git clone git_url directory_to_create
In the web console, I tried to use the GitHub Webhook URL and Generic Webhook URL. But I got this error: The requested URL returned error: 405
Any suggestions?
OpenShift doesn't host a Git repository for you. It relies on you having a separate hosted Git repository to pull application source code from. Alternatively, you can use a binary input build and push source code from your local system.
If you already have a deployed application how did you create it?
If it was a sample S2I application, you need to go to GitHub where the source code for that sample application was and clone it into your GitHub account. You can then check it out from your fork in your own GitHub account to your local system. You will though need to update the build configuration for the application in OpenShift to then use your fork of the original sample application.

Google Cloud Functions: How do you share source code?

I have a Node server and multiple controllers that perform DB operations and helpers (For e-mail, for example) within that directory.
I'd like to use source from that directory within my functions. Assuming the following directory structure:
src/
server/
/app/controllers/email_helper.js
fns/
send-confirm/
What's the best way to use email_helper within the send-confirm function?
I've tried:
Symbolically linking the 'server' directory
Adding a local repo to send-confirm/package.json
Neither of the above work.
In principle, your Cloud Functions can use any other Node.js module, the same way any standard Node.js server would. However, since Cloud Functions needs to build your module in the cloud, it needs to be able to locate those dependency modules from the cloud. This is where the issue lies.
Cloud Functions can load modules from any one of these places:
Any public npm repository.
Any web-visible URL.
Anywhere in the functions/ directory that firebase init generates for you, and which gets uploaded on firebase deploy.
In your case, from the perspective of functions/package.json, the ../server/ directory doesn't fall under any of those categories, and so Cloud Functions can't use your module. Unfortunately, firebase deploy doesn't follow symlinks, which is why that solution doesn't work.
I see two possible immediate fixes:
Move your server/ directory to be under functions/. I realize this isn't the prettiest directory layout, but it's the easiest fix while hacking. In functions/package.json you can then have a local dependency on ./server.
Expose your code behind a URL somewhere. For example, you could package up a .tar and put that on Google Drive, or on Firebase Cloud Storage. Alternatively, you can use a public git repository.
In the future, I'd love it if firebase deploy followed symlinks. I've filed a feature request for that in Firebase's internal bug tracker.

How to deploy PKI in Azure using JSON template (windows server)

I'm new to Azure.
I have JSON template that successfully deploys VM.
Can I add some code to JSON template to deploy this VM with rootCA. Or some syntax for AD CS deployment.
I googled a lot but there are only DSC methods.
You can't "add some code to JSON template".
Your options:
Native ARM via Keyvault:
https://github.com/Azure/azure-quickstart-templates/blob/875d139c16c9c023dce519e6dd48c707e3473346/201-vm-push-certificate-windows/azuredeploy.json
Add an extention to the ARM template.
An extention can be DSC as you mentioned, but can also be custom PowerShell for example. (see custom script extension)
Run your script after the deployment. If you run New-AzureRmResourceGroupDeployment form PowerShell, you can output the VM connection information, and manage it after. See how to configure WinRM on a created VM.

where can I find the postreceive gear on openshfit?

My post receive hook simply runs gear postreceive. Where can I find this code and what it is doing?
There is nothing explaining this that I can find.
The code is available in OpenShift Origin Github repository https://github.com/openshift/origin-server/blob/efe69d24f4e7cb9941fb9932db8e6f3feebe6138/node/misc/bin/gear#L159. This primarily activates your deployment.