mirror of
https://github.com/luxfi/cli.git
synced 2026-10-30 17:01:20 +00:00
- Update github.com/luxfi/netrunner v1.15.3 → v1.15.4 - Update github.com/luxfi/node v1.22.77 → v1.22.80 - Remove local replace directive for netrunner - Use published package versions for reproducible builds
33 lines
519 B
Go
33 lines
519 B
Go
// Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package contract
|
|
|
|
import (
|
|
_ "embed"
|
|
"math/big"
|
|
|
|
"github.com/luxfi/crypto"
|
|
)
|
|
|
|
//go:embed contracts/bin/Token.bin
|
|
var tokenBin []byte
|
|
|
|
func DeployERC20(
|
|
rpcURL string,
|
|
privateKey string,
|
|
symbol string,
|
|
funded crypto.Address,
|
|
supply *big.Int,
|
|
) (crypto.Address, error) {
|
|
return DeployContract(
|
|
rpcURL,
|
|
privateKey,
|
|
tokenBin,
|
|
"(string, address, uint256)",
|
|
symbol,
|
|
funded,
|
|
supply,
|
|
)
|
|
}
|