Skip to content

Commit

Permalink
add Upgrades bindings
Browse files Browse the repository at this point in the history
Security on the src/Upgrades.sol contract cannot be assured
as it has been modified from the original one in order to be able
to flatten it (err: strings vs. Strings libs) for later compilation
to work for generating the golang bindings. Too hacky for my taste.
  • Loading branch information
jordipainan committed Jan 22, 2025
1 parent 5a7ad5a commit dd7edf3
Show file tree
Hide file tree
Showing 108 changed files with 62,099 additions and 0 deletions.
1 change: 1 addition & 0 deletions artifacts/build-info/7d80f87a51d3a5d7ae3341681c898b45.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions artifacts/src/Upgrades.sol/Address.dbg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/7d80f87a51d3a5d7ae3341681c898b45.json"
}
38 changes: 38 additions & 0 deletions artifacts/src/Upgrades.sol/Address.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "Address",
"sourceName": "src/Upgrades.sol",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
}
],
"name": "AddressEmptyCode",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "AddressInsufficientBalance",
"type": "error"
},
{
"inputs": [],
"name": "FailedInnerCall",
"type": "error"
}
],
"bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220cdc4e07c754ebcbe21c3ba73f0aaa6ef168d35381fadc32652039de4dc067b6064736f6c634300081c0033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220cdc4e07c754ebcbe21c3ba73f0aaa6ef168d35381fadc32652039de4dc067b6064736f6c634300081c0033",
"linkReferences": {},
"deployedLinkReferences": {}
}
4 changes: 4 additions & 0 deletions artifacts/src/Upgrades.sol/BeaconProxy.dbg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/7d80f87a51d3a5d7ae3341681c898b45.json"
}
87 changes: 87 additions & 0 deletions artifacts/src/Upgrades.sol/BeaconProxy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "BeaconProxy",
"sourceName": "src/Upgrades.sol",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "beacon",
"type": "address"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"stateMutability": "payable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
}
],
"name": "AddressEmptyCode",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "beacon",
"type": "address"
}
],
"name": "ERC1967InvalidBeacon",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "implementation",
"type": "address"
}
],
"name": "ERC1967InvalidImplementation",
"type": "error"
},
{
"inputs": [],
"name": "ERC1967NonPayable",
"type": "error"
},
{
"inputs": [],
"name": "FailedInnerCall",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "beacon",
"type": "address"
}
],
"name": "BeaconUpgraded",
"type": "event"
},
{
"stateMutability": "payable",
"type": "fallback"
}
],
"bytecode": "0x60a060405260405161096038038061096083398181016040528101906100259190610684565b610035828261007060201b60201c565b8173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250505050610795565b61007f8261016360201b60201c565b8173ffffffffffffffffffffffffffffffffffffffff167f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e60405160405180910390a26000815111156101505761014a8273ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561011a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061013e91906106e0565b8261030660201b60201c565b5061015f565b61015e61039060201b60201c565b5b5050565b60008173ffffffffffffffffffffffffffffffffffffffff163b036101bf57806040517f64ced0ec0000000000000000000000000000000000000000000000000000000081526004016101b6919061071c565b60405180910390fd5b806101f27fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5060001b6103cd60201b60201c565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008173ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610280573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a491906106e0565b905060008173ffffffffffffffffffffffffffffffffffffffff163b0361030257806040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526004016102f9919061071c565b60405180910390fd5b5050565b60606000808473ffffffffffffffffffffffffffffffffffffffff1684604051610330919061077e565b600060405180830381855af49150503d806000811461036b576040519150601f19603f3d011682016040523d82523d6000602084013e610370565b606091505b50915091506103868583836103d760201b60201c565b9250505092915050565b60003411156103cb576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b6000819050919050565b6060826103f2576103ed8261046c60201b60201c565b610464565b6000825114801561041a575060008473ffffffffffffffffffffffffffffffffffffffff163b145b1561045c57836040517f9996b315000000000000000000000000000000000000000000000000000000008152600401610453919061071c565b60405180910390fd5b819050610465565b5b9392505050565b60008151111561047f5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104f0826104c5565b9050919050565b610500816104e5565b811461050b57600080fd5b50565b60008151905061051d816104f7565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105768261052d565b810181811067ffffffffffffffff821117156105955761059461053e565b5b80604052505050565b60006105a86104b1565b90506105b4828261056d565b919050565b600067ffffffffffffffff8211156105d4576105d361053e565b5b6105dd8261052d565b9050602081019050919050565b60005b838110156106085780820151818401526020810190506105ed565b60008484015250505050565b6000610627610622846105b9565b61059e565b90508281526020810184848401111561064357610642610528565b5b61064e8482856105ea565b509392505050565b600082601f83011261066b5761066a610523565b5b815161067b848260208601610614565b91505092915050565b6000806040838503121561069b5761069a6104bb565b5b60006106a98582860161050e565b925050602083015167ffffffffffffffff8111156106ca576106c96104c0565b5b6106d685828601610656565b9150509250929050565b6000602082840312156106f6576106f56104bb565b5b60006107048482850161050e565b91505092915050565b610716816104e5565b82525050565b6000602082019050610731600083018461070d565b92915050565b600081519050919050565b600081905092915050565b600061075882610737565b6107628185610742565b93506107728185602086016105ea565b80840191505092915050565b600061078a828461074d565b915081905092915050565b6080516101b16107af600039600060c701526101b16000f3fe608060405261000c61000e565b005b61001e610019610020565b61009d565b565b600061002a6100c3565b73ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610074573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610098919061014e565b905090565b3660008037600080366000845af43d6000803e80600081146100be573d6000f35b3d6000fd5b60007f0000000000000000000000000000000000000000000000000000000000000000905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061011b826100f0565b9050919050565b61012b81610110565b811461013657600080fd5b50565b60008151905061014881610122565b92915050565b600060208284031215610164576101636100eb565b5b600061017284828501610139565b9150509291505056fea2646970667358221220c3ae381cdcb092dca499b2dd32af80658a48cc272ab16fe0ef3baa84f4b3436264736f6c634300081c0033",
"deployedBytecode": "0x608060405261000c61000e565b005b61001e610019610020565b61009d565b565b600061002a6100c3565b73ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610074573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610098919061014e565b905090565b3660008037600080366000845af43d6000803e80600081146100be573d6000f35b3d6000fd5b60007f0000000000000000000000000000000000000000000000000000000000000000905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061011b826100f0565b9050919050565b61012b81610110565b811461013657600080fd5b50565b60008151905061014881610122565b92915050565b600060208284031215610164576101636100eb565b5b600061017284828501610139565b9150509291505056fea2646970667358221220c3ae381cdcb092dca499b2dd32af80658a48cc272ab16fe0ef3baa84f4b3436264736f6c634300081c0033",
"linkReferences": {},
"deployedLinkReferences": {}
}
4 changes: 4 additions & 0 deletions artifacts/src/Upgrades.sol/Context.dbg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/7d80f87a51d3a5d7ae3341681c898b45.json"
}
10 changes: 10 additions & 0 deletions artifacts/src/Upgrades.sol/Context.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "Context",
"sourceName": "src/Upgrades.sol",
"abi": [],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}
4 changes: 4 additions & 0 deletions artifacts/src/Upgrades.sol/Core.dbg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/7d80f87a51d3a5d7ae3341681c898b45.json"
}
10 changes: 10 additions & 0 deletions artifacts/src/Upgrades.sol/Core.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "Core",
"sourceName": "src/Upgrades.sol",
"abi": [],
"bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e2f4192d65245b2f93455b53b035a67cb13445f3c45b8de343e3e042ec183d2964736f6c634300081c0033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e2f4192d65245b2f93455b53b035a67cb13445f3c45b8de343e3e042ec183d2964736f6c634300081c0033",
"linkReferences": {},
"deployedLinkReferences": {}
}
4 changes: 4 additions & 0 deletions artifacts/src/Upgrades.sol/Defender.dbg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/7d80f87a51d3a5d7ae3341681c898b45.json"
}
10 changes: 10 additions & 0 deletions artifacts/src/Upgrades.sol/Defender.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "Defender",
"sourceName": "src/Upgrades.sol",
"abi": [],
"bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122071bf07a7573c7876323eecca2a1b826bc2256b29087a6ac5cf76ab4722174afa64736f6c634300081c0033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122071bf07a7573c7876323eecca2a1b826bc2256b29087a6ac5cf76ab4722174afa64736f6c634300081c0033",
"linkReferences": {},
"deployedLinkReferences": {}
}
4 changes: 4 additions & 0 deletions artifacts/src/Upgrades.sol/DefenderDeploy.dbg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/7d80f87a51d3a5d7ae3341681c898b45.json"
}
10 changes: 10 additions & 0 deletions artifacts/src/Upgrades.sol/DefenderDeploy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "DefenderDeploy",
"sourceName": "src/Upgrades.sol",
"abi": [],
"bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122000823474dc2ec5670c8beea7650217b0591cf075a78888a7f9cd275c701b2c3164736f6c634300081c0033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122000823474dc2ec5670c8beea7650217b0591cf075a78888a7f9cd275c701b2c3164736f6c634300081c0033",
"linkReferences": {},
"deployedLinkReferences": {}
}
4 changes: 4 additions & 0 deletions artifacts/src/Upgrades.sol/ERC1967Proxy.dbg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/7d80f87a51d3a5d7ae3341681c898b45.json"
}
76 changes: 76 additions & 0 deletions artifacts/src/Upgrades.sol/ERC1967Proxy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "ERC1967Proxy",
"sourceName": "src/Upgrades.sol",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "implementation",
"type": "address"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}
],
"stateMutability": "payable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
}
],
"name": "AddressEmptyCode",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "implementation",
"type": "address"
}
],
"name": "ERC1967InvalidImplementation",
"type": "error"
},
{
"inputs": [],
"name": "ERC1967NonPayable",
"type": "error"
},
{
"inputs": [],
"name": "FailedInnerCall",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "implementation",
"type": "address"
}
],
"name": "Upgraded",
"type": "event"
},
{
"stateMutability": "payable",
"type": "fallback"
}
],
"bytecode": "0x60806040526040516106e53803806106e583398181016040528101906100259190610512565b610035828261003c60201b60201c565b50506105f6565b61004b826100c160201b60201c565b8173ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a26000815111156100ae576100a8828261019460201b60201c565b506100bd565b6100bc61021e60201b60201c565b5b5050565b60008173ffffffffffffffffffffffffffffffffffffffff163b0361011d57806040517f4c9c8ce3000000000000000000000000000000000000000000000000000000008152600401610114919061057d565b60405180910390fd5b806101507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61025b60201b60201c565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60606000808473ffffffffffffffffffffffffffffffffffffffff16846040516101be91906105df565b600060405180830381855af49150503d80600081146101f9576040519150601f19603f3d011682016040523d82523d6000602084013e6101fe565b606091505b509150915061021485838361026560201b60201c565b9250505092915050565b6000341115610259576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b6000819050919050565b6060826102805761027b826102fa60201b60201c565b6102f2565b600082511480156102a8575060008473ffffffffffffffffffffffffffffffffffffffff163b145b156102ea57836040517f9996b3150000000000000000000000000000000000000000000000000000000081526004016102e1919061057d565b60405180910390fd5b8190506102f3565b5b9392505050565b60008151111561030d5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061037e82610353565b9050919050565b61038e81610373565b811461039957600080fd5b50565b6000815190506103ab81610385565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610404826103bb565b810181811067ffffffffffffffff82111715610423576104226103cc565b5b80604052505050565b600061043661033f565b905061044282826103fb565b919050565b600067ffffffffffffffff821115610462576104616103cc565b5b61046b826103bb565b9050602081019050919050565b60005b8381101561049657808201518184015260208101905061047b565b60008484015250505050565b60006104b56104b084610447565b61042c565b9050828152602081018484840111156104d1576104d06103b6565b5b6104dc848285610478565b509392505050565b600082601f8301126104f9576104f86103b1565b5b81516105098482602086016104a2565b91505092915050565b6000806040838503121561052957610528610349565b5b60006105378582860161039c565b925050602083015167ffffffffffffffff8111156105585761055761034e565b5b610564858286016104e4565b9150509250929050565b61057781610373565b82525050565b6000602082019050610592600083018461056e565b92915050565b600081519050919050565b600081905092915050565b60006105b982610598565b6105c381856105a3565b93506105d3818560208601610478565b80840191505092915050565b60006105eb82846105ae565b915081905092915050565b60e1806106046000396000f3fe6080604052600a600c565b005b60186014601a565b6027565b565b60006022604c565b905090565b3660008037600080366000845af43d6000803e80600081146047573d6000f35b3d6000fd5b600060787f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b60a1565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600081905091905056fea2646970667358221220c5b968bc804a8dadb0c833392290a2aa8480ebf2c2cdddda46896225dfa4488164736f6c634300081c0033",
"deployedBytecode": "0x6080604052600a600c565b005b60186014601a565b6027565b565b60006022604c565b905090565b3660008037600080366000845af43d6000803e80600081146047573d6000f35b3d6000fd5b600060787f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b60a1565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600081905091905056fea2646970667358221220c5b968bc804a8dadb0c833392290a2aa8480ebf2c2cdddda46896225dfa4488164736f6c634300081c0033",
"linkReferences": {},
"deployedLinkReferences": {}
}
4 changes: 4 additions & 0 deletions artifacts/src/Upgrades.sol/ERC1967Utils.dbg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/7d80f87a51d3a5d7ae3341681c898b45.json"
}
94 changes: 94 additions & 0 deletions artifacts/src/Upgrades.sol/ERC1967Utils.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "ERC1967Utils",
"sourceName": "src/Upgrades.sol",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "admin",
"type": "address"
}
],
"name": "ERC1967InvalidAdmin",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "beacon",
"type": "address"
}
],
"name": "ERC1967InvalidBeacon",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "implementation",
"type": "address"
}
],
"name": "ERC1967InvalidImplementation",
"type": "error"
},
{
"inputs": [],
"name": "ERC1967NonPayable",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "previousAdmin",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "newAdmin",
"type": "address"
}
],
"name": "AdminChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "beacon",
"type": "address"
}
],
"name": "BeaconUpgraded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "implementation",
"type": "address"
}
],
"name": "Upgraded",
"type": "event"
}
],
"bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122086592a46b7834d97af067e09577f9ab500b43afab9e0d8cfbbad94ec35e4757564736f6c634300081c0033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122086592a46b7834d97af067e09577f9ab500b43afab9e0d8cfbbad94ec35e4757564736f6c634300081c0033",
"linkReferences": {},
"deployedLinkReferences": {}
}
Loading

0 comments on commit dd7edf3

Please sign in to comment.