Teamwork

Our communities aren’t always formed by geography. Especially now, for people who often find themselves on the margins of mainstream society, including those with Autism Spectrum Disorder (ASD) and…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




What is a delegate call in Solidity?

How to make delegate calls in Solidity?

As a Smart Contract developer, you might come across several use cases where a Smart Contract should be able to call the functions of another Smart Contract. This is called Cross-Contract Calls. One such way to make a Cross-Contract call is by using the delegatecall function.

For understanding, let’s consider two Smart Contracts: one Caller Contract and one Target Contract. We will make Cross-Contract calls from the Caller Contract to the Target Contract.

In Ethereum, a deployed Smart Contract always has an address. To call the Target Contract knowing its address is a must. This address object has a method called delegatecall. This method is used to make delegate calls in Solidity.

Now, let's see how delegate calls are implemented.

Diagramatic representation of the delegatecall function in Solidity

Thanks for reading this article ❤

Comment on the topic of Blockchain you would like to learn next.

Clap 👏 If this article helps you.

Add a comment

Related posts:

Create your Tapestry of Words

It is the start of a New Year, Filled with joy and less of fear. It is a great time to begin creating, The tapestry of your unbridled writing. Collect the ideas that fly around in the air, Write them…

My Experience as a Web Developer and Design Intern

I was a Web-Development and Design intern at Oasis Infobyte during the month of October. This internship is a 1-month remote internship. I am delighted to be a part of Oasis Infobyte through this…

Comparative Guide to Stablecoins 2019

The infamous instability of the crypto market has brought forth a new class of cryptocurencies — stablecoins. Here’s a short comprehensive list of all the stablecoins out there at this moment…