Skip to main content

All Questions

Filter by
Sorted by
Tagged with
327 votes
9 answers
118k views

`external` vs `public` best practices

Apart from the public modifier Ethereum introduces the external one. Both may be called outside of the contract and inside (the later one by this.f() pattern). Moreover, according to the docs: ...
Jakub Wojciechowski's user avatar
3 votes
1 answer
2k views

Can external solidity functions get called within the same contract dynamically?

Assume we have the following solidity contract: contract khiar { function mooz(uint size) external { // do something with mooz! } function bademjoon(uint size) external { /...
Ehsan Khodarahmi's user avatar
1 vote
2 answers
60 views

Why is the function external in the following solidity script?

Came across this script teaching people how to use library, but I don't understand why the function testFind should be external in the following script. The definition of external function is : ...
Simon Zhao's user avatar
0 votes
1 answer
32 views

Not being able to get interface to work

I have been trying to get a basic interface working on remix, but havent managed to. Did read a few examples but I must still be making some mistake. Trying to interact with this contract: // SPDX-...
Msantamaria's user avatar
0 votes
0 answers
61 views

Transaction reverts when i try to call a specific function of another smart contract

i'm facing a weird issue and i can't understand why it's happening after quadraple checking everything, i have a token which has USDT internal liquidity, i also have matrix contract which is in charge ...
S Arv's user avatar
  • 11
0 votes
2 answers
157 views

What if a dynamic call at the end of a function uses all the remaining gas of the caller?

Suppose we have a contact like this: contract x { function y() external { // do some magic! if (some_condition) { another_contract_address.call(abi.encodeWithSignature("...
Ehsan Khodarahmi's user avatar