Skip to content
New issue

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

Deploy a contract which delegate call nonexistent contract address is confusing #149

Open
Web3Pignard opened this issue Jan 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Web3Pignard
Copy link

Bug Description
When I deploy a contract which delegate call nonexistent contract address, The performance of neon evm is different from other evm.
The following is the transaction sent to polygon mubai. The browser can check that the transaction failed.
https://mumbai.polygonscan.com/tx/0xc55470a810d57e7562ef9a2bce4a1f246913338e942308bbb0c87e4fb5613d03
But for transaction sent to neon evm, I can't query any transactions on the browser even though the eth_sendRawTransaction interface returns a successful transaction hash.
image

Steps to Reproduce
The following is my unit test based on "github.com/ethereum/go-ethereum" library.

func TestCallNeonEVM(t *testing.T) {
	// account info,use your own
	var privateKey *ecdsa.PrivateKey 
	
	// node info
	nodeURL := "https://devnet.neonevm.org"
	chainId := big.NewInt(245022926)
	
	// tx info
	var to *common.Address
	var nonce uint64 = 0
	gasPrice := hexutil.MustDecodeBig("0x37e11d600")
	gas := hexutil.MustDecodeUint64("0x7a1200")
	value := big.NewInt(0)
	input := hexutil.MustDecode("0x60806040523480156200001157600080fd5b5060405162001e4f38038062001e4f833981016040819052620000349162000cb3565b60408051808201909152601781527f566573746f20564c69676874686f7573652050726f787900000000000000000060208083019182527fdc462b970002d5e52aceeb84e0677a098763e0e3db2e72bb5d57ae99c3f9d74a80546001600160a01b031916309081179091557f371c6bd7737d53c5a96989b29c5812746375eee35ba2656b20df9c862cf846726000908152600490925283519093927ff298104629b77a96487e975d5aab90fd94c6155c2c5d8b3256094e36030a010292916200011f917f5a044a2e95d76693c83a3139fab82fa2312e30e79914e43b8699a6577e3e65a99162000876565b507f5cae4596219af502fd68068ca59387d7128f6cb33c3bd8efffce93ff692b3531919091557f834927828babdb3bd19aab73333470742d36b134b7cdb1e24d1f849df8e53cd080546001600160a01b03199081166001600160a01b03938416179091557fee363adaddd006a84c2cfe1a232e64ced5d43481958c6caacf287dd4c23b8f208c90557f5d43ae6a2da990254a1b06677130df0a2ecba92eeec05524fac6d5ed1b9b89e68054909116918b1691909117905550507fbb55fe5c988d805c5b4ec1720b489433d73c2c2f4ad95d78dcd58a4f88eadeef60005260046020908152865162000236917f22a3473780a3729eac674e41602b558437ddce82fc233fa70180af3bdfd53b14919089019062000876565b507f7b097a00fa1606c821ffcf32313bd5fbc91bb3f8b281d443d3dcd59140ad9140600090815260026020527fce7af75b729e58c6483cdaf666548c7e91f5d5de6371320d96ff8b76542bfe478690555b82518110156200032257818181518110620002a657620002a662000dbb565b602002602001015160056000620002df868581518110620002cb57620002cb62000dbb565b6020026020010151620007b460201b60201c565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039290921691909117905580620003198162000dd1565b91505062000287565b5060006200037f6040518060400160405280601081526020016f566573746f20565573657250726f787960801b8152507f6621701f30d7671c8f068bd0b816ff05ec9dd765668640b12ad8bd996bb96e11620007e660201b60201c565b90506000620003ea6040518060400160405280601481526020017f566573746f205645786368616e676550726f78790000000000000000000000008152507f8183ed30c102962fafe730a6ba4671af23bfb5cf6cf1b5512d7c2fec94a4d7b2620007e660201b60201c565b9050600080600060018d148062000401575060058d145b90508015620005965760408051808201909152601381527f566573746f20564272696467652050726f78790000000000000000000000000060208201526200046a907ffdaf93a76131deaca6b5291149416493a1d41f3e2897f4b00a51136619f8db1a620007e6565b9250620004c760405180604001604052806011815260200170566573746f2056446546692050726f787960781b8152507f58a34f52fa6f653a4b350726bc491a6cdfd895495fc7d95a9590283996b59e9e620007e660201b60201c565b60405163189acdbd60e31b81526001600160a01b0387811660048301529193509084169063c4d66de890602401600060405180830381600087803b1580156200050f57600080fd5b505af115801562000524573d6000803e3d6000fd5b505060405163c0c53b8b60e01b81526001600160a01b038881166004830152868116602483015287811660448301528516925063c0c53b8b9150606401600060405180830381600087803b1580156200057c57600080fd5b505af115801562000591573d6000803e3d6000fd5b505050505b6040516335c9e6a160e01b81526001600160a01b038616906335c9e6a190620005c89086908d908d9060040162000ef1565b600060405180830381600087803b158015620005e357600080fd5b505af1158015620005f8573d6000803e3d6000fd5b505060405163c0c53b8b60e01b81526001600160a01b038881166004830152868116602483015285811660448301528716925063c0c53b8b9150606401600060405180830381600087803b1580156200065057600080fd5b505af115801562000665573d6000803e3d6000fd5b5050600560209081527f748e9cccd97aa4996605fb0e3e4506984e60f788db03101d4ba52a3e2feb903a80546001600160a01b03199081166001600160a01b038b81169182179093557f5671281af7ae733d58c6bc2bdbafd16958fd2ad5a5052d635081048b2e98ec6b805483168a85169081179091557f35e52e8acd636054303b7da3065d3f5b61b2a1efd0c17a2124e1d850b6b1dc5a805484168a86169081179091557f6e6505c4461b7cbd30acde52e3353f55ff4f5fb7092c3da71c5eb47de4a8b0aa6000527f69ac91b7a219c9bbef2d52ec28e23230c48c57a1353663b6b93a6ae440986fad8054909416948c1694851790935560408051928352948201529283015260608201527f6707255b2c5ca81220b2f3e408a269cb83baa6aa7e5e37aa1756883a6cdf06f19250608001905060405180910390a15050505050505050505050505062000fe9565b600081604051602001620007c9919062000f35565b604051602081830303815290604052805190602001209050919050565b600082604051602001620007fb919062000f53565b60408051601f198184030181528282528051602091820120600086815260059092529190205490913091869186916001600160a01b0316906200083e9062000905565b6200084d949392919062000f6f565b8190604051809103906000f59050801580156200086e573d6000803e3d6000fd5b509392505050565b828054620008849062000fac565b90600052602060002090601f016020900481019282620008a85760008555620008f3565b82601f10620008c357805160ff1916838001178555620008f3565b82800160010185558215620008f3579182015b82811115620008f3578251825591602001919060010190620008d6565b506200090192915062000913565b5090565b61085280620015fd83390190565b5b8082111562000901576000815560010162000914565b80516001600160a01b03811681146200094257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b038111828210171562000982576200098262000947565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620009b357620009b362000947565b604052919050565b60005b83811015620009d8578181015183820152602001620009be565b83811115620009e8576000848401525b50505050565b600082601f83011262000a0057600080fd5b81516001600160401b0381111562000a1c5762000a1c62000947565b62000a31601f8201601f191660200162000988565b81815284602083860101111562000a4757600080fd5b62000a5a826020830160208701620009bb565b949350505050565b60006001600160401b0382111562000a7e5762000a7e62000947565b5060051b60200190565b600082601f83011262000a9a57600080fd5b8151602062000ab362000aad8362000a62565b62000988565b82815260059290921b8401810191818101908684111562000ad357600080fd5b8286015b8481101562000bb45780516001600160401b038082111562000af95760008081fd5b9088019060a0828b03601f190181131562000b145760008081fd5b62000b1e6200095d565b878401518381111562000b315760008081fd5b62000b418d8a83880101620009ee565b8252506040808501518481111562000b595760008081fd5b62000b698e8b83890101620009ee565b8a840152506060935062000b7f8486016200092a565b908201526080848101516004811062000b985760008081fd5b9382019390935292015190820152835291830191830162000ad7565b509695505050505050565b600082601f83011262000bd157600080fd5b8151602062000be462000aad8362000a62565b82815260059290921b8401810191818101908684111562000c0457600080fd5b8286015b8481101562000bb45780516001600160401b0381111562000c295760008081fd5b62000c398986838b0101620009ee565b84525091830191830162000c08565b600082601f83011262000c5a57600080fd5b8151602062000c6d62000aad8362000a62565b82815260059290921b8401810191818101908684111562000c8d57600080fd5b8286015b8481101562000bb45762000ca5816200092a565b835291830191830162000c91565b600080600080600080600080610100898b03121562000cd157600080fd5b8851975062000ce360208a016200092a565b60408a01519097506001600160401b038082111562000d0157600080fd5b62000d0f8c838d01620009ee565b975060608b0151965060808b015191508082111562000d2d57600080fd5b62000d3b8c838d0162000a88565b955060a08b015191508082111562000d5257600080fd5b62000d608c838d0162000a88565b945060c08b015191508082111562000d7757600080fd5b62000d858c838d0162000bbf565b935060e08b015191508082111562000d9c57600080fd5b5062000dab8b828c0162000c48565b9150509295985092959890939650565b634e487b7160e01b600052603260045260246000fd5b600060001982141562000df457634e487b7160e01b600052601160045260246000fd5b5060010190565b6000815180845262000e15816020860160208601620009bb565b601f01601f19169290920160200192915050565b600081518084526020808501808196508360051b810191508286016000805b8681101562000ee3578385038a52825160a0815181885262000e6d8289018262000dfb565b915050878201518782038989015262000e87828262000dfb565b6040848101516001600160a01b0316908a01526060808501519193509150600480821062000ec257634e487b7160e01b875260218152602487fd5b50908801526080918201519190960152988501989185019160010162000e48565b509298975050505050505050565b6001600160a01b038416815260606020820181905260009062000f179083018562000e29565b828103604084015262000f2b818562000e29565b9695505050505050565b6000825162000f49818460208701620009bb565b9190910192915050565b60208152600062000f68602083018462000dfb565b9392505050565b600060018060a01b0380871683526080602084015262000f93608084018762000dfb565b6040840195909552929092166060909101525092915050565b600181811c9082168062000fc157607f821691505b6020821081141562000fe357634e487b7160e01b600052602260045260246000fd5b50919050565b6106048062000ff96000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806306fdde03146100ea57806329c9ef871461010857806354fd4d501461011d578063b97a231914610142575b6000610056610162565b90506001600160a01b0381166100c05760405162461bcd60e51b815260206004820152602560248201527f4150726f78793a494e56414c49445f494d504c454d454e544154494f4e5f4144604482015264445245535360d81b606482015260840160405180910390fd5b60405136600082376000803683855af43d82016040523d6000833e8080156100e6573d83f35b3d83fd5b6100f2610327565b6040516100ff91906104ae565b60405180910390f35b610110610403565b6040516100ff91906104de565b6040805180820190915260098152682634b6b29025b4b63760b91b60208201526100f2565b61014a610162565b6040516001600160a01b0390911681526020016100ff565b7f834927828babdb3bd19aab73333470742d36b134b7cdb1e24d1f849df8e53cd0547f4cfb9bd6167fa81a6b1756e99628e60ca08e6d0ddc3be6305a872a7a5f54dbdf600090815260208190527f5cae4596219af502fd68068ca59387d7128f6cb33c3bd8efffce93ff692b35315490916001600160a01b03169081156101e95750919050565b7ff298104629b77a96487e975d5aab90fd94c6155c2c5d8b3256094e36030a010281141561026b5750507ff298104629b77a96487e975d5aab90fd94c6155c2c5d8b3256094e36030a01026000525060056020527fddb9b64ff5c9deb603aaaf4a9324e68d3626048a86855d5e481a41dadd1fcf94546001600160a01b031690565b7f5847d5a8b03bf3d00439d125fa89c070193cd8bb92b127bcc572d730b176c56260005260056020527fdc462b970002d5e52aceeb84e0677a098763e0e3db2e72bb5d57ae99c3f9d74a5460405163ba7fd14b60e01b8152600481018390526001600160a01b039091169063ba7fd14b90602401602060405180830381865afa1580156102fc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610320919061056a565b9250505090565b7f371c6bd7737d53c5a96989b29c5812746375eee35ba2656b20df9c862cf8467260005260046020527f5a044a2e95d76693c83a3139fab82fa2312e30e79914e43b8699a6577e3e65a980546060919061038090610593565b80601f01602080910402602001604051908101604052809291908181526020018280546103ac90610593565b80156103f95780601f106103ce576101008083540402835291602001916103f9565b820191906000526020600020905b8154815290600101906020018083116103dc57829003601f168201915b5050505050905090565b61040b610418565b610413610418565b919050565b6040518060a00160405280606081526020016060815260200160006001600160a01b0316815260200160006003811115610454576104546104c8565b8152602001600081525090565b6000815180845260005b818110156104875760208185018101518683018201520161046b565b81811115610499576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006104c16020830184610461565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081526000825160a060208401526104fa60c0840182610461565b90506020840151601f198483030160408501526105178282610461565b91505060018060a01b03604085015116606084015260608401516004811061054f57634e487b7160e01b600052602160045260246000fd5b80608085015250608084015160a08401528091505092915050565b60006020828403121561057c57600080fd5b81516001600160a01b03811681146104c157600080fd5b600181811c908216806105a757607f821691505b602082108114156105c857634e487b7160e01b600052602260045260246000fd5b5091905056fea26469706673582212204e29f2b1c1c781e5e4d3d5e169ee2af221330ef3e6c788faa7a96c183a72a1f064736f6c634300080a0033608060405234801561001057600080fd5b5060405161085238038061085283398101604081905261002f91610231565b7fdc462b970002d5e52aceeb84e0677a098763e0e3db2e72bb5d57ae99c3f9d74a80546001600160a01b0319166001600160a01b0386161790557f371c6bd7737d53c5a96989b29c5812746375eee35ba2656b20df9c862cf8467260005260046020908152835185918591859185916100cd917f5a044a2e95d76693c83a3139fab82fa2312e30e79914e43b8699a6577e3e65a99190860190610166565b507f5cae4596219af502fd68068ca59387d7128f6cb33c3bd8efffce93ff692b3531919091557f557063edba426bd2c5c98e92621918641cabde97c521501592db222d3ab96b5e60005260056020527f834927828babdb3bd19aab73333470742d36b134b7cdb1e24d1f849df8e53cd080546001600160a01b0319166001600160a01b039092169190911790555061036a945050505050565b8280546101729061032f565b90600052602060002090601f01602090048101928261019457600085556101da565b82601f106101ad57805160ff19168380011785556101da565b828001600101855582156101da579182015b828111156101da5782518255916020019190600101906101bf565b506101e69291506101ea565b5090565b5b808211156101e657600081556001016101eb565b80516001600160a01b038116811461021657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561024757600080fd5b610250856101ff565b602086810151919550906001600160401b038082111561026f57600080fd5b818801915088601f83011261028357600080fd5b8151818111156102955761029561021b565b604051601f8201601f19908116603f011681019083821181831017156102bd576102bd61021b565b816040528281528b868487010111156102d557600080fd5b600093505b828410156102f757848401860151818501870152928501926102da565b828411156103085760008684830101525b80985050505050505060408501519150610324606086016101ff565b905092959194509250565b600181811c9082168061034357607f821691505b6020821081141561036457634e487b7160e01b600052602260045260246000fd5b50919050565b6104d9806103796000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806306fdde03146100df57806354fd4d50146100fd578063b97a231914610122575b600061004b610142565b90506001600160a01b0381166100b55760405162461bcd60e51b815260206004820152602560248201527f4150726f78793a494e56414c49445f494d504c454d454e544154494f4e5f4144604482015264445245535360d81b606482015260840160405180910390fd5b60405136600082376000803683855af43d82016040523d6000833e8080156100db573d83f35b3d83fd5b6100e7610307565b6040516100f491906103e3565b60405180910390f35b6040805180820190915260098152682634b6b29025b4b63760b91b60208201526100e7565b61012a610142565b6040516001600160a01b0390911681526020016100f4565b7f834927828babdb3bd19aab73333470742d36b134b7cdb1e24d1f849df8e53cd0547f4cfb9bd6167fa81a6b1756e99628e60ca08e6d0ddc3be6305a872a7a5f54dbdf600090815260208190527f5cae4596219af502fd68068ca59387d7128f6cb33c3bd8efffce93ff692b35315490916001600160a01b03169081156101c95750919050565b7ff298104629b77a96487e975d5aab90fd94c6155c2c5d8b3256094e36030a010281141561024b5750507ff298104629b77a96487e975d5aab90fd94c6155c2c5d8b3256094e36030a01026000525060056020527fddb9b64ff5c9deb603aaaf4a9324e68d3626048a86855d5e481a41dadd1fcf94546001600160a01b031690565b7f5847d5a8b03bf3d00439d125fa89c070193cd8bb92b127bcc572d730b176c56260005260056020527fdc462b970002d5e52aceeb84e0677a098763e0e3db2e72bb5d57ae99c3f9d74a5460405163ba7fd14b60e01b8152600481018390526001600160a01b039091169063ba7fd14b90602401602060405180830381865afa1580156102dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103009190610438565b9250505090565b7f371c6bd7737d53c5a96989b29c5812746375eee35ba2656b20df9c862cf8467260005260046020527f5a044a2e95d76693c83a3139fab82fa2312e30e79914e43b8699a6577e3e65a980546060919061036090610468565b80601f016020809104026020016040519081016040528092919081815260200182805461038c90610468565b80156103d95780601f106103ae576101008083540402835291602001916103d9565b820191906000526020600020905b8154815290600101906020018083116103bc57829003601f168201915b5050505050905090565b600060208083528351808285015260005b81811015610410578581018301518582016040015282016103f4565b81811115610422576000604083870101525b50601f01601f1916929092016040019392505050565b60006020828403121561044a57600080fd5b81516001600160a01b038116811461046157600080fd5b9392505050565b600181811c9082168061047c57607f821691505b6020821081141561049d57634e487b7160e01b600052602260045260246000fd5b5091905056fea2646970667358221220df5f41c47f26d5e3942045db0895da81bb4ba5147976a7ea498c6c50660b975b64736f6c634300080a00330000000000000000000000000000000000000000000000000000000000000005000000000000000000000000ae9b2ea7f1d39b3353556fb07cf9c4e78793c105000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004a00000000000000000000000000000000000000000000000000000000000000760000000000000000000000000000000000000000000000000000000000000002464393437326338632d663234652d343864662d393635632d666362323131336362373761000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000058ad9135b6ab86d741d2fb88a4d9b6fe6987285700000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002437386137356164622d656234312d343436612d383264312d63323862333864363263373700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002464393437326338632d663234652d343864662d393635632d666362323131336362373761000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000a9f7a4bc2613225101dada17f62fa85e91d6bc1700000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002464636134366632322d323966332d343664392d626362362d62343336393531363764356200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002464393437326338632d663234652d343864662d393635632d66636232313133636237376100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000115645584348414e47455f41444452455353000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d56555345525f41444452455353000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013564c49474854484f5553455f4144445245535300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e5645524332305f41444452455353000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f5657414c4c45545f414444524553530000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f564252494447455f414444524553530000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d56444546495f414444524553530000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070000000000000000000000005a3a9c5084df6ab0336f190cb755420bcca459c200000000000000000000000072ffc6cff7e8558669e188ccf27b216455c77f5700000000000000000000000093181133dc8d877c98f90dcdcc457dce2a8ac2ad000000000000000000000000a757ac16aeabb24e4d74a136ff1e2757e1335155000000000000000000000000b0b815f36f69a7b27e4b908b7780769bd018eed9000000000000000000000000ce01522fa50555998711adf2623bacac104f63e9000000000000000000000000fc1bb444928bc37f2ab198f6a353c84a9d8f9ed4")

	
	client, _ := ethclient.DialContext(context.TODO(), nodeURL)
	innerTx := &types.LegacyTx{
		To:       to,
		Nonce:    nonce,
		GasPrice: gasPrice,
		Gas:      gas,
		Value:    value,
		Data:     input,
	}
	tx := types.NewTx(innerTx)
	signer := types.NewEIP155Signer(chainId) // neon devnet chain id
	signature, _ := crypto.Sign(signer.Hash(tx).Bytes(), privateKey)
	signedTx, _ := tx.WithSignature(signer, signature)
	client.SendTransaction(context.TODO(), signedTx)
}

Actual Behavior
Query nothing on the browser.

Expected Behavior
Query failed transactions on the browser.

@Web3Pignard Web3Pignard added the bug Something isn't working label Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant