golint fix ++ instead of +=1 and add comment to script to build .hex files
This commit is contained in:
parent
77cdf26223
commit
b49c455df0
@ -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 |
|
find -type f -name \*.sol -print0 |
|
||||||
xargs -0 -I{} bash -c 'solc --bin {} |tail -n1 | tr -d "\n" > $(echo {} | sed -e s/.sol$/.hex/)'
|
xargs -0 -I{} bash -c 'solc --bin {} |tail -n1 | tr -d "\n" > $(echo {} | sed -e s/.sol$/.hex/)'
|
||||||
|
@ -68,7 +68,7 @@ func TestFEVMBasic(t *testing.T) {
|
|||||||
// invoke the contract with non owner
|
// invoke the contract with non owner
|
||||||
{
|
{
|
||||||
inputData := inputDataFromFrom(t, ctx, client, fromAddr)
|
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)
|
result := client.EVM().InvokeContractByFuncName(ctx, fromAddr, idAddr, "getBalance(address)", inputData)
|
||||||
|
|
||||||
expectedResult, err := hex.DecodeString("0000000000000000000000000000000000000000000000000000000000000000")
|
expectedResult, err := hex.DecodeString("0000000000000000000000000000000000000000000000000000000000000000")
|
||||||
|
Loading…
Reference in New Issue
Block a user