Geth 1.13 (Cancun) update #8
11
Makefile
11
Makefile
@ -1,18 +1,13 @@
|
|||||||
CONTRACTS_DIR := ./test/contract/contracts
|
CONTRACTS_DIR := ./test/contract/contracts
|
||||||
CONTRACTS_OUTPUT_DIR := ./internal/testdata/build
|
CONTRACTS_OUTPUT_DIR := ./internal/testdata/build
|
||||||
|
|
||||||
GINKGO := go run github.com/onsi/ginkgo/v2/ginkgo
|
CONTRACTS := GLDToken Test
|
||||||
|
|
||||||
contracts: $(CONTRACTS_OUTPUT_DIR)/Test.bin $(CONTRACTS_OUTPUT_DIR)/Test.abi
|
contracts: $(foreach C,$(CONTRACTS), $(CONTRACTS_OUTPUT_DIR)/$C.bin $(CONTRACTS_OUTPUT_DIR)/$C.abi)
|
||||||
.PHONY: contracts
|
.PHONY: contracts
|
||||||
|
|
||||||
# Solidity 0.8.20 defaults to the Shanghai fork which includes the PUSH0 opcode
|
|
||||||
# which our testnet doesn't yet support, so use Paris.
|
|
||||||
$(CONTRACTS_OUTPUT_DIR)/%.bin $(CONTRACTS_OUTPUT_DIR)/%.abi: $(CONTRACTS_DIR)/%.sol
|
|
||||||
solc $< --abi --bin -o $(CONTRACTS_OUTPUT_DIR) --overwrite --evm-version=paris
|
|
||||||
|
|
||||||
test: contracts
|
test: contracts
|
||||||
$(GINKGO) -v -r ./validator_test
|
go test -p 1 -v ./pkg/...
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
# Downgrade from 18.16, see https://github.com/NomicFoundation/hardhat/issues/3877
|
# Downgrade from 18.16, see https://github.com/NomicFoundation/hardhat/issues/3877
|
||||||
FROM node:18.15-slim
|
FROM node:20-slim
|
||||||
|
|
||||||
ARG ETH_ADDR
|
|
||||||
ENV ETH_ADDR $ETH_ADDR
|
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
pragma solidity ^0.8.0;
|
pragma solidity ^0.8.25;
|
||||||
|
|
||||||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
||||||
|
|
||||||
contract GLDToken is ERC20 {
|
contract GLDToken is ERC20 {
|
||||||
constructor() ERC20("Gold", "GLD") {
|
constructor() ERC20("Gold", "GLD") {
|
||||||
_mint(msg.sender, 1000000000000000000000);
|
_mint(msg.sender, 1000000000000000000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
function destroy() public {
|
function destroy() public {
|
||||||
selfdestruct(payable(msg.sender));
|
(bool ok, ) = payable(msg.sender).call{value: address(this).balance}("");
|
||||||
|
require(ok, "ETH transfer failed");
|
||||||
|
|
||||||
|
_burn(msg.sender, balanceOf(msg.sender));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ contract Test {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function close() public onlyOwner {
|
function close() public onlyOwner {
|
||||||
owner.transfer(address(this).balance);
|
(bool ok, ) = owner.call{value: address(this).balance}("");
|
||||||
|
require(ok, "ETH transfer failed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,9 +28,8 @@ if (process.env.DEPLOYER_PRIVATE_KEY) {
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
solidity: {
|
solidity: {
|
||||||
version: '0.8.20',
|
version: "0.8.25",
|
||||||
settings: {
|
settings: {
|
||||||
evmVersion: 'paris', // see Makefile
|
|
||||||
outputSelection: {
|
outputSelection: {
|
||||||
'*': {
|
'*': {
|
||||||
'*': [
|
'*': [
|
||||||
|
2139
test/contract/package-lock.json
generated
2139
test/contract/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -11,9 +11,10 @@
|
|||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"description": "Solidity contract deployment server for integration testing",
|
"description": "Solidity contract deployment server for integration testing",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@openzeppelin/contracts": "^4.0.0",
|
"@openzeppelin/contracts": "^5.0.2",
|
||||||
"fastify": "^4.0.0",
|
"fastify": "^4.26.2",
|
||||||
"hardhat": "^2.14.0"
|
"hardhat": "^2.22.3",
|
||||||
|
"solidity-create2-deployer": "^0.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nomiclabs/hardhat-ethers": "^2.2.3",
|
"@nomiclabs/hardhat-ethers": "^2.2.3",
|
||||||
|
Loading…
Reference in New Issue
Block a user