mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-11 22:43:47 +00:00
update
This commit is contained in:
parent
98a30d9d43
commit
c7e7267ece
1 changed files with 4 additions and 3 deletions
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math/big"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
@ -142,11 +143,11 @@ func handleNative(ctx context.Context, state *state.StateDB, msg types.Message)
|
||||||
}
|
}
|
||||||
switch method.Name {
|
switch method.Name {
|
||||||
case "name", "symbol":
|
case "name", "symbol":
|
||||||
return method.Outputs.PackValues([]interface{}{"ETH"})
|
return method.Outputs.Pack("ETH")
|
||||||
case "decimals":
|
case "decimals":
|
||||||
return method.Outputs.PackValues([]interface{}{uint8(18)})
|
return method.Outputs.Pack(uint8(18))
|
||||||
case "totalSupply":
|
case "totalSupply":
|
||||||
return method.Outputs.PackValues([]interface{}{120 * 1_000_000 * 18})
|
return method.Outputs.Pack(big.NewInt(120 * 1_000_000 * 18))
|
||||||
}
|
}
|
||||||
|
|
||||||
if method.Name == "balanceOf" {
|
if method.Name == "balanceOf" {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue