Skip to content
#

solidity

Here are 5,245 public repositories matching this topic...

shrugs
shrugs commented Apr 12, 2018

🎉 Description

The ECDSA contract has a function toEthSignedMessage(bytes32), but we should have a function that works for any length of a bytes array:

function toEthSignedMessage(bytes s) pure internal returns (bytes32) {
  return keccak256(
    "\x19Ethereum Signed Message:\n",
    uintToBytes(s.length),
    s);
}

Where uintToBytes is implemented from an ideally

JimLynchCodes
JimLynchCodes commented May 18, 2021

Hi, just wondering why there are no tests in the scaffolded project when running truffle init...

Can I make a PR adding this? Where in the main truffle source code should I put this file?

thanks!

chainlink
0xfoobar
0xfoobar commented May 20, 2021

Description
Add a contract similar to Aave's AddressProvider or Uniswap's getPair() functionality.

Motivation
On-chain lookups of price oracles given the asset addresses.

Justification
String manipulation is difficult and expensive in Solidity, and you usually work with the token address, not its string name.

alcuadrado
alcuadrado commented Jul 22, 2021

This was reported by @nventuro

If you have your own artifacts-loading logic, and have a contract that needs to be linked, our plugin doesn't help you. You'd have to link the libraries manually.

We should have overloads that take an Artifact, and take care of the library linking.

getContractAt doesn't really need this overload, but it would be great to be consistent.

brownie

Improve this page

Add a description, image, and links to the solidity topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the solidity topic, visit your repo's landing page and select "manage topics."

Learn more