Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
5cdc9501
Unverified
Commit
5cdc9501
authored
Jan 28, 2022
by
Conner Fromknecht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: remove unused utils pkg
parent
cdd402ab
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
30 deletions
+0
-30
gas_price.go
go/batch-submitter/utils/gas_price.go
+0
-12
gas_price_test.go
go/batch-submitter/utils/gas_price_test.go
+0
-18
No files found.
go/batch-submitter/utils/gas_price.go
deleted
100644 → 0
View file @
cdd402ab
package
utils
import
(
"math/big"
"github.com/ethereum/go-ethereum/params"
)
// GasPriceFromGwei converts an uint64 gas price in gwei to a big.Int in wei.
func
GasPriceFromGwei
(
gasPriceInGwei
uint64
)
*
big
.
Int
{
return
new
(
big
.
Int
)
.
SetUint64
(
gasPriceInGwei
*
params
.
GWei
)
}
go/batch-submitter/utils/gas_price_test.go
deleted
100644 → 0
View file @
cdd402ab
package
utils_test
import
(
"math/big"
"testing"
"github.com/ethereum-optimism/optimism/go/batch-submitter/utils"
"github.com/ethereum/go-ethereum/params"
"github.com/stretchr/testify/require"
)
// TestGasPriceFromGwei asserts that the integer value is scaled properly by
// 10^9.
func
TestGasPriceFromGwei
(
t
*
testing
.
T
)
{
require
.
Equal
(
t
,
utils
.
GasPriceFromGwei
(
0
),
new
(
big
.
Int
))
require
.
Equal
(
t
,
utils
.
GasPriceFromGwei
(
1
),
big
.
NewInt
(
params
.
GWei
))
require
.
Equal
(
t
,
utils
.
GasPriceFromGwei
(
100
),
big
.
NewInt
(
100
*
params
.
GWei
))
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment