The smart contract file is too large and the deployment contract fails

1. Problem description: The code deployment pledge contract, because the smart contract file is too large, the following abnormality occurs. (The gas fee needs to be controlled within 1eth)
Insert picture description here1-1. Solution: According to the adjusted rule in remix+metamask: the gasPrice and gasLimit need to be controlled within 1eth.

1-2. Code control: call the deploy method of
Insert picture description hereEthereum to call the smart contract to control the parameters in the send method, as shown in the figure below, control gasPrice*gasLimit/10**18 within 1eth, for example, set 400 and 2446028 respectively.

Guess you like

Origin blog.csdn.net/qq_43234632/article/details/110819829