forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2650356
commit 7ee71d6
Showing
19 changed files
with
13,698 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ | |
build/_workspace | ||
build/_bin | ||
tests/testdata | ||
|
||
vendor | ||
contracts/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM golang:1.20-alpine | ||
|
||
RUN apk add bash make curl | ||
|
||
RUN mkdir -p $GOPATH/src/github.com/Kava-Labs/go-ethereum | ||
WORKDIR $GOPATH/src/github.com/Kava-Labs/go-ethereum | ||
|
||
COPY . . | ||
RUN make geth | ||
RUN cp ./build/bin/geth $GOPATH/bin/ | ||
|
||
CMD ["geth", "--dev", "--http", "--http.addr=0.0.0.0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
pragma solidity ^0.8.0; | ||
|
||
import "hardhat/console.sol"; | ||
|
||
address constant PRECOMPILED_STATELESS_SUM3_CONTRACT_ADDRESS = address(0x0b); | ||
|
||
contract ExampleStatelessSum3 { | ||
function sum3(uint256 a, uint256 b, uint256 c) public view returns (bytes memory) { | ||
(bool ok, bytes memory data) = address(PRECOMPILED_STATELESS_SUM3_CONTRACT_ADDRESS).staticcall(abi.encode(a,b,c)); | ||
require(ok, "call to precompiled contract failed"); | ||
|
||
return data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { HardhatUserConfig } from "hardhat/config"; | ||
import "@nomicfoundation/hardhat-toolbox"; | ||
|
||
const config: HardhatUserConfig = { | ||
defaultNetwork: "geth", | ||
networks: { | ||
hardhat: {}, | ||
geth: { | ||
url: "http://localhost:8545", | ||
} | ||
}, | ||
solidity: "0.8.19", | ||
}; | ||
|
||
export default config; |
Oops, something went wrong.