question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replace inline assembly with Solidity in ERC165Checker

See original GitHub issue

One of the few assembly blocks we have is in ERC165Checker.

https://github.com/OpenZeppelin/openzeppelin-solidity/blob/2ccc12b328e6d5d1d3faa5b99bec8d1de8b92fea/contracts/introspection/ERC165Checker.sol#L103-L120

I think we used assembly back then because Solidity didn’t have .staticcall yet. It should be possible to replace it with .staticcall and abi.decode now.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
frangiocommented, Jun 4, 2019
0reactions
yopereircommented, Jul 19, 2019

ok, i’ll do it over this weekend.

Read more comments on GitHub >

github_iconTop Results From Across the Web

solidity - Modifying simple function with inline assembly
put the initcode binary into memory and call create on it. So let's walk through the steps and see what we need to...
Read more >
Inline Assembly — Solidity 0.8.17 documentation
Inline assembly is a way to access the Ethereum Virtual Machine at a low level. ... libraries can enhance the Solidity language without...
Read more >
Utilities - OpenZeppelin Docs
Counters : a simple way to get a counter that can only be incremented, decremented or reset. Very useful for ID generation, counting...
Read more >
@openzeppelin/contracts | Yarn - Package Manager
A library for secure smart contract development. Build on a solid foundation of community-vetted code. Implementations of standards like ERC20 and ERC721.
Read more >
Solidity Tutorial : all about Assembly | by Jean Cvllr - Medium
However, Solidity supports inline assembly in its code. ... A stack is a data structure where you can only add (= PUSH) and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found