golint fix ++ instead of +=1 and add comment to script to build .hex files

This commit is contained in:
Mike Seiler 2023-01-16 17:06:25 +00:00
parent 77cdf26223
commit b49c455df0
2 changed files with 4 additions and 1 deletions

View File

@ -1,3 +1,6 @@
#use the solc compiler https://docs.soliditylang.org/en/v0.8.17/installing-solidity.html
# to compile all of the .sol files to their corresponding evm binary files stored as .hex
# solc outputs to stdout a format that we just want to grab the last line of and then remove the trailing newline on that line
find -type f -name \*.sol -print0 |
xargs -0 -I{} bash -c 'solc --bin {} |tail -n1 | tr -d "\n" > $(echo {} | sed -e s/.sol$/.hex/)'

View File

@ -68,7 +68,7 @@ func TestFEVMBasic(t *testing.T) {
// invoke the contract with non owner
{
inputData := inputDataFromFrom(t, ctx, client, fromAddr)
inputData[31] += 1 // change the pub address to one that has 0 balance by modifying the last byte of the address
inputData[31]++ // change the pub address to one that has 0 balance by incrementing the last byte of the address
result := client.EVM().InvokeContractByFuncName(ctx, fromAddr, idAddr, "getBalance(address)", inputData)
expectedResult, err := hex.DecodeString("0000000000000000000000000000000000000000000000000000000000000000")