Commit ec8fc7e4 authored by protolambda's avatar protolambda Committed by GitHub

op-chain-ops: artifacts FS, improve artifacts metadata (#11445)

* op-chain-ops: artifacts FS, improve artifacts metadata

* ci: include artifacts as Go e2e test pre-requisite

* op-chain-ops: move full artifacts test, update testdata

* ci: fix artifacts workspace copy
parent d8807a56
......@@ -857,7 +857,7 @@ jobs:
- attach_workspace:
at: /tmp/workspace
- run:
name: Load devnet-allocs
name: Load devnet-allocs and artifacts
command: |
mkdir -p .devnet
cp /tmp/workspace/.devnet<<parameters.variant>>/allocs-l2-delta.json .devnet/allocs-l2-delta.json
......@@ -866,6 +866,7 @@ jobs:
cp /tmp/workspace/.devnet<<parameters.variant>>/allocs-l2-granite.json .devnet/allocs-l2-granite.json
cp /tmp/workspace/.devnet<<parameters.variant>>/allocs-l1.json .devnet/allocs-l1.json
cp /tmp/workspace/.devnet<<parameters.variant>>/addresses.json .devnet/addresses.json
cp -r /tmp/workspace/packages/contracts-bedrock/forge-artifacts packages/contracts-bedrock/forge-artifacts
cp /tmp/workspace/packages/contracts-bedrock/deploy-config/devnetL1.json packages/contracts-bedrock/deploy-config/devnetL1.json
cp -r /tmp/workspace/packages/contracts-bedrock/deployments/devnetL1 packages/contracts-bedrock/deployments/devnetL1
- run:
......
package testutil
import (
"bytes"
"encoding/binary"
"fmt"
"math/big"
......@@ -12,7 +13,6 @@ import (
"github.com/ethereum-optimism/optimism/op-chain-ops/foundry"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/consensus"
"github.com/ethereum/go-ethereum/consensus/ethash"
"github.com/ethereum/go-ethereum/core"
......@@ -78,7 +78,7 @@ func NewEVMEnv(artifacts *Artifacts, addrs *Addresses) (*vm.EVM, *state.StateDB)
var mipsCtorArgs [32]byte
copy(mipsCtorArgs[12:], addrs.Oracle[:])
mipsDeploy := append(hexutil.MustDecode(artifacts.MIPS.Bytecode.Object.String()), mipsCtorArgs[:]...)
mipsDeploy := append(bytes.Clone(artifacts.MIPS.Bytecode.Object), mipsCtorArgs[:]...)
startingGas := uint64(30_000_000)
_, deployedMipsAddr, leftOverGas, err := env.Create(vm.AccountRef(addrs.Sender), mipsDeploy, startingGas, common.U2560)
if err != nil {
......
package foundry
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"os"
"path/filepath"
"strings"
"github.com/holiman/uint256"
......@@ -26,6 +27,7 @@ type Artifact struct {
StorageLayout solc.StorageLayout
DeployedBytecode DeployedBytecode
Bytecode Bytecode
Metadata Metadata
}
func (a *Artifact) UnmarshalJSON(data []byte) error {
......@@ -42,6 +44,7 @@ func (a *Artifact) UnmarshalJSON(data []byte) error {
a.StorageLayout = artifact.StorageLayout
a.DeployedBytecode = artifact.DeployedBytecode
a.Bytecode = artifact.Bytecode
a.Metadata = artifact.Metadata
return nil
}
......@@ -51,6 +54,7 @@ func (a Artifact) MarshalJSON() ([]byte, error) {
StorageLayout: a.StorageLayout,
DeployedBytecode: a.DeployedBytecode,
Bytecode: a.Bytecode,
Metadata: a.Metadata,
}
return json.Marshal(artifact)
}
......@@ -62,12 +66,72 @@ type artifactMarshaling struct {
StorageLayout solc.StorageLayout `json:"storageLayout"`
DeployedBytecode DeployedBytecode `json:"deployedBytecode"`
Bytecode Bytecode `json:"bytecode"`
Metadata Metadata `json:"metadata"`
}
// Metadata is the subset of metadata in a foundry contract artifact that we use in OP-Stack tooling.
type Metadata struct {
Compiler struct {
Version string `json:"version"`
} `json:"compiler"`
Language string `json:"language"`
Output json.RawMessage `json:"output"`
Settings struct {
// Remappings of the contract imports
Remappings json.RawMessage `json:"remappings"`
// Optimizer settings affect the compiler output, but can be arbitrary.
// We load them opaquely, to include it in the hash of what we run.
Optimizer json.RawMessage `json:"optimizer"`
// Metadata is loaded opaquely, similar to the Optimizer, to include in hashing.
// E.g. the bytecode-hash contract suffix as setting is enabled/disabled in here.
Metadata json.RawMessage `json:"metadata"`
// Map of full contract path to compiled contract name.
CompilationTarget map[string]string `json:"compilationTarget"`
// EVM version affects output, and hence included.
EVMVersion string `json:"evmVersion"`
// Libraries data
Libraries json.RawMessage `json:"libraries"`
} `json:"settings"`
Sources map[string]ContractSource `json:"sources"`
Version int `json:"version"`
}
// ContractSource represents a JSON value in the "sources" map of a contract metadata dump.
// This uniquely identifies the source code of the contract.
type ContractSource struct {
Keccak256 common.Hash `json:"keccak256"`
URLs []string `json:"urls"`
License string `json:"license"`
}
var ErrLinkingUnsupported = errors.New("cannot load bytecode with linking placeholders")
// LinkableBytecode is not purely hex, it returns an ErrLinkingUnsupported error when
// input contains __$aaaaaaa$__ style linking placeholders.
// See https://docs.soliditylang.org/en/latest/using-the-compiler.html#library-linking
// In practice this is only used by test contracts to link in large test libraries.
type LinkableBytecode []byte
func (lb *LinkableBytecode) UnmarshalJSON(data []byte) error {
if bytes.Contains(data, []byte("__$")) {
return ErrLinkingUnsupported
}
return (*hexutil.Bytes)(lb).UnmarshalJSON(data)
}
func (lb LinkableBytecode) MarshalText() ([]byte, error) {
return (hexutil.Bytes)(lb).MarshalText()
}
// DeployedBytecode represents the deployed bytecode section of the solc compiler output.
type DeployedBytecode struct {
SourceMap string `json:"sourceMap"`
Object hexutil.Bytes `json:"object"`
Object LinkableBytecode `json:"object"`
LinkReferences json.RawMessage `json:"linkReferences"`
ImmutableReferences json.RawMessage `json:"immutableReferences,omitempty"`
}
......@@ -75,7 +139,8 @@ type DeployedBytecode struct {
// Bytecode represents the bytecode section of the solc compiler output.
type Bytecode struct {
SourceMap string `json:"sourceMap"`
Object hexutil.Bytes `json:"object"`
// not purely hex, can contain __$aaaaaaa$__ style linking placeholders
Object LinkableBytecode `json:"object"`
LinkReferences json.RawMessage `json:"linkReferences"`
ImmutableReferences json.RawMessage `json:"immutableReferences,omitempty"`
}
......@@ -130,15 +195,14 @@ func (d *ForgeAllocs) UnmarshalJSON(b []byte) error {
}
func LoadForgeAllocs(allocsPath string) (*ForgeAllocs, error) {
path := filepath.Join(allocsPath)
f, err := os.OpenFile(path, os.O_RDONLY, 0644)
f, err := os.OpenFile(allocsPath, os.O_RDONLY, 0644)
if err != nil {
return nil, fmt.Errorf("failed to open forge allocs %q: %w", path, err)
return nil, fmt.Errorf("failed to open forge allocs %q: %w", allocsPath, err)
}
defer f.Close()
var out ForgeAllocs
if err := json.NewDecoder(f).Decode(&out); err != nil {
return nil, fmt.Errorf("failed to json-decode forge allocs %q: %w", path, err)
return nil, fmt.Errorf("failed to json-decode forge allocs %q: %w", allocsPath, err)
}
return &out, nil
}
......@@ -10,13 +10,13 @@ import (
// TestArtifactJSON tests roundtrip serialization of a foundry artifact for commonly used fields.
func TestArtifactJSON(t *testing.T) {
artifact, err := ReadArtifact("testdata/OptimismPortal.json")
artifact, err := ReadArtifact("testdata/forge-artifacts/Owned.sol/Owned.json")
require.NoError(t, err)
data, err := json.Marshal(artifact)
require.NoError(t, err)
file, err := os.ReadFile("testdata/OptimismPortal.json")
file, err := os.ReadFile("testdata/forge-artifacts/Owned.sol/Owned.json")
require.NoError(t, err)
got := unmarshalIntoMap(t, data)
......@@ -26,6 +26,7 @@ func TestArtifactJSON(t *testing.T) {
require.JSONEq(t, marshal(t, got["deployedBytecode"]), marshal(t, expected["deployedBytecode"]))
require.JSONEq(t, marshal(t, got["abi"]), marshal(t, expected["abi"]))
require.JSONEq(t, marshal(t, got["storageLayout"]), marshal(t, expected["storageLayout"]))
require.JSONEq(t, marshal(t, got["metadata"]), marshal(t, expected["metadata"]))
}
func unmarshalIntoMap(t *testing.T, file []byte) map[string]any {
......
package foundry
import (
"encoding/json"
"fmt"
"io/fs"
"os"
"path"
"strings"
)
type statDirFs interface {
fs.StatFS
fs.ReadDirFS
}
func OpenArtifactsDir(dirPath string) *ArtifactsFS {
dir := os.DirFS(dirPath)
if d, ok := dir.(statDirFs); !ok {
panic("Go DirFS guarantees changed")
} else {
return &ArtifactsFS{FS: d}
}
}
// ArtifactsFS wraps a filesystem (read-only access) of a forge-artifacts bundle.
// The root contains directories for every artifact,
// each containing one or more entries (one per solidity compiler version) for a solidity contract.
// See OpenArtifactsDir for reading from a local directory.
// Alternative FS systems, like a tarball, may be used too.
type ArtifactsFS struct {
FS statDirFs
}
func (af *ArtifactsFS) ListArtifacts() ([]string, error) {
entries, err := af.FS.ReadDir(".")
if err != nil {
return nil, fmt.Errorf("failed to list artifacts: %w", err)
}
out := make([]string, 0, len(entries))
for _, d := range entries {
if name := d.Name(); strings.HasSuffix(name, ".sol") {
out = append(out, strings.TrimSuffix(name, ".sol"))
}
}
return out, nil
}
// ListContracts lists the contracts of the named artifact.
// E.g. "Owned" might list "Owned.0.8.15", "Owned.0.8.25", and "Owned".
func (af *ArtifactsFS) ListContracts(name string) ([]string, error) {
f, err := af.FS.Open(name + ".sol")
if err != nil {
return nil, fmt.Errorf("failed to open artifact %q: %w", name, err)
}
defer f.Close()
dirFile, ok := f.(fs.ReadDirFile)
if !ok {
return nil, fmt.Errorf("no dir for artifact %q, but got %T", name, f)
}
entries, err := dirFile.ReadDir(0)
if err != nil {
return nil, fmt.Errorf("failed to list artifact contents of %q: %w", name, err)
}
out := make([]string, 0, len(entries))
for _, d := range entries {
if name := d.Name(); strings.HasSuffix(name, ".json") {
out = append(out, strings.TrimSuffix(name, ".json"))
}
}
return out, nil
}
// ReadArtifact reads a specific JSON contract artifact from the FS.
// The contract name may be suffixed by a solidity compiler version, e.g. "Owned.0.8.25".
func (af *ArtifactsFS) ReadArtifact(name string, contract string) (*Artifact, error) {
artifactPath := path.Join(name+".sol", contract+".json")
f, err := af.FS.Open(artifactPath)
if err != nil {
return nil, fmt.Errorf("failed to open artifact %q: %w", artifactPath, err)
}
defer f.Close()
dec := json.NewDecoder(f)
var out Artifact
if err := dec.Decode(&out); err != nil {
return nil, fmt.Errorf("failed to decode artifact %q: %w", name, err)
}
return &out, nil
}
package foundry
import (
"errors"
"testing"
"github.com/stretchr/testify/require"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum-optimism/optimism/op-service/testlog"
)
func TestArtifacts(t *testing.T) {
logger := testlog.Logger(t, log.LevelWarn) // lower this log level to get verbose test dump of all artifacts
af := OpenArtifactsDir("./testdata/forge-artifacts")
artifacts, err := af.ListArtifacts()
require.NoError(t, err)
require.NotEmpty(t, artifacts)
for _, name := range artifacts {
contracts, err := af.ListContracts(name)
require.NoError(t, err, "failed to list %s", name)
require.NotEmpty(t, contracts)
for _, contract := range contracts {
artifact, err := af.ReadArtifact(name, contract)
if err != nil {
if errors.Is(err, ErrLinkingUnsupported) {
logger.Info("linking not supported", "name", name, "contract", contract, "err", err)
continue
}
require.NoError(t, err, "failed to read artifact %s / %s", name, contract)
}
logger.Info("artifact",
"name", name,
"contract", contract,
"compiler", artifact.Metadata.Compiler.Version,
"sources", len(artifact.Metadata.Sources),
"evmVersion", artifact.Metadata.Settings.EVMVersion,
)
}
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
# artifacts test data
This is a small selection of `forge-artifacts` specifically for testing of Artifact decoding and the Artifacts-FS.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{"abi":[{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"setOwner","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"OwnerUpdated","inputs":[{"name":"user","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"owner()":"8da5cb5b","setOwner(address)":"13af4035"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Owned.sol)\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Simple single owner authorization mixin.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/solmate/src/auth/Owned.sol\":\"Owned\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@lib-keccak/=lib/lib-keccak/contracts/lib/\",\":@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/\",\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":@rari-capital/solmate/=lib/solmate/\",\":@solady-test/=lib/lib-keccak/lib/solady/test/\",\":@solady/=lib/solady/src/\",\":automate/=lib/automate/contracts/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/automate/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":gelato/=lib/automate/contracts/\",\":hardhat/=lib/automate/node_modules/hardhat/\",\":kontrol-cheatcodes/=lib/kontrol-cheatcodes/src/\",\":lib-keccak/=lib/lib-keccak/contracts/\",\":openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":prb-test/=lib/automate/lib/prb-test/src/\",\":prb/-est/=lib/automate/lib/prb-test/src/\",\":safe-contracts/=lib/safe-contracts/contracts/\",\":solady/=lib/solady/\",\":solmate/=lib/solmate/src/\"]},\"sources\":{\"lib/solmate/src/auth/Owned.sol\":{\"keccak256\":\"0x7e91c80b0dd1a14a19cb9e661b99924043adab6d9d893bbfcf3a6a3dc23a6743\",\"license\":\"AGPL-3.0-only\",\"urls\":[\"bzz-raw://515890d9fc87d6762dae2354a3a0714a26c652f0ea5bb631122be1968ef8c0e9\",\"dweb:/ipfs/QmTRpQ7uoAR1vCACKJm14Ba3oKVLqcA9reTwbHAPxawVpM\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.15+commit.e14f2714"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"user","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnerUpdated","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"setOwner"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@lib-keccak/=lib/lib-keccak/contracts/lib/","@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","@rari-capital/solmate/=lib/solmate/","@solady-test/=lib/lib-keccak/lib/solady/test/","@solady/=lib/solady/src/","automate/=lib/automate/contracts/","ds-test/=lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/automate/lib/openzeppelin-contracts/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","gelato/=lib/automate/contracts/","hardhat/=lib/automate/node_modules/hardhat/","kontrol-cheatcodes/=lib/kontrol-cheatcodes/src/","lib-keccak/=lib/lib-keccak/contracts/","openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts/=lib/openzeppelin-contracts/","prb-test/=lib/automate/lib/prb-test/src/","prb/-est/=lib/automate/lib/prb-test/src/","safe-contracts/=lib/safe-contracts/contracts/","solady/=lib/solady/","solmate/=lib/solmate/src/"],"optimizer":{"enabled":true,"runs":999999},"metadata":{"bytecodeHash":"none"},"compilationTarget":{"lib/solmate/src/auth/Owned.sol":"Owned"},"evmVersion":"london","libraries":{}},"sources":{"lib/solmate/src/auth/Owned.sol":{"keccak256":"0x7e91c80b0dd1a14a19cb9e661b99924043adab6d9d893bbfcf3a6a3dc23a6743","urls":["bzz-raw://515890d9fc87d6762dae2354a3a0714a26c652f0ea5bb631122be1968ef8c0e9","dweb:/ipfs/QmTRpQ7uoAR1vCACKJm14Ba3oKVLqcA9reTwbHAPxawVpM"],"license":"AGPL-3.0-only"}},"version":1},"storageLayout":{"storage":[{"astId":64704,"contract":"lib/solmate/src/auth/Owned.sol:Owned","label":"owner","offset":0,"slot":"0","type":"t_address"}],"types":{"t_address":{"encoding":"inplace","label":"address","numberOfBytes":"20"}}},"userdoc":{"version":1,"kind":"user","notice":"Simple single owner authorization mixin."},"devdoc":{"version":1,"kind":"dev","author":"Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Owned.sol)"},"ast":{"absolutePath":"lib/solmate/src/auth/Owned.sol","id":64754,"exportedSymbols":{"Owned":[64753]},"nodeType":"SourceUnit","src":"42:1398:108","nodes":[{"id":64695,"nodeType":"PragmaDirective","src":"42:24:108","nodes":[],"literals":["solidity",">=","0.8",".0"]},{"id":64753,"nodeType":"ContractDefinition","src":"212:1227:108","nodes":[{"id":64702,"nodeType":"EventDefinition","src":"421:67:108","nodes":[],"anonymous":false,"eventSelector":"8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76","name":"OwnerUpdated","nameLocation":"427:12:108","parameters":{"id":64701,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64698,"indexed":true,"mutability":"mutable","name":"user","nameLocation":"456:4:108","nodeType":"VariableDeclaration","scope":64702,"src":"440:20:108","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":64697,"name":"address","nodeType":"ElementaryTypeName","src":"440:7:108","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"},{"constant":false,"id":64700,"indexed":true,"mutability":"mutable","name":"newOwner","nameLocation":"478:8:108","nodeType":"VariableDeclaration","scope":64702,"src":"462:24:108","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":64699,"name":"address","nodeType":"ElementaryTypeName","src":"462:7:108","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"439:48:108"}},{"id":64704,"nodeType":"VariableDeclaration","src":"679:20:108","nodes":[],"constant":false,"functionSelector":"8da5cb5b","mutability":"mutable","name":"owner","nameLocation":"694:5:108","scope":64753,"stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":64703,"name":"address","nodeType":"ElementaryTypeName","src":"679:7:108","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"public"},{"id":64716,"nodeType":"ModifierDefinition","src":"706:102:108","nodes":[],"body":{"id":64715,"nodeType":"Block","src":"735:73:108","nodes":[],"statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":64710,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":64707,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"753:3:108","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":64708,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","src":"753:10:108","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":64709,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64704,"src":"767:5:108","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"753:19:108","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"hexValue":"554e415554484f52495a4544","id":64711,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"774:14:108","typeDescriptions":{"typeIdentifier":"t_stringliteral_269df367cd41cace5897a935d0e0858fe4543b5619d45e09af6b124c1bb3d528","typeString":"literal_string \"UNAUTHORIZED\""},"value":"UNAUTHORIZED"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_269df367cd41cace5897a935d0e0858fe4543b5619d45e09af6b124c1bb3d528","typeString":"literal_string \"UNAUTHORIZED\""}],"id":64706,"name":"require","nodeType":"Identifier","overloadedDeclarations":[-18,-18],"referencedDeclaration":-18,"src":"745:7:108","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":64712,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"745:44:108","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64713,"nodeType":"ExpressionStatement","src":"745:44:108"},{"id":64714,"nodeType":"PlaceholderStatement","src":"800:1:108"}]},"name":"onlyOwner","nameLocation":"715:9:108","parameters":{"id":64705,"nodeType":"ParameterList","parameters":[],"src":"724:2:108"},"virtual":true,"visibility":"internal"},{"id":64734,"nodeType":"FunctionDefinition","src":"996:107:108","nodes":[],"body":{"id":64733,"nodeType":"Block","src":"1024:79:108","nodes":[],"statements":[{"expression":{"id":64723,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":64721,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64704,"src":"1034:5:108","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":64722,"name":"_owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64718,"src":"1042:6:108","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1034:14:108","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":64724,"nodeType":"ExpressionStatement","src":"1034:14:108"},{"eventCall":{"arguments":[{"arguments":[{"hexValue":"30","id":64728,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1085:1:108","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"}],"id":64727,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1077:7:108","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":64726,"name":"address","nodeType":"ElementaryTypeName","src":"1077:7:108","typeDescriptions":{}}},"id":64729,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1077:10:108","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"id":64730,"name":"_owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64718,"src":"1089:6:108","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"}],"id":64725,"name":"OwnerUpdated","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64702,"src":"1064:12:108","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$returns$__$","typeString":"function (address,address)"}},"id":64731,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1064:32:108","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64732,"nodeType":"EmitStatement","src":"1059:37:108"}]},"implemented":true,"kind":"constructor","modifiers":[],"name":"","nameLocation":"-1:-1:-1","parameters":{"id":64719,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64718,"mutability":"mutable","name":"_owner","nameLocation":"1016:6:108","nodeType":"VariableDeclaration","scope":64734,"src":"1008:14:108","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":64717,"name":"address","nodeType":"ElementaryTypeName","src":"1008:7:108","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"1007:16:108"},"returnParameters":{"id":64720,"nodeType":"ParameterList","parameters":[],"src":"1024:0:108"},"scope":64753,"stateMutability":"nonpayable","virtual":false,"visibility":"internal"},{"id":64752,"nodeType":"FunctionDefinition","src":"1293:144:108","nodes":[],"body":{"id":64751,"nodeType":"Block","src":"1354:83:108","nodes":[],"statements":[{"expression":{"id":64743,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":64741,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64704,"src":"1364:5:108","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":64742,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64736,"src":"1372:8:108","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1364:16:108","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":64744,"nodeType":"ExpressionStatement","src":"1364:16:108"},{"eventCall":{"arguments":[{"expression":{"id":64746,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"1409:3:108","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":64747,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","src":"1409:10:108","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"id":64748,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64736,"src":"1421:8:108","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"}],"id":64745,"name":"OwnerUpdated","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64702,"src":"1396:12:108","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$returns$__$","typeString":"function (address,address)"}},"id":64749,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1396:34:108","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":64750,"nodeType":"EmitStatement","src":"1391:39:108"}]},"functionSelector":"13af4035","implemented":true,"kind":"function","modifiers":[{"id":64739,"kind":"modifierInvocation","modifierName":{"id":64738,"name":"onlyOwner","nodeType":"IdentifierPath","referencedDeclaration":64716,"src":"1344:9:108"},"nodeType":"ModifierInvocation","src":"1344:9:108"}],"name":"setOwner","nameLocation":"1302:8:108","parameters":{"id":64737,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64736,"mutability":"mutable","name":"newOwner","nameLocation":"1319:8:108","nodeType":"VariableDeclaration","scope":64752,"src":"1311:16:108","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":64735,"name":"address","nodeType":"ElementaryTypeName","src":"1311:7:108","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"1310:18:108"},"returnParameters":{"id":64740,"nodeType":"ParameterList","parameters":[],"src":"1354:0:108"},"scope":64753,"stateMutability":"nonpayable","virtual":true,"visibility":"public"}],"abstract":true,"baseContracts":[],"canonicalName":"Owned","contractDependencies":[],"contractKind":"contract","documentation":{"id":64696,"nodeType":"StructuredDocumentation","src":"68:144:108","text":"@notice Simple single owner authorization mixin.\n @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Owned.sol)"},"fullyImplemented":true,"linearizedBaseContracts":[64753],"name":"Owned","nameLocation":"230:5:108","scope":64754,"usedErrors":[]}],"license":"AGPL-3.0-only"},"id":108}
\ No newline at end of file
{"abi":[{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"setOwner","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"OwnerUpdated","inputs":[{"name":"user","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"owner()":"8da5cb5b","setOwner(address)":"13af4035"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Owned.sol)\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Simple single owner authorization mixin.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/solmate/src/auth/Owned.sol\":\"Owned\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@lib-keccak/=lib/lib-keccak/contracts/lib/\",\":@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/\",\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":@rari-capital/solmate/=lib/solmate/\",\":@solady-test/=lib/lib-keccak/lib/solady/test/\",\":@solady/=lib/solady/src/\",\":automate/=lib/automate/contracts/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/automate/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":gelato/=lib/automate/contracts/\",\":hardhat/=lib/automate/node_modules/hardhat/\",\":kontrol-cheatcodes/=lib/kontrol-cheatcodes/src/\",\":lib-keccak/=lib/lib-keccak/contracts/\",\":openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":prb-test/=lib/automate/lib/prb-test/src/\",\":prb/-est/=lib/automate/lib/prb-test/src/\",\":safe-contracts/=lib/safe-contracts/contracts/\",\":solady/=lib/solady/\",\":solmate/=lib/solmate/src/\"]},\"sources\":{\"lib/solmate/src/auth/Owned.sol\":{\"keccak256\":\"0x7e91c80b0dd1a14a19cb9e661b99924043adab6d9d893bbfcf3a6a3dc23a6743\",\"license\":\"AGPL-3.0-only\",\"urls\":[\"bzz-raw://515890d9fc87d6762dae2354a3a0714a26c652f0ea5bb631122be1968ef8c0e9\",\"dweb:/ipfs/QmTRpQ7uoAR1vCACKJm14Ba3oKVLqcA9reTwbHAPxawVpM\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.25+commit.b61c2a91"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"user","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnerUpdated","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"setOwner"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@lib-keccak/=lib/lib-keccak/contracts/lib/","@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","@rari-capital/solmate/=lib/solmate/","@solady-test/=lib/lib-keccak/lib/solady/test/","@solady/=lib/solady/src/","automate/=lib/automate/contracts/","ds-test/=lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/automate/lib/openzeppelin-contracts/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","gelato/=lib/automate/contracts/","hardhat/=lib/automate/node_modules/hardhat/","kontrol-cheatcodes/=lib/kontrol-cheatcodes/src/","lib-keccak/=lib/lib-keccak/contracts/","openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts/=lib/openzeppelin-contracts/","prb-test/=lib/automate/lib/prb-test/src/","prb/-est/=lib/automate/lib/prb-test/src/","safe-contracts/=lib/safe-contracts/contracts/","solady/=lib/solady/","solmate/=lib/solmate/src/"],"optimizer":{"enabled":true,"runs":999999},"metadata":{"bytecodeHash":"none"},"compilationTarget":{"lib/solmate/src/auth/Owned.sol":"Owned"},"evmVersion":"cancun","libraries":{}},"sources":{"lib/solmate/src/auth/Owned.sol":{"keccak256":"0x7e91c80b0dd1a14a19cb9e661b99924043adab6d9d893bbfcf3a6a3dc23a6743","urls":["bzz-raw://515890d9fc87d6762dae2354a3a0714a26c652f0ea5bb631122be1968ef8c0e9","dweb:/ipfs/QmTRpQ7uoAR1vCACKJm14Ba3oKVLqcA9reTwbHAPxawVpM"],"license":"AGPL-3.0-only"}},"version":1},"storageLayout":{"storage":[{"astId":52022,"contract":"lib/solmate/src/auth/Owned.sol:Owned","label":"owner","offset":0,"slot":"0","type":"t_address"}],"types":{"t_address":{"encoding":"inplace","label":"address","numberOfBytes":"20"}}},"userdoc":{"version":1,"kind":"user","notice":"Simple single owner authorization mixin."},"devdoc":{"version":1,"kind":"dev","author":"Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Owned.sol)"},"ast":{"absolutePath":"lib/solmate/src/auth/Owned.sol","id":52072,"exportedSymbols":{"Owned":[52071]},"nodeType":"SourceUnit","src":"42:1398:60","nodes":[{"id":52013,"nodeType":"PragmaDirective","src":"42:24:60","nodes":[],"literals":["solidity",">=","0.8",".0"]},{"id":52071,"nodeType":"ContractDefinition","src":"212:1227:60","nodes":[{"id":52020,"nodeType":"EventDefinition","src":"421:67:60","nodes":[],"anonymous":false,"eventSelector":"8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76","name":"OwnerUpdated","nameLocation":"427:12:60","parameters":{"id":52019,"nodeType":"ParameterList","parameters":[{"constant":false,"id":52016,"indexed":true,"mutability":"mutable","name":"user","nameLocation":"456:4:60","nodeType":"VariableDeclaration","scope":52020,"src":"440:20:60","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":52015,"name":"address","nodeType":"ElementaryTypeName","src":"440:7:60","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"},{"constant":false,"id":52018,"indexed":true,"mutability":"mutable","name":"newOwner","nameLocation":"478:8:60","nodeType":"VariableDeclaration","scope":52020,"src":"462:24:60","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":52017,"name":"address","nodeType":"ElementaryTypeName","src":"462:7:60","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"439:48:60"}},{"id":52022,"nodeType":"VariableDeclaration","src":"679:20:60","nodes":[],"constant":false,"functionSelector":"8da5cb5b","mutability":"mutable","name":"owner","nameLocation":"694:5:60","scope":52071,"stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":52021,"name":"address","nodeType":"ElementaryTypeName","src":"679:7:60","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"public"},{"id":52034,"nodeType":"ModifierDefinition","src":"706:102:60","nodes":[],"body":{"id":52033,"nodeType":"Block","src":"735:73:60","nodes":[],"statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":52028,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":52025,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"753:3:60","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":52026,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"757:6:60","memberName":"sender","nodeType":"MemberAccess","src":"753:10:60","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":52027,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":52022,"src":"767:5:60","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"753:19:60","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"hexValue":"554e415554484f52495a4544","id":52029,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"774:14:60","typeDescriptions":{"typeIdentifier":"t_stringliteral_269df367cd41cace5897a935d0e0858fe4543b5619d45e09af6b124c1bb3d528","typeString":"literal_string \"UNAUTHORIZED\""},"value":"UNAUTHORIZED"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_269df367cd41cace5897a935d0e0858fe4543b5619d45e09af6b124c1bb3d528","typeString":"literal_string \"UNAUTHORIZED\""}],"id":52024,"name":"require","nodeType":"Identifier","overloadedDeclarations":[-18,-18],"referencedDeclaration":-18,"src":"745:7:60","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":52030,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"745:44:60","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":52031,"nodeType":"ExpressionStatement","src":"745:44:60"},{"id":52032,"nodeType":"PlaceholderStatement","src":"800:1:60"}]},"name":"onlyOwner","nameLocation":"715:9:60","parameters":{"id":52023,"nodeType":"ParameterList","parameters":[],"src":"724:2:60"},"virtual":true,"visibility":"internal"},{"id":52052,"nodeType":"FunctionDefinition","src":"996:107:60","nodes":[],"body":{"id":52051,"nodeType":"Block","src":"1024:79:60","nodes":[],"statements":[{"expression":{"id":52041,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":52039,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":52022,"src":"1034:5:60","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":52040,"name":"_owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":52036,"src":"1042:6:60","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1034:14:60","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":52042,"nodeType":"ExpressionStatement","src":"1034:14:60"},{"eventCall":{"arguments":[{"arguments":[{"hexValue":"30","id":52046,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1085:1:60","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"}],"id":52045,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1077:7:60","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":52044,"name":"address","nodeType":"ElementaryTypeName","src":"1077:7:60","typeDescriptions":{}}},"id":52047,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1077:10:60","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"id":52048,"name":"_owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":52036,"src":"1089:6:60","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"}],"id":52043,"name":"OwnerUpdated","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":52020,"src":"1064:12:60","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$returns$__$","typeString":"function (address,address)"}},"id":52049,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1064:32:60","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":52050,"nodeType":"EmitStatement","src":"1059:37:60"}]},"implemented":true,"kind":"constructor","modifiers":[],"name":"","nameLocation":"-1:-1:-1","parameters":{"id":52037,"nodeType":"ParameterList","parameters":[{"constant":false,"id":52036,"mutability":"mutable","name":"_owner","nameLocation":"1016:6:60","nodeType":"VariableDeclaration","scope":52052,"src":"1008:14:60","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":52035,"name":"address","nodeType":"ElementaryTypeName","src":"1008:7:60","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"1007:16:60"},"returnParameters":{"id":52038,"nodeType":"ParameterList","parameters":[],"src":"1024:0:60"},"scope":52071,"stateMutability":"nonpayable","virtual":false,"visibility":"internal"},{"id":52070,"nodeType":"FunctionDefinition","src":"1293:144:60","nodes":[],"body":{"id":52069,"nodeType":"Block","src":"1354:83:60","nodes":[],"statements":[{"expression":{"id":52061,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":52059,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":52022,"src":"1364:5:60","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":52060,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":52054,"src":"1372:8:60","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1364:16:60","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":52062,"nodeType":"ExpressionStatement","src":"1364:16:60"},{"eventCall":{"arguments":[{"expression":{"id":52064,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"1409:3:60","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":52065,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"1413:6:60","memberName":"sender","nodeType":"MemberAccess","src":"1409:10:60","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"id":52066,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":52054,"src":"1421:8:60","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"}],"id":52063,"name":"OwnerUpdated","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":52020,"src":"1396:12:60","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$returns$__$","typeString":"function (address,address)"}},"id":52067,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"1396:34:60","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":52068,"nodeType":"EmitStatement","src":"1391:39:60"}]},"functionSelector":"13af4035","implemented":true,"kind":"function","modifiers":[{"id":52057,"kind":"modifierInvocation","modifierName":{"id":52056,"name":"onlyOwner","nameLocations":["1344:9:60"],"nodeType":"IdentifierPath","referencedDeclaration":52034,"src":"1344:9:60"},"nodeType":"ModifierInvocation","src":"1344:9:60"}],"name":"setOwner","nameLocation":"1302:8:60","parameters":{"id":52055,"nodeType":"ParameterList","parameters":[{"constant":false,"id":52054,"mutability":"mutable","name":"newOwner","nameLocation":"1319:8:60","nodeType":"VariableDeclaration","scope":52070,"src":"1311:16:60","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":52053,"name":"address","nodeType":"ElementaryTypeName","src":"1311:7:60","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"1310:18:60"},"returnParameters":{"id":52058,"nodeType":"ParameterList","parameters":[],"src":"1354:0:60"},"scope":52071,"stateMutability":"nonpayable","virtual":true,"visibility":"public"}],"abstract":true,"baseContracts":[],"canonicalName":"Owned","contractDependencies":[],"contractKind":"contract","documentation":{"id":52014,"nodeType":"StructuredDocumentation","src":"68:144:60","text":"@notice Simple single owner authorization mixin.\n @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Owned.sol)"},"fullyImplemented":true,"linearizedBaseContracts":[52071],"name":"Owned","nameLocation":"230:5:60","scope":52072,"usedErrors":[],"usedEvents":[52020]}],"license":"AGPL-3.0-only"},"id":60}
\ No newline at end of file
{"abi":[{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"setOwner","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"OwnerUpdated","inputs":[{"name":"user","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"owner()":"8da5cb5b","setOwner(address)":"13af4035"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Owned.sol)\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Simple single owner authorization mixin.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/solmate/src/auth/Owned.sol\":\"Owned\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@lib-keccak/=lib/lib-keccak/contracts/lib/\",\":@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/\",\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":@rari-capital/solmate/=lib/solmate/\",\":@solady-test/=lib/lib-keccak/lib/solady/test/\",\":@solady/=lib/solady/src/\",\":automate/=lib/automate/contracts/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/automate/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":gelato/=lib/automate/contracts/\",\":hardhat/=lib/automate/node_modules/hardhat/\",\":kontrol-cheatcodes/=lib/kontrol-cheatcodes/src/\",\":lib-keccak/=lib/lib-keccak/contracts/\",\":openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":prb-test/=lib/automate/lib/prb-test/src/\",\":prb/-est/=lib/automate/lib/prb-test/src/\",\":safe-contracts/=lib/safe-contracts/contracts/\",\":solady/=lib/solady/\",\":solmate/=lib/solmate/src/\"]},\"sources\":{\"lib/solmate/src/auth/Owned.sol\":{\"keccak256\":\"0x7e91c80b0dd1a14a19cb9e661b99924043adab6d9d893bbfcf3a6a3dc23a6743\",\"license\":\"AGPL-3.0-only\",\"urls\":[\"bzz-raw://515890d9fc87d6762dae2354a3a0714a26c652f0ea5bb631122be1968ef8c0e9\",\"dweb:/ipfs/QmTRpQ7uoAR1vCACKJm14Ba3oKVLqcA9reTwbHAPxawVpM\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.15+commit.e14f2714"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"user","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnerUpdated","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"setOwner"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@lib-keccak/=lib/lib-keccak/contracts/lib/","@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","@rari-capital/solmate/=lib/solmate/","@solady-test/=lib/lib-keccak/lib/solady/test/","@solady/=lib/solady/src/","automate/=lib/automate/contracts/","ds-test/=lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/automate/lib/openzeppelin-contracts/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","gelato/=lib/automate/contracts/","hardhat/=lib/automate/node_modules/hardhat/","kontrol-cheatcodes/=lib/kontrol-cheatcodes/src/","lib-keccak/=lib/lib-keccak/contracts/","openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts/=lib/openzeppelin-contracts/","prb-test/=lib/automate/lib/prb-test/src/","prb/-est/=lib/automate/lib/prb-test/src/","safe-contracts/=lib/safe-contracts/contracts/","solady/=lib/solady/","solmate/=lib/solmate/src/"],"optimizer":{"enabled":true,"runs":999999},"metadata":{"bytecodeHash":"none"},"compilationTarget":{"lib/solmate/src/auth/Owned.sol":"Owned"},"evmVersion":"london","libraries":{}},"sources":{"lib/solmate/src/auth/Owned.sol":{"keccak256":"0x7e91c80b0dd1a14a19cb9e661b99924043adab6d9d893bbfcf3a6a3dc23a6743","urls":["bzz-raw://515890d9fc87d6762dae2354a3a0714a26c652f0ea5bb631122be1968ef8c0e9","dweb:/ipfs/QmTRpQ7uoAR1vCACKJm14Ba3oKVLqcA9reTwbHAPxawVpM"],"license":"AGPL-3.0-only"}},"version":1},"storageLayout":{"storage":[{"astId":53517,"contract":"lib/solmate/src/auth/Owned.sol:Owned","label":"owner","offset":0,"slot":"0","type":"t_address"}],"types":{"t_address":{"encoding":"inplace","label":"address","numberOfBytes":"20"}}},"userdoc":{"version":1,"kind":"user","notice":"Simple single owner authorization mixin."},"devdoc":{"version":1,"kind":"dev","author":"Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Owned.sol)"},"ast":{"absolutePath":"lib/solmate/src/auth/Owned.sol","id":53567,"exportedSymbols":{"Owned":[53566]},"nodeType":"SourceUnit","src":"42:1398:68","nodes":[{"id":53508,"nodeType":"PragmaDirective","src":"42:24:68","nodes":[],"literals":["solidity",">=","0.8",".0"]},{"id":53566,"nodeType":"ContractDefinition","src":"212:1227:68","nodes":[{"id":53515,"nodeType":"EventDefinition","src":"421:67:68","nodes":[],"anonymous":false,"eventSelector":"8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76","name":"OwnerUpdated","nameLocation":"427:12:68","parameters":{"id":53514,"nodeType":"ParameterList","parameters":[{"constant":false,"id":53511,"indexed":true,"mutability":"mutable","name":"user","nameLocation":"456:4:68","nodeType":"VariableDeclaration","scope":53515,"src":"440:20:68","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":53510,"name":"address","nodeType":"ElementaryTypeName","src":"440:7:68","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"},{"constant":false,"id":53513,"indexed":true,"mutability":"mutable","name":"newOwner","nameLocation":"478:8:68","nodeType":"VariableDeclaration","scope":53515,"src":"462:24:68","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":53512,"name":"address","nodeType":"ElementaryTypeName","src":"462:7:68","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"439:48:68"}},{"id":53517,"nodeType":"VariableDeclaration","src":"679:20:68","nodes":[],"constant":false,"functionSelector":"8da5cb5b","mutability":"mutable","name":"owner","nameLocation":"694:5:68","scope":53566,"stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":53516,"name":"address","nodeType":"ElementaryTypeName","src":"679:7:68","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"public"},{"id":53529,"nodeType":"ModifierDefinition","src":"706:102:68","nodes":[],"body":{"id":53528,"nodeType":"Block","src":"735:73:68","nodes":[],"statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":53523,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":53520,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"753:3:68","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":53521,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","src":"753:10:68","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":53522,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":53517,"src":"767:5:68","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"753:19:68","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"hexValue":"554e415554484f52495a4544","id":53524,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"774:14:68","typeDescriptions":{"typeIdentifier":"t_stringliteral_269df367cd41cace5897a935d0e0858fe4543b5619d45e09af6b124c1bb3d528","typeString":"literal_string \"UNAUTHORIZED\""},"value":"UNAUTHORIZED"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_269df367cd41cace5897a935d0e0858fe4543b5619d45e09af6b124c1bb3d528","typeString":"literal_string \"UNAUTHORIZED\""}],"id":53519,"name":"require","nodeType":"Identifier","overloadedDeclarations":[-18,-18],"referencedDeclaration":-18,"src":"745:7:68","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":53525,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"745:44:68","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":53526,"nodeType":"ExpressionStatement","src":"745:44:68"},{"id":53527,"nodeType":"PlaceholderStatement","src":"800:1:68"}]},"name":"onlyOwner","nameLocation":"715:9:68","parameters":{"id":53518,"nodeType":"ParameterList","parameters":[],"src":"724:2:68"},"virtual":true,"visibility":"internal"},{"id":53547,"nodeType":"FunctionDefinition","src":"996:107:68","nodes":[],"body":{"id":53546,"nodeType":"Block","src":"1024:79:68","nodes":[],"statements":[{"expression":{"id":53536,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":53534,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":53517,"src":"1034:5:68","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":53535,"name":"_owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":53531,"src":"1042:6:68","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1034:14:68","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":53537,"nodeType":"ExpressionStatement","src":"1034:14:68"},{"eventCall":{"arguments":[{"arguments":[{"hexValue":"30","id":53541,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1085:1:68","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"}],"id":53540,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1077:7:68","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":53539,"name":"address","nodeType":"ElementaryTypeName","src":"1077:7:68","typeDescriptions":{}}},"id":53542,"isConstant":false,"isLValue":false,"isPure":true,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1077:10:68","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"id":53543,"name":"_owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":53531,"src":"1089:6:68","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"}],"id":53538,"name":"OwnerUpdated","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":53515,"src":"1064:12:68","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$returns$__$","typeString":"function (address,address)"}},"id":53544,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1064:32:68","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":53545,"nodeType":"EmitStatement","src":"1059:37:68"}]},"implemented":true,"kind":"constructor","modifiers":[],"name":"","nameLocation":"-1:-1:-1","parameters":{"id":53532,"nodeType":"ParameterList","parameters":[{"constant":false,"id":53531,"mutability":"mutable","name":"_owner","nameLocation":"1016:6:68","nodeType":"VariableDeclaration","scope":53547,"src":"1008:14:68","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":53530,"name":"address","nodeType":"ElementaryTypeName","src":"1008:7:68","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"1007:16:68"},"returnParameters":{"id":53533,"nodeType":"ParameterList","parameters":[],"src":"1024:0:68"},"scope":53566,"stateMutability":"nonpayable","virtual":false,"visibility":"internal"},{"id":53565,"nodeType":"FunctionDefinition","src":"1293:144:68","nodes":[],"body":{"id":53564,"nodeType":"Block","src":"1354:83:68","nodes":[],"statements":[{"expression":{"id":53556,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":53554,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":53517,"src":"1364:5:68","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":53555,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":53549,"src":"1372:8:68","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1364:16:68","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":53557,"nodeType":"ExpressionStatement","src":"1364:16:68"},{"eventCall":{"arguments":[{"expression":{"id":53559,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"1409:3:68","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":53560,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","src":"1409:10:68","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"id":53561,"name":"newOwner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":53549,"src":"1421:8:68","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_address","typeString":"address"}],"id":53558,"name":"OwnerUpdated","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":53515,"src":"1396:12:68","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_address_$returns$__$","typeString":"function (address,address)"}},"id":53562,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1396:34:68","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":53563,"nodeType":"EmitStatement","src":"1391:39:68"}]},"functionSelector":"13af4035","implemented":true,"kind":"function","modifiers":[{"id":53552,"kind":"modifierInvocation","modifierName":{"id":53551,"name":"onlyOwner","nodeType":"IdentifierPath","referencedDeclaration":53529,"src":"1344:9:68"},"nodeType":"ModifierInvocation","src":"1344:9:68"}],"name":"setOwner","nameLocation":"1302:8:68","parameters":{"id":53550,"nodeType":"ParameterList","parameters":[{"constant":false,"id":53549,"mutability":"mutable","name":"newOwner","nameLocation":"1319:8:68","nodeType":"VariableDeclaration","scope":53565,"src":"1311:16:68","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":53548,"name":"address","nodeType":"ElementaryTypeName","src":"1311:7:68","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"1310:18:68"},"returnParameters":{"id":53553,"nodeType":"ParameterList","parameters":[],"src":"1354:0:68"},"scope":53566,"stateMutability":"nonpayable","virtual":true,"visibility":"public"}],"abstract":true,"baseContracts":[],"canonicalName":"Owned","contractDependencies":[],"contractKind":"contract","documentation":{"id":53509,"nodeType":"StructuredDocumentation","src":"68:144:68","text":"@notice Simple single owner authorization mixin.\n @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Owned.sol)"},"fullyImplemented":true,"linearizedBaseContracts":[53566],"name":"Owned","nameLocation":"230:5:68","scope":53567,"usedErrors":[]}],"license":"AGPL-3.0-only"},"id":68}
package op_e2e
import (
"errors"
"testing"
"github.com/stretchr/testify/require"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum-optimism/optimism/op-chain-ops/foundry"
"github.com/ethereum-optimism/optimism/op-service/testlog"
)
func TestArtifacts(t *testing.T) {
logger := testlog.Logger(t, log.LevelWarn) // lower this log level to get verbose test dump of all artifacts
af := foundry.OpenArtifactsDir("../packages/contracts-bedrock/forge-artifacts")
artifacts, err := af.ListArtifacts()
require.NoError(t, err)
require.NotEmpty(t, artifacts)
for _, name := range artifacts {
contracts, err := af.ListContracts(name)
require.NoError(t, err, "failed to list %s", name)
require.NotEmpty(t, contracts)
for _, contract := range contracts {
artifact, err := af.ReadArtifact(name, contract)
if err != nil {
if errors.Is(err, foundry.ErrLinkingUnsupported) {
logger.Info("linking not supported", "name", name, "contract", contract, "err", err)
continue
}
require.NoError(t, err, "failed to read artifact %s / %s", name, contract)
}
logger.Info("artifact",
"name", name,
"contract", contract,
"compiler", artifact.Metadata.Compiler.Version,
"sources", len(artifact.Metadata.Sources),
"evmVersion", artifact.Metadata.Settings.EVMVersion,
)
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment