This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func TestIsChecksum(t *testing.T) { | |
t.Run("should return false if checksum is wrong", func(t *testing.T) { | |
wrongcheck := "0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232D" | |
if isChecksum(wrongcheck) { | |
t.Errorf("expected \n %v, got \n %v \n", true, isChecksum(wrongcheck)) | |
} | |
}) | |
t.Run("should return true if checksum is correct", func(t *testing.T) { | |
rightcheck := "0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d" //last char is uppercase | |
if !isChecksum(rightcheck) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package checksum | |
import ( | |
"encoding/hex" | |
"golang.org/x/crypto/sha3" | |
"strconv" | |
"strings" | |
) | |
func checksum(address string) string { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"constant": true, | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code generated - DO NOT EDIT. | |
// This file is a generated binding and any manual changes will be lost. | |
package ERC20Vault | |
import ( | |
"math/big" | |
"strings" | |
"github.com/ethereum/go-ethereum/accounts/abi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code generated - DO NOT EDIT. | |
// This file is a generated binding and any manual changes will be lost. | |
package EthVault | |
import ( | |
"math/big" | |
"strings" | |
"github.com/ethereum/go-ethereum/accounts/abi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code generated - DO NOT EDIT. | |
// This file is a generated binding and any manual changes will be lost. | |
package PlasmaFramework | |
import ( | |
"math/big" | |
"strings" | |
ethereum "github.com/ethereum/go-ethereum" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code generated - DO NOT EDIT. | |
// This file is a generated binding and any manual changes will be lost. | |
package PaymentExitGame | |
import ( | |
"math/big" | |
"strings" | |
ethereum "github.com/ethereum/go-ethereum" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code generated - DO NOT EDIT. | |
// This file is a generated binding and any manual changes will be lost. | |
package PaymentExitGame | |
import ( | |
"math/big" | |
"strings" | |
ethereum "github.com/ethereum/go-ethereum" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code generated - DO NOT EDIT. | |
// This file is a generated binding and any manual changes will be lost. | |
package PlasmaFramework | |
import ( | |
"math/big" | |
"strings" | |
ethereum "github.com/ethereum/go-ethereum" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code generated - DO NOT EDIT. | |
// This file is a generated binding and any manual changes will be lost. | |
package Erc20Vault | |
import ( | |
"math/big" | |
"strings" | |
ethereum "github.com/ethereum/go-ethereum" |
NewerOlder