We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geth version: Geth Version: 1.10.5-stable Git Commit: 33ca98e Git Commit Date: 20210714 Architecture: amd64 Go Version: go1.16.6 Operating System: linux GOPATH= GOROOT=go
OS & Version: latest docker on Mac Commit hash : (if develop)
develop
start node shell
geth --datadir $(pwd)/tmp/geth --nodiscover \ --gcmode=archive --syncmode full --dev --dev.period 15 \ --http --http.addr 0.0.0.0 --http.api "net,web3,eth,debug" --http.corsdomain=* --http.vhosts=* \ --ws --ws.addr 0.0.0.0 --ws.api "net,web3,eth,debug" --ws.origins=*
deploy a simple ERC20 contract
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; contract ERC20 { string constant public symbol = "TEST"; string constant public name = "TEST"; uint8 constant public decimals = 6; uint256 public totalSupply = 1e8 * 10 ** uint256(decimals); mapping(address => uint256) balances; event Transfer(address indexed from, address indexed to, uint256 tokens); constructor() { balances[msg.sender] = totalSupply; emit Transfer(address(0), msg.sender, totalSupply); } function balanceOf(address tokenOwner) public view returns (uint256 balance) { return balances[tokenOwner]; } function transfer(address to, uint256 tokens) public returns (bool success) { require(balances[msg.sender] >= tokens, "insufficient balance"); balances[msg.sender] -= tokens; balances[to] += tokens; emit Transfer(msg.sender, to, tokens); return true; } }
Request
curl --location --request POST 'http://127.0.0.1:8545' \ --header 'Content-Type: application/json' \ --data-raw '{ "id": "1", "jsonrpc": "2.0", "method": "eth_createAccessList", "params": [ { "from": "0xDD71ed3203c79A6073980Ec1faa44063B1EC9956", "to": "0x28fDB06D263674bF2B8eD55181Ed80afcBaE8976", "gas": "0x1547b", "data": "0xa9059cbb0000000000000000000000006cc8dcbca746a6e4fdefb98e1d0df903b107fd210000000000000000000000000000000000000000000000000000000009d91453" } ] }'
{ "jsonrpc": "2.0", "id": "1", "error": { "code": -32000, "message": "method handler crashed" } }
RPC method eth_createAccessList crashed: runtime error: invalid memory address or nil pointer dereference goroutine 42462 [running]: github.com/ethereum/go-ethereum/rpc.(*callback).call.func1(0xc009a0cf00, 0x14, 0xc0005d9d58) github.com/ethereum/go-ethereum/rpc/service.go:200 +0xbd panic(0x4e87cc0, 0x5a79450) runtime/panic.go:965 +0x1b9 math/big.(*Int).Set(...) math/big/int.go:75 github.com/ethereum/go-ethereum/core.NewEVMTxContext(0x524d9a0, 0xc0001d3050, 0x0, 0x0, 0x0, 0x0) github.com/ethereum/go-ethereum/core/evm.go:71 +0xc5 github.com/ethereum/go-ethereum/eth.(*EthAPIBackend).GetEVM(0xc00011b170, 0x523ebb8, 0xc0095def80, 0x524d9a0, 0xc0001d3050, 0xc00a3aad80, 0xc00910d440, 0xc00b000000, 0xc00025c140, 0x9, ...) github.com/ethereum/go-ethereum/eth/api_backend.go:204 +0x7f github.com/ethereum/go-ethereum/internal/ethapi.AccessList(0x523ebb8, 0xc0095def80, 0x5258318, 0xc00011b170, 0xc00c3e6f08, 0x0, 0x4ebe000, 0xc009a0cf18, 0xc009a0cf30, 0xc00c3e6f00, ...) github.com/ethereum/go-ethereum/internal/ethapi/api.go:1449 +0x957 github.com/ethereum/go-ethereum/internal/ethapi.(*PublicBlockChainAPI).CreateAccessList(0xc00011ced0, 0x523ebb8, 0xc0095def80, 0xc009a0cf18, 0xc009a0cf30, 0xc00c3e6f00, 0x0, 0x0, 0x0, 0x0, ...) github.com/ethereum/go-ethereum/internal/ethapi/api.go:1386 +0x138 reflect.Value.call(0xc00026e580, 0xc000011760, 0x13, 0x500d6d0, 0x4, 0xc00d775aa0, 0x4, 0x4, 0xc00d775ad0, 0xc00dc7c7b0, ...) reflect/value.go:476 +0x8e7 reflect.Value.Call(0xc00026e580, 0xc000011760, 0x13, 0xc00d775aa0, 0x4, 0x4, 0x0, 0x0, 0x4f07520) reflect/value.go:337 +0xb9 github.com/ethereum/go-ethereum/rpc.(*callback).call(0xc008a31080, 0x523ebb8, 0xc0095def80, 0xc009a0cf00, 0x14, 0xc00dc7c7b0, 0x2, 0x2, 0x0, 0x0, ...) github.com/ethereum/go-ethereum/rpc/service.go:206 +0x2c5 github.com/ethereum/go-ethereum/rpc.(*handler).runMethod(0xc0001d2ea0, 0x523ebb8, 0xc0095def80, 0xc00edece00, 0xc008a31080, 0xc00dc7c7b0, 0x2, 0x2, 0x2) github.com/ethereum/go-ethereum/rpc/handler.go:389 +0x8a github.com/ethereum/go-ethereum/rpc.(*handler).handleCall(0xc0001d2ea0, 0xc00dc7c720, 0xc00edece00, 0x203003) github.com/ethereum/go-ethereum/rpc/handler.go:337 +0x265 github.com/ethereum/go-ethereum/rpc.(*handler).handleCallMsg(0xc0001d2ea0, 0xc00dc7c720, 0xc00edece00, 0x5231201) github.com/ethereum/go-ethereum/rpc/handler.go:298 +0x1be github.com/ethereum/go-ethereum/rpc.(*handler).handleMsg.func1(0xc00dc7c720) github.com/ethereum/go-ethereum/rpc/handler.go:139 +0x46 github.com/ethereum/go-ethereum/rpc.(*handler).startCallProc.func1(0xc0001d2ea0, 0xc00011a360) github.com/ethereum/go-ethereum/rpc/handler.go:226 +0xd2 created by github.com/ethereum/go-ethereum/rpc.(*handler).startCallProc github.com/ethereum/go-ethereum/rpc/handler.go:222 +0x66
When submitting logs: please submit them as text and not screenshots.
The text was updated successfully, but these errors were encountered:
Just from the cursory code overview, gasPrice seems to be a mandatory parameter in this API call,
gasPrice
try adding it to your request:
curl --location --request POST 'http://127.0.0.1:8545' \ --header 'Content-Type: application/json' \ --data-raw '{ "id": "1", "jsonrpc": "2.0", "method": "eth_createAccessList", "params": [ { "from": "0xDD71ed3203c79A6073980Ec1faa44063B1EC9956", "to": "0x28fDB06D263674bF2B8eD55181Ed80afcBaE8976", "gas": "0x1547b", "gasPrice": "10000000000", "data": "0xa9059cbb0000000000000000000000006cc8dcbca746a6e4fdefb98e1d0df903b107fd210000000000000000000000000000000000000000000000000000000009d91453" } ] }'
Although some kind of validation for mandatory params should exists for this API to allow for graceful error-reporting.
Sorry, something went wrong.
MariusVanDerWijden
Successfully merging a pull request may close this issue.
System information
Geth version:
Geth
Version: 1.10.5-stable
Git Commit: 33ca98e
Git Commit Date: 20210714
Architecture: amd64
Go Version: go1.16.6
Operating System: linux
GOPATH=
GOROOT=go
OS & Version: latest docker on Mac
Commit hash : (if
develop
)Expected behaviour
Actual behaviour
Steps to reproduce the behaviour
start node shell
deploy a simple ERC20 contract
Request
Backtrace
When submitting logs: please submit them as text and not screenshots.
The text was updated successfully, but these errors were encountered: