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
e0441341
Unverified
Commit
e0441341
authored
Nov 14, 2023
by
Matthew Slipper
Committed by
GitHub
Nov 14, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8167 from ethereum-optimism/cl/ci-builder-verbump
fix(ci): Bump `ci-builder` to `v0.29.0`
parents
bfb62726
2e574728
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
2 deletions
+58
-2
config.yml
.circleci/config.yml
+1
-1
types.go
op-bindings/hardhat/types.go
+57
-1
No files found.
.circleci/config.yml
View file @
e0441341
...
...
@@ -3,7 +3,7 @@ version: 2.1
parameters
:
ci_builder_image
:
type
:
string
default
:
us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.2
7
.0
default
:
us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.2
9
.0
orbs
:
go
:
circleci/go@1.8.0
...
...
op-bindings/hardhat/types.go
View file @
e0441341
...
...
@@ -2,6 +2,7 @@ package hardhat
import
(
"encoding/json"
"strings"
"github.com/ethereum-optimism/optimism/op-bindings/solc"
"github.com/ethereum/go-ethereum/accounts/abi"
...
...
@@ -14,7 +15,7 @@ type Deployment struct {
Name
string
Abi
abi
.
ABI
`json:"abi"`
Address
common
.
Address
`json:"address"`
Args
[]
any
`json:"args
"`
Args
[]
interface
{}
`json:"-
"`
Bytecode
hexutil
.
Bytes
`json:"bytecode"`
DeployedBytecode
hexutil
.
Bytes
`json:"deployedBytecode"`
Devdoc
json
.
RawMessage
`json:"devdoc"`
...
...
@@ -26,6 +27,61 @@ type Deployment struct {
Userdoc
json
.
RawMessage
`json:"userdoc"`
}
// UnmarshalJSON is a custom unmarshaler for Deployment, handling the Args field. This changed recently
// when `foundry` migrated to `alloy` types, and now the Args field within the contract artifact has
// a different serialization format.
//
// This custom unmarshaller should be removed when this is fixed upstream.
//
// Old Example:
// ```
// "args": [
//
// "0xCE9FeE676767A25feb9722986148Fcd87085a14e",
// "OVM_L1CrossDomainMessenger"
//
// ],
// ```
//
// New Example:
// ```
// "args": "[\"0x45ce2021212883d655348778aC99707d63D49aBc\",\"\\OVM_L1CrossDomainMessenger\\\"]"
// ```
func
(
d
*
Deployment
)
UnmarshalJSON
(
data
[]
byte
)
error
{
// Create a type alias to prevent recursion
type
DeploymentAlias
Deployment
// Unmarshal all fields except for `Args`
var
alias
DeploymentAlias
if
err
:=
json
.
Unmarshal
(
data
,
&
alias
);
err
!=
nil
{
return
err
}
// Unmarshal `Args` manually.
tmp
:=
struct
{
Args
json
.
RawMessage
`json:"args"`
}{}
if
err
:=
json
.
Unmarshal
(
data
,
&
tmp
);
err
!=
nil
{
return
err
}
// Strip the `args` string of escapes and quotes.
stripped
:=
strings
.
ReplaceAll
(
strings
.
Trim
(
string
(
tmp
.
Args
),
"
\"
"
),
"
\\
"
,
""
)
// Unmarshal the stripped version of the `args` field.
var
args
[]
interface
{}
if
err
:=
json
.
Unmarshal
([]
byte
(
stripped
),
&
args
);
err
!=
nil
{
return
err
}
// Set the `Args` field in the `Deployment` to the correctly unmarshaled value
alias
.
Args
=
args
// Assign the unmarshaled alias back to the original struct
*
d
=
Deployment
(
alias
)
return
nil
}
// Receipt represents the receipt held in a hardhat-deploy
// artifact file
type
Receipt
struct
{
...
...
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