The Wayback Machine - https://web.archive.org/web/20210608142858/https://github.com/topics/solidity
Skip to content
#

solidity

Here are 4,875 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

axic
axic commented May 21, 2021

This would increase readability in bigger tests, such as those in semanticTests/externalContracts.

// -- Double reserve
// account: 1
// reserve(string), 69 ether: 0x20, 3, "abc" ->
// owner(string): 0x20, 3, "abc" -> 0x1212121212121212121212121212120000000012
// account: 0
// -- Transfer
// setContent(string,bytes32): 0x40, 0, 3, "abc" ->
// transfer(string,address): 0x40, 555, 3
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 Jun 1, 2021

This is a bug report of an edge case that can only happen if you have a hardhat project inside a monorepo, and the hardhat project is also an npm project p.

If a solidity file within p imports another one using import "p/contracts/...", the compilation will fail. The reason for this is that the file ends up with two source names p/contract/... and contracts/....

This only happens w

brownie
PatrickAlphaC
PatrickAlphaC commented Jan 20, 2021

Overview

If I import a file that has a constructor and just that file, and try to compile and deploy, brownie ignores it.

Specification

Here's what a file that brownie would ignore looks like:

pragma solidity 0.4.24;

import "@chainlink/contracts/src/v0.4/Oracle.sol";

(I remapped chainlink contacts so I could use the @ syntax)

However, Oracle.sol has a constructo

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