-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: upgrade + audit fixes #165
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request integrates new functionality and improvements across multiple components of the blockchain application. It adds Block SDK integration into the mempool API and transaction service, updates genesis parameters, and refines API documentation with new auction and mempool endpoints. The upgrade process now runs migrations via the ModuleManager, and dependency versions are updated along with a new replacement directive. Additional changes include refactoring contract bytecodes and JSON formatting in oracle and ERC20 contracts, improving error handling in EVM context functions, and renaming fields in precompile structures. Changes
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 golangci-lint (1.62.2)level=warning msg="[runner] Can't run linter goanalysis_metalinter: buildir: failed to load package injective: could not load export data: no export data for "github.com/cosmos/relayer/v2/relayer/codecs/injective"" 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (4)
x/evm/contracts/erc20_wrapper/ERC20Wrapper.sol (1)
233-235
: Improved JSON string handling in IBC transfer message.The changes properly utilize
JSONUTILS_CONTRACT.stringify_json()
to ensure correct JSON formatting for the channel, receiver, and memo fields. This prevents potential issues with special characters and improves the overall robustness of the IBC message construction.Also applies to: 245-247, 253-253
x/evm/keeper/context.go (1)
301-307
: Improved error reporting for simulation and check modes.This change enhances error transparency by returning the actual error instead of a generic out-of-gas error in simulation, re-check, and check execution modes when gas is depleted.
Consider adding a brief comment explaining why this special error handling is only needed for these specific execution modes but not for others.
client/docs/swagger-ui/swagger.yaml (1)
72287-72422
: Definition Duplication & Consistency RecommendationThe definitions for
sdk.auction.v1.Params
,sdk.auction.v1.QueryParamsResponse
, andsdk.mempool.v1.GetTxDistributionResponse
are introduced separately in this hunk. To reduce duplication and ensure consistency, consider referencing these definitions via$ref
in the endpoint responses instead of duplicating the schema inline. This refactoring step can simplify future modifications and maintain consistency across your API documentation.x/evm/contracts/connect_oracle/ConnectOracle.sol (1)
20-27
: Improved JSON string construction in get_price function.The refactored code uses
abi.encodePacked
andJSONUTILS_CONTRACT.stringify_json
to create the JSON request string, which is cleaner and more maintainable than the previous implementation.Consider adding a comment explaining that
stringify_json
handles proper JSON escaping for the string parameter, which helps clarify why this approach is safer than manual string concatenation.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sum
is excluded by!**/*.sum
📒 Files selected for processing (18)
app/app.go
(3 hunks)app/genesis.go
(1 hunks)app/ibc-hooks/README.md
(1 hunks)app/keepers/keepers.go
(0 hunks)app/upgrade.go
(2 hunks)client/docs/config.json
(1 hunks)client/docs/swagger-ui/swagger.yaml
(2 hunks)go.mod
(4 hunks)scripts/protoc-swagger-gen.sh
(3 hunks)x/evm/contracts/connect_oracle/ConnectOracle.go
(1 hunks)x/evm/contracts/connect_oracle/ConnectOracle.sol
(3 hunks)x/evm/contracts/erc20_wrapper/ERC20Wrapper.go
(1 hunks)x/evm/contracts/erc20_wrapper/ERC20Wrapper.sol
(2 hunks)x/evm/keeper/context.go
(4 hunks)x/evm/keeper/keeper.go
(0 hunks)x/evm/keeper/precompiles.go
(1 hunks)x/evm/precompiles/cosmos/contract.go
(3 hunks)x/evm/precompiles/cosmos/types.go
(1 hunks)
💤 Files with no reviewable changes (2)
- x/evm/keeper/keeper.go
- app/keepers/keepers.go
✅ Files skipped from review due to trivial changes (1)
- x/evm/contracts/connect_oracle/ConnectOracle.go
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Run test and upload codecov
- GitHub Check: golangci-lint
- GitHub Check: Minitiad
- GitHub Check: Analyze (go)
🔇 Additional comments (23)
x/evm/keeper/precompiles.go (1)
54-59
: Addition of JSONUtilsPrecompileAddress looks good.The
precompileAddrs
method has been correctly extended to include the new JSON utilities precompile address alongside the existing precompile addresses.app/genesis.go (1)
130-130
: Configure gas limit for hook operations.Added a 3,000,000 gas limit for hook operations in the OP child module parameters. This sets an explicit upper bound for hook execution, which is a good security practice.
x/evm/precompiles/cosmos/contract.go (3)
151-152
: Field rename from Address to Account is consistent with types.go.The field reference has been updated from
Address
toAccount
to maintain consistency with changes in the underlying type definitions.
172-173
: Field rename from Address to Account is consistent with types.go.The field reference has been updated from
Address
toAccount
to maintain consistency with changes in the underlying type definitions.
195-196
: Field rename from Address to Account is consistent with types.go.The field reference has been updated from
Address
toAccount
to maintain consistency with changes in the underlying type definitions.client/docs/config.json (2)
199-206
: LGTM! API documentation properly expanded for auction module.The added entry correctly integrates the auction SDK's query Swagger JSON with proper parameter renaming to avoid conflicts.
207-209
: LGTM! Mempool API documentation properly integrated.The entry for the mempool SDK's query Swagger JSON is correctly added to the API documentation system.
app/upgrade.go (2)
25-25
: Version increment looks good.Upgrade name updated to reflect the new version 0.7.3.
83-83
: Improved upgrade handling with module migrations.The change enhances the upgrade process by running migrations through the ModuleManager instead of directly returning the version map, ensuring all necessary module migrations are executed properly.
scripts/protoc-swagger-gen.sh (2)
14-15
: LGTM! Block SDK integration variables properly defined.The Block SDK URL and version variables are correctly defined, and the version extraction logic is consistent with other dependencies.
Also applies to: 23-23
33-33
: Block SDK integration completed correctly.The script properly clones the Block SDK repository with the correct version and includes its proto directories in the generation process.
Also applies to: 47-47
x/evm/keeper/context.go (3)
220-220
: Documentation updated for reduced recursive depth limit.The comment now correctly indicates that the maximum recursive depth is 8 (previously 16). This change is important as it affects the allowed EVM execution context nesting.
410-416
: Improved error reporting for contract creation.Similar to the previous change, this enhances error reporting when creating contracts in simulation, re-check, and check modes.
511-517
: Enhanced panic handling for out-of-gas errors.This change properly differentiates between out-of-gas panics (which should be propagated) and other types of panics (which should be converted to error messages). This distinction is important for proper gas accounting and error reporting.
x/evm/precompiles/cosmos/types.go (1)
11-11
:✅ Verification successful
Renamed fields from 'Address' to 'Account' for clarity.
The field name change from
Address
toAccount
in all three structures provides better semantics to clearly indicate these are blockchain accounts rather than generic addresses.Also applies to: 16-16, 21-21
🏁 Script executed:
#!/bin/bash # Check if any method calls still use the old parameter name "address" echo "Checking for any usage of the old parameter name in contract.go..." rg -A 3 "IsBlockedAddress|IsModuleAddress|IsAuthorityAddress" x/evm/precompiles/cosmos/contract.goLength of output: 963
Field Renaming Verified: Consistent Usage of 'Account' Confirmed
- The renaming from
Address
toAccount
in all three structures in x/evm/precompiles/cosmos/types.go (lines 11, 16, and 21) has been applied consistently, improving semantics by clearly indicating blockchain accounts.- The search in x/evm/precompiles/cosmos/contract.go did not reveal any lingering references to the old parameter name, confirming that no outdated usage remains.
Renamed fields from 'Address' to 'Account' for clarity. The changes are correctly propagated to all related structures and usages.
app/app.go (3)
64-65
: Added Block SDK imports.New imports from the Block SDK to support mempool functionality.
481-482
: Added Block SDK mempool API route registration.This addition registers the Block SDK mempool API routes with the gRPC gateway, enhancing the API capabilities with new mempool functionality.
505-511
:✅ Verification successful
Added Block SDK mempool transaction service registration.
This change properly registers the Block SDK mempool transaction service and includes a type assertion to ensure the application's mempool implements the required interface.
🏁 Script executed:
#!/bin/bash # Check if this mempool type assertion might fail in some contexts # Look for alternative mempool implementations that might be used echo "Checking for mempool implementations in the codebase..." rg -A 3 "type.*Mempool" --include="*.go" # Check for tests that might be affected by this change echo "Checking for tests that set up a mempool..." rg -A 3 "SetMempool" --include="*_test.go"Length of output: 1187
Updated Block SDK Mempool Registration – Manual Verification Needed
The changes in
app/app.go
(lines 505–511) correctly register the Block SDK mempool transaction service with a type assertion, ensuring that the application’s mempool conforms to the expectedblock.Mempool
interface. However, please note that our earlier attempt to search for mempool references using the--include
flag encountered errors. As a precaution, manually re-run the updated search commands (shown above) to verify that no alternative mempool implementations or tests (e.g., those referencingSetMempool
) are negatively impacted by this change.
🏁 Script executed:
[run_scripts] #!/bin/bash echo "Checking for mempool implementations in the codebase with updated parameters..." rg -g '*.go' -A 3 "type\s+.*Mempool" echo "Checking for tests that set up a mempool with updated parameters..." rg -g '*_test.go' -A 3 "SetMempool"Length of output: 667
Block SDK Mempool Registration Verified and Approved
The registration code in
app/app.go
correctly asserts that the application’s mempool implements theblock.Mempool
interface. Our updated search revealed one mempool implementation inindexer/mempool.go
(aMempoolWrapper
), but it appears independent and does not impact the service registration. Additionally, no tests referencingSetMempool
were found, suggesting that this change will not break any test expectations.client/docs/swagger-ui/swagger.yaml (1)
44225-44376
: New API Endpoints for Auction and MempoolThe new endpoints
/block-sdk/auction/v1/params
and/block-sdk/mempool/v1/distribution
are clearly defined with detailed response schemas. The descriptions and property definitions (e.g., formax_bundle_size
,escrow_account_address
, andreserve_fee
) are well-articulated. Please double-check that the data types (for instance, usingstring
with formatuint64
for numerical values in the transaction distribution) are consistent with your overall API design and meet client expectations.x/evm/contracts/connect_oracle/ConnectOracle.sol (2)
39-45
: More efficient JSON construction for get_prices function.The implementation now uses
abi.encodePacked
withmarshal_string_array
to properly format the JSON request, improving code readability and maintainability.
64-76
:✅ Verification successful
Well-structured marshal_string_array function implementation.
The new function properly handles JSON array formatting with appropriate comma separators and brackets. The use of
JSONUTILS_CONTRACT.stringify_json
ensures proper escaping of individual string elements.
🏁 Script executed:
#!/bin/bash # Check if this function is used in other contracts for potential reuse opportunities rg -A 2 -B 2 "marshal_string_array" --type solLength of output: 74
Review Comment: JSON Marshal Function Approval & Verification Needed
The implementation of
marshal_string_array
inx/evm/contracts/connect_oracle/ConnectOracle.sol
is clear and well-structured. The function correctly formats a JSON array by adding commas and brackets, and it leveragesJSONUTILS_CONTRACT.stringify_json
to ensure proper escaping of each string element.Note: The previous search command using
--type sol
failed due to an unrecognized file type. Please verify manually (using the above command or similar) that this function isn’t used elsewhere in the repository for potential reuse opportunities.
🏁 Script executed:
[run_scripts] #!/bin/bash # Searching for occurrences of the "marshal_string_array" function in Solidity files # using a glob pattern for file names instead of relying on an unrecognized file type. rg -A 2 -B 2 "function marshal_string_array" -g "*.sol"Length of output: 545
Review Summary: JSON Marshalling Function Verified and Approved
The implementation of
marshal_string_array
inx/evm/contracts/connect_oracle/ConnectOracle.sol
is correctly handling JSON array formatting by concatenating elements with commas and surrounding brackets. The use ofJSONUTILS_CONTRACT.stringify_json
properly escapes each string element, ensuring valid JSON output.
- Verification Details:
- A search using
rg
with a glob pattern confirmed that this function is present exclusively inConnectOracle.sol
and is not reused elsewhere.Based on this verification, no further changes are required.
go.mod (2)
20-20
:❓ Verification inconclusive
Dependency version updates for improved security and features.
The updates to multiple dependencies indicate regular maintenance to incorporate bug fixes, security patches, and new features from upstream libraries.
Also applies to: 22-22, 25-25, 37-37, 45-45, 51-51, 109-109
🏁 Script executed:
#!/bin/bash # Check for any changes in changelogs or release notes for these updated dependencies echo "Checking cosmos-sdk changelog for changes between v0.50.11 and v0.50.12" curl -s https://raw.githubusercontent.com/cosmos/cosmos-sdk/main/CHANGELOG.md | grep -A 20 "v0.50.12" echo "Checking OPinit changelog for changes between v0.7.0 and v0.7.2" curl -s https://raw.githubusercontent.com/initia-labs/OPinit/main/CHANGELOG.md | grep -A 20 "v0.7.2"Length of output: 492
Dependency Update Verification Needed
The dependency updates reflect routine maintenance aimed at incorporating upstream bug fixes, security patches, and new features. However, the automated changelog checks for cosmos-sdk (v0.50.12) and OPinit (v0.7.2) did not yield any output, making it unclear whether the expected changes are documented. Please perform a manual verification of these changelog entries to ensure that the updates indeed include the intended improvements.
- Confirm that the updated dependency for
github.com/cosmos/cosmos-db v1.1.1
is consistent with upstream releases.- Manually verify the changelogs for cosmos-sdk (comparing v0.50.11 → v0.50.12) and OPinit (comparing v0.7.0 → v0.7.2) to ensure that key updates, bug fixes, and security patches are applied.
- The same verification is recommended for the dependency updates on lines 22, 25, 37, 45, 51, and 109.
291-294
:✅ Verification successful
Added replace directive to fix statesync issue.
The new replace directive points to a specific fork/commit of the IAVL package to address a statesync problem referenced in a Cosmos SDK issue.
🌐 Web query:
What is the issue with statesync in Cosmos SDK issue #23740?
💡 Result:
The issue reported in Cosmos SDK GitHub issue #23740 involves state sync failing silently without clear error messages, leaving nodes stuck during synchronization. Here's a breakdown:
Key Symptoms
- Nodes stall at specific block heights (e.g.,
target=2305, height=2305
) without progressing further[10].- Logs show repeated attempts to fetch snapshots but no success:
attempting to sync... module=statesync discovering snapshots for 15s discovering snapshots for 15s
- No explicit errors in logs despite configuration appearing correct[10].
Suspected Causes
- Snapshot Interval Mismatch: The snapshot interval (e.g.,
snapshot-interval=1000
) might conflict with how state sync calculates trusted block heights[10].- RPC Server Configuration: Potential issues with RPC endpoints not providing valid snapshots or headers[10].
- Cosmos SDK Bugs: Similar historical issues (e.g., #13766) arose when snapshotting wasn't properly enabled in SDK versions ≥v0.46[3][7].
Current Status
- The issue remains open and under investigation as of February 2025[10].
- Users experiencing this are advised to:
- Verify snapshot intervals match across nodes[1][6].
- Ensure RPC servers are correctly configured and responsive[8][9].
- Monitor community channels like Discord for workarounds while awaiting an official fix[1][10].
This problem highlights ongoing challenges in Cosmos SDK's state sync implementation, particularly around error handling and snapshot management.
Citations:
- 1: https://docs.scrt.network/secret-network-documentation/infrastructure/running-a-node-validator/setting-up-a-node-validator/node-setup/state-sync
- 2: https://forum.cosmos.network/t/erros-while-trying-to-launch-a-fullnode-on-mainnet/12271
- 3: State sync not working without having state sync snapshotting enabled cosmos/cosmos-sdk#13766
- 4: https://forum.cosmos.network/t/cant-verify-for-mainnet-on-local-node/10289
- 5: https://docs.humans.ai/validator/setup-and-configuration/state-sync
- 6: https://docs.evmos.org/validate/setup-and-configuration/state-sync
- 7: https://blog.cosmos.network/cosmos-sdk-state-sync-guide-99e4cf43be2f
- 8: https://docs.tendermint.com/v0.34/tendermint-core/state-sync.html
- 9: https://forum.cosmos.network/t/question-state-sync-with-only-one-node-over-rpc/5814
- 10: [Bug]: statesync is failing without any notable errors cosmos/cosmos-sdk#23740
Update on IAVL Replacement in go.mod to Address State Sync Issue
The replace directive added in go.mod (lines 291–294) temporarily points github.com/cosmos/iavl to the fork at commitcaf697dd4712
from github.com/initia-labs/iavl. This change is intended to mitigate the silent state sync failures described in Cosmos SDK issue #23740, where nodes stall during synchronization without clear error messages.
- Context: The issue involves nodes failing to progress (e.g., getting stuck at a block height) and repeatedly attempting to sync snapshots without success.
- Temporary Fix: This replace directive serves as a stopgap measure until an official resolution is provided upstream.
- Next Steps: When upstream fixes or improvements become available, revisit this temporary directive to ensure long-term compatibility.
@@ -32,7 +32,7 @@ var ( | |||
// Erc20WrapperMetaData contains all meta data concerning the Erc20Wrapper contract. | |||
var Erc20WrapperMetaData = &bind.MetaData{ | |||
ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"erc20Factory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"StringsInsufficientHexLength\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"contractERC20Factory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"callback_id\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"ibc_ack\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"callback_id\",\"type\":\"uint64\"}],\"name\":\"ibc_timeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newFactory\",\"type\":\"address\"}],\"name\":\"setFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"originToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"unwrap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"originToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wrappedAmt\",\"type\":\"uint256\"}],\"name\":\"unwrap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"channel\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"receiver\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"}],\"name\":\"wrap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"channel\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"receiver\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"name\":\"wrap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"wrappedTokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", | |||
Bin: "0x60806040525f8060146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550348015610037575f80fd5b506040516135733803806135738339818101604052810190610059919061013c565b335f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610167565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61010b826100e2565b9050919050565b61011b81610101565b8114610125575f80fd5b50565b5f8151905061013681610112565b92915050565b5f60208284031215610151576101506100de565b5b5f61015e84828501610128565b91505092915050565b6133ff806101745f395ff3fe608060405234801561000f575f80fd5b50600436106100b2575f3560e01c80638da5cb5b1161006f5780638da5cb5b146101725780639a11143214610190578063c45a0155146101ac578063d5c6b504146101ca578063ea67cd43146101fa578063f2fde38b14610216576100b2565b806301ffc9a7146100b65780630d4f1f9d146100e657806331a503f0146101025780635bb478081461011e5780637a30f1ff1461013a5780638cc7104f14610156575b5f80fd5b6100d060048036038101906100cb9190611d9d565b610232565b6040516100dd9190611de2565b60405180910390f35b61010060048036038101906100fb9190611e62565b61029b565b005b61011c60048036038101906101179190611ea0565b61031c565b005b61013860048036038101906101339190611f25565b610396565b005b610154600480360381019061014f9190611f50565b6104b6565b005b610170600480360381019061016b9190611fc1565b610612565b005b61017a6106f3565b6040516101879190612020565b60405180910390f35b6101aa60048036038101906101a59190612175565b610716565b005b6101b4610760565b6040516101c1919061227f565b60405180910390f35b6101e460048036038101906101df9190611f25565b610785565b6040516101f19190612020565b60405180910390f35b610214600480360381019061020f9190612298565b6107b5565b005b610230600480360381019061022b9190611f25565b610bd0565b005b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610309576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610300906123f5565b60405180910390fd5b806103185761031782610d18565b5b5050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461038a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610381906123f5565b60405180910390fd5b61039381610d18565b50565b600173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610405576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103fc9061245d565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610473576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161046a906124c5565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f60025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057b9061252d565b60405180910390fd5b5f8173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b81526004016105be9190612020565b602060405180830381865afa1580156105d9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105fd919061255f565b905061060c8285338685611046565b50505050565b5f60025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036106e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d79061252d565b60405180910390fd5b6106ed8185338686611046565b50505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61075985858585856040518060400160405280600281526020017f7b7d0000000000000000000000000000000000000000000000000000000000008152506107b5565b5050505050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6002602052805f5260405f205f915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6107be856111c1565b8473ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b81526004016107fb93929190612599565b6020604051808303815f875af1158015610817573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061083b91906125e2565b505f6108b5848773ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561088a573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108ae9190612643565b60066114fc565b905060025f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1930836040518363ffffffff1660e01b815260040161094e92919061266e565b5f604051808303815f87803b158015610965575f80fd5b505af1158015610977573d5f803e3d5ffd5b5050505060015f60148282829054906101000a900467ffffffffffffffff166109a091906126c2565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060405180606001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1681526020018281525060035f8060149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600201559050505f610b498860025f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684878a88611618565b905060f173ffffffffffffffffffffffffffffffffffffffff1663d46f64e6826040518263ffffffff1660e01b8152600401610b85919061274d565b6020604051808303815f875af1158015610ba1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bc591906125e2565b505050505050505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c26575f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610c5d575f80fd5b8073ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f60035f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f206040518060600160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152505090505f60025f836020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610ed0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec79061252d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166342966c6883604001516040518263ffffffff1660e01b8152600401610f0d919061276d565b5f604051808303815f87803b158015610f24575f80fd5b505af1158015610f36573d5f803e3d5ffd5b505050505f610fbb83604001516006856020015173ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f92573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fb69190612643565b6114fc565b9050826020015173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb845f0151836040518363ffffffff1660e01b8152600401610fff92919061266e565b6020604051808303815f875af115801561101b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061103f91906125e2565b5050505050565b8473ffffffffffffffffffffffffffffffffffffffff166379cc679084836040518363ffffffff1660e01b815260040161108192919061266e565b6020604051808303815f875af115801561109d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110c191906125e2565b505f61113b8260068773ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611112573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111369190612643565b6114fc565b90508473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84836040518363ffffffff1660e01b815260040161117892919061266e565b6020604051808303815f875af1158015611194573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111b891906125e2565b50505050505050565b5f73ffffffffffffffffffffffffffffffffffffffff1660025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036114f9575f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ef1a866040518060400160405280600781526020017f57726170706564000000000000000000000000000000000000000000000000008152508473ffffffffffffffffffffffffffffffffffffffff166306fdde036040518163ffffffff1660e01b81526004015f60405180830381865afa15801561130c573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061133491906127f4565b604051602001611345929190612875565b6040516020818303038152906040526040518060400160405280600181526020017f57000000000000000000000000000000000000000000000000000000000000008152508573ffffffffffffffffffffffffffffffffffffffff166395d89b416040518163ffffffff1660e01b81526004015f60405180830381865afa1580156113d2573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906113fa91906127f4565b60405160200161140b929190612875565b60405160208183030381529060405260066040518463ffffffff1660e01b815260040161143a939291906128a7565b6020604051808303815f875af1158015611456573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061147a91906128fe565b90508060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b50565b5f8160ff168360ff16111561158a575f82846115189190612929565b60ff16600a6115279190612a8c565b90505f81866115369190612b03565b14611576576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156d90612b7d565b60405180910390fd5b80856115829190612b9b565b9150506115cf565b8160ff168360ff1610156115ca575f83836115a59190612929565b60ff16600a6115b49190612a8c565b905080856115c29190612bcb565b9150506115ce565b8390505b5b5f8103611611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160890612c56565b60405180910390fd5b9392505050565b60605f6116435f60149054906101000a900467ffffffffffffffff1667ffffffffffffffff166118b1565b61164c3061197b565b60405160200161165d929190612d78565b60405160208183030381529060405290505f60f373ffffffffffffffffffffffffffffffffffffffff16635cc855e385846040518363ffffffff1660e01b81526004016116ab929190612dbc565b5f60405180830381865afa1580156116c5573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906116ed91906127f4565b90505f60f373ffffffffffffffffffffffffffffffffffffffff16638d5c8817836040518263ffffffff1660e01b815260040161172a919061274d565b5f60405180830381865afa158015611744573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061176c91906127f4565b90508960f173ffffffffffffffffffffffffffffffffffffffff166381cf0f6a8b6040518263ffffffff1660e01b81526004016117a99190612020565b5f604051808303815f875af11580156117c4573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906117ec91906127f4565b6117f58a6118b1565b60f173ffffffffffffffffffffffffffffffffffffffff16636af32a55306040518263ffffffff1660e01b815260040161182f9190612020565b5f604051808303815f875af115801561184a573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061187291906127f4565b8961187c8c6118b1565b866040516020016118939796959493929190613225565b60405160208183030381529060405293505050509695505050505050565b60605f60016118bf846119a8565b0190505f8167ffffffffffffffff8111156118dd576118dc612051565b5b6040519080825280601f01601f19166020018201604052801561190f5781602001600182028036833780820191505090505b5090505f82602001820190505b600115611970578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161196557611964612ad6565b5b0494505f850361191c575b819350505050919050565b60606119a18273ffffffffffffffffffffffffffffffffffffffff16601460ff16611af9565b9050919050565b5f805f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611a04577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816119fa576119f9612ad6565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310611a41576d04ee2d6d415b85acef81000000008381611a3757611a36612ad6565b5b0492506020810190505b662386f26fc100008310611a7057662386f26fc100008381611a6657611a65612ad6565b5b0492506010810190505b6305f5e1008310611a99576305f5e1008381611a8f57611a8e612ad6565b5b0492506008810190505b6127108310611abe576127108381611ab457611ab3612ad6565b5b0492506004810190505b60648310611ae15760648381611ad757611ad6612ad6565b5b0492506002810190505b600a8310611af0576001810190505b80915050919050565b60605f8390505f6002846002611b0f9190612bcb565b611b199190613344565b67ffffffffffffffff811115611b3257611b31612051565b5b6040519080825280601f01601f191660200182016040528015611b645781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000815f81518110611b9b57611b9a613377565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611bfe57611bfd613377565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053505f6001856002611c3c9190612bcb565b611c469190613344565b90505b6001811115611ce5577f3031323334353637383961626364656600000000000000000000000000000000600f841660108110611c8857611c87613377565b5b1a60f81b828281518110611c9f57611c9e613377565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a905350600483901c925080611cde906133a4565b9050611c49565b505f8214611d2c5784846040517fe22e27eb000000000000000000000000000000000000000000000000000000008152600401611d239291906133cb565b60405180910390fd5b809250505092915050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611d7c81611d48565b8114611d86575f80fd5b50565b5f81359050611d9781611d73565b92915050565b5f60208284031215611db257611db1611d40565b5b5f611dbf84828501611d89565b91505092915050565b5f8115159050919050565b611ddc81611dc8565b82525050565b5f602082019050611df55f830184611dd3565b92915050565b5f67ffffffffffffffff82169050919050565b611e1781611dfb565b8114611e21575f80fd5b50565b5f81359050611e3281611e0e565b92915050565b611e4181611dc8565b8114611e4b575f80fd5b50565b5f81359050611e5c81611e38565b92915050565b5f8060408385031215611e7857611e77611d40565b5b5f611e8585828601611e24565b9250506020611e9685828601611e4e565b9150509250929050565b5f60208284031215611eb557611eb4611d40565b5b5f611ec284828501611e24565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611ef482611ecb565b9050919050565b611f0481611eea565b8114611f0e575f80fd5b50565b5f81359050611f1f81611efb565b92915050565b5f60208284031215611f3a57611f39611d40565b5b5f611f4784828501611f11565b91505092915050565b5f8060408385031215611f6657611f65611d40565b5b5f611f7385828601611f11565b9250506020611f8485828601611f11565b9150509250929050565b5f819050919050565b611fa081611f8e565b8114611faa575f80fd5b50565b5f81359050611fbb81611f97565b92915050565b5f805f60608486031215611fd857611fd7611d40565b5b5f611fe586828701611f11565b9350506020611ff686828701611f11565b925050604061200786828701611fad565b9150509250925092565b61201a81611eea565b82525050565b5f6020820190506120335f830184612011565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61208782612041565b810181811067ffffffffffffffff821117156120a6576120a5612051565b5b80604052505050565b5f6120b8611d37565b90506120c4828261207e565b919050565b5f67ffffffffffffffff8211156120e3576120e2612051565b5b6120ec82612041565b9050602081019050919050565b828183375f83830152505050565b5f612119612114846120c9565b6120af565b9050828152602081018484840111156121355761213461203d565b5b6121408482856120f9565b509392505050565b5f82601f83011261215c5761215b612039565b5b813561216c848260208601612107565b91505092915050565b5f805f805f60a0868803121561218e5761218d611d40565b5b5f86013567ffffffffffffffff8111156121ab576121aa611d44565b5b6121b788828901612148565b95505060206121c888828901611f11565b945050604086013567ffffffffffffffff8111156121e9576121e8611d44565b5b6121f588828901612148565b935050606061220688828901611fad565b925050608061221788828901611fad565b9150509295509295909350565b5f819050919050565b5f61224761224261223d84611ecb565b612224565b611ecb565b9050919050565b5f6122588261222d565b9050919050565b5f6122698261224e565b9050919050565b6122798161225f565b82525050565b5f6020820190506122925f830184612270565b92915050565b5f805f805f8060c087890312156122b2576122b1611d40565b5b5f87013567ffffffffffffffff8111156122cf576122ce611d44565b5b6122db89828a01612148565b96505060206122ec89828a01611f11565b955050604087013567ffffffffffffffff81111561230d5761230c611d44565b5b61231989828a01612148565b945050606061232a89828a01611fad565b935050608061233b89828a01611fad565b92505060a087013567ffffffffffffffff81111561235c5761235b611d44565b5b61236889828a01612148565b9150509295509295509295565b5f82825260208201905092915050565b7f6f6e6c792074686520636f6e747261637420697473656c662063616e2063616c5f8201527f6c20746869732066756e6374696f6e0000000000000000000000000000000000602082015250565b5f6123df602f83612375565b91506123ea82612385565b604082019050919050565b5f6020820190508181035f83015261240c816123d3565b9050919050565b7f45524332303a2063616c6c6572206973206e6f742074686520636861696e00005f82015250565b5f612447601e83612375565b915061245282612413565b602082019050919050565b5f6020820190508181035f8301526124748161243b565b9050919050565b7f696e76616c696420666163746f727920616464726573730000000000000000005f82015250565b5f6124af601783612375565b91506124ba8261247b565b602082019050919050565b5f6020820190508181035f8301526124dc816124a3565b9050919050565b7f7772617070656420746f6b656e20646f65736e277420657869737400000000005f82015250565b5f612517601b83612375565b9150612522826124e3565b602082019050919050565b5f6020820190508181035f8301526125448161250b565b9050919050565b5f8151905061255981611f97565b92915050565b5f6020828403121561257457612573611d40565b5b5f6125818482850161254b565b91505092915050565b61259381611f8e565b82525050565b5f6060820190506125ac5f830186612011565b6125b96020830185612011565b6125c6604083018461258a565b949350505050565b5f815190506125dc81611e38565b92915050565b5f602082840312156125f7576125f6611d40565b5b5f612604848285016125ce565b91505092915050565b5f60ff82169050919050565b6126228161260d565b811461262c575f80fd5b50565b5f8151905061263d81612619565b92915050565b5f6020828403121561265857612657611d40565b5b5f6126658482850161262f565b91505092915050565b5f6040820190506126815f830185612011565b61268e602083018461258a565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6126cc82611dfb565b91506126d783611dfb565b9250828201905067ffffffffffffffff8111156126f7576126f6612695565b5b92915050565b5f81519050919050565b8281835e5f83830152505050565b5f61271f826126fd565b6127298185612375565b9350612739818560208601612707565b61274281612041565b840191505092915050565b5f6020820190508181035f8301526127658184612715565b905092915050565b5f6020820190506127805f83018461258a565b92915050565b5f612798612793846120c9565b6120af565b9050828152602081018484840111156127b4576127b361203d565b5b6127bf848285612707565b509392505050565b5f82601f8301126127db576127da612039565b5b81516127eb848260208601612786565b91505092915050565b5f6020828403121561280957612808611d40565b5b5f82015167ffffffffffffffff81111561282657612825611d44565b5b612832848285016127c7565b91505092915050565b5f81905092915050565b5f61284f826126fd565b612859818561283b565b9350612869818560208601612707565b80840191505092915050565b5f6128808285612845565b915061288c8284612845565b91508190509392505050565b6128a18161260d565b82525050565b5f6060820190508181035f8301526128bf8186612715565b905081810360208301526128d38185612715565b90506128e26040830184612898565b949350505050565b5f815190506128f881611efb565b92915050565b5f6020828403121561291357612912611d40565b5b5f612920848285016128ea565b91505092915050565b5f6129338261260d565b915061293e8361260d565b9250828203905060ff81111561295757612956612695565b5b92915050565b5f8160011c9050919050565b5f808291508390505b60018511156129b25780860481111561298e5761298d612695565b5b600185161561299d5780820291505b80810290506129ab8561295d565b9450612972565b94509492505050565b5f826129ca5760019050612a85565b816129d7575f9050612a85565b81600181146129ed57600281146129f757612a26565b6001915050612a85565b60ff841115612a0957612a08612695565b5b8360020a915084821115612a2057612a1f612695565b5b50612a85565b5060208310610133831016604e8410600b8410161715612a5b5782820a905083811115612a5657612a55612695565b5b612a85565b612a688484846001612969565b92509050818404811115612a7f57612a7e612695565b5b81810290505b9392505050565b5f612a9682611f8e565b9150612aa183611f8e565b9250612ace7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84846129bb565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f612b0d82611f8e565b9150612b1883611f8e565b925082612b2857612b27612ad6565b5b828206905092915050565b7f6475737420616d6f756e742073686f756c64206265207a65726f0000000000005f82015250565b5f612b67601a83612375565b9150612b7282612b33565b602082019050919050565b5f6020820190508181035f830152612b9481612b5b565b9050919050565b5f612ba582611f8e565b9150612bb083611f8e565b925082612bc057612bbf612ad6565b5b828204905092915050565b5f612bd582611f8e565b9150612be083611f8e565b9250828202612bee81611f8e565b91508282048414831517612c0557612c04612695565b5b5092915050565b7f636f6e76657274656420616d6f756e74206973207a65726f00000000000000005f82015250565b5f612c40601883612375565b9150612c4b82612c0c565b602082019050919050565b5f6020820190508181035f830152612c6d81612c34565b9050919050565b7f7b2265766d223a207b226173796e635f63616c6c6261636b223a207b226964225f8201527f3a20000000000000000000000000000000000000000000000000000000000000602082015250565b5f612cce60228361283b565b9150612cd982612c74565b602282019050919050565b7f2c22636f6e74726163745f61646472657373223a2200000000000000000000005f82015250565b5f612d1860158361283b565b9150612d2382612ce4565b601582019050919050565b7f227d7d7d000000000000000000000000000000000000000000000000000000005f82015250565b5f612d6260048361283b565b9150612d6d82612d2e565b600482019050919050565b5f612d8282612cc2565b9150612d8e8285612845565b9150612d9982612d0c565b9150612da58284612845565b9150612db082612d56565b91508190509392505050565b5f6040820190508181035f830152612dd48185612715565b90508181036020830152612de88184612715565b90509392505050565b7f7b224074797065223a20222f6962632e6170706c69636174696f6e732e7472615f8201527f6e736665722e76312e4d73675472616e73666572222c00000000000000000000602082015250565b5f612e4b60368361283b565b9150612e5682612df1565b603682019050919050565b7f22736f757263655f706f7274223a20227472616e73666572222c0000000000005f82015250565b5f612e95601a8361283b565b9150612ea082612e61565b601a82019050919050565b7f22736f757263655f6368616e6e656c223a2022000000000000000000000000005f82015250565b5f612edf60138361283b565b9150612eea82612eab565b601382019050919050565b7f222c0000000000000000000000000000000000000000000000000000000000005f82015250565b5f612f2960028361283b565b9150612f3482612ef5565b600282019050919050565b7f22746f6b656e223a207b202264656e6f6d223a202200000000000000000000005f82015250565b5f612f7360158361283b565b9150612f7e82612f3f565b601582019050919050565b7f22616d6f756e74223a20220000000000000000000000000000000000000000005f82015250565b5f612fbd600b8361283b565b9150612fc882612f89565b600b82019050919050565b7f227d2c00000000000000000000000000000000000000000000000000000000005f82015250565b5f61300760038361283b565b915061301282612fd3565b600382019050919050565b7f2273656e646572223a20220000000000000000000000000000000000000000005f82015250565b5f613051600b8361283b565b915061305c8261301d565b600b82019050919050565b7f227265636569766572223a2022000000000000000000000000000000000000005f82015250565b5f61309b600d8361283b565b91506130a682613067565b600d82019050919050565b7f2274696d656f75745f686569676874223a207b227265766973696f6e5f6e756d5f8201527f626572223a202230222c227265766973696f6e5f686569676874223a2022302260208201527f7d2c000000000000000000000000000000000000000000000000000000000000604082015250565b5f61313160428361283b565b915061313c826130b1565b604282019050919050565b7f2274696d656f75745f74696d657374616d70223a2022000000000000000000005f82015250565b5f61317b60168361283b565b915061318682613147565b601682019050919050565b7f226d656d6f223a200000000000000000000000000000000000000000000000005f82015250565b5f6131c560088361283b565b91506131d082613191565b600882019050919050565b7f7d000000000000000000000000000000000000000000000000000000000000005f82015250565b5f61320f60018361283b565b915061321a826131db565b600182019050919050565b5f61322f82612e3f565b915061323a82612e89565b915061324582612ed3565b9150613251828a612845565b915061325c82612f1d565b915061326782612f67565b91506132738289612845565b915061327e82612f1d565b915061328982612fb1565b91506132958288612845565b91506132a082612ffb565b91506132ab82613045565b91506132b78287612845565b91506132c282612f1d565b91506132cd8261308f565b91506132d98286612845565b91506132e482612f1d565b91506132ef82613125565b91506132fa8261316f565b91506133068285612845565b915061331182612f1d565b915061331c826131b9565b91506133288284612845565b915061333382613203565b915081905098975050505050505050565b5f61334e82611f8e565b915061335983611f8e565b925082820190508082111561337157613370612695565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6133ae82611f8e565b91505f82036133c0576133bf612695565b5b600182039050919050565b5f6040820190506133de5f83018561258a565b6133eb602083018461258a565b939250505056fea164736f6c6343000819000a", | |||
Bin: "0x60806040525f8060146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550348015610037575f80fd5b506040516136ae3803806136ae8339818101604052810190610059919061013c565b335f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610167565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61010b826100e2565b9050919050565b61011b81610101565b8114610125575f80fd5b50565b5f8151905061013681610112565b92915050565b5f60208284031215610151576101506100de565b5b5f61015e84828501610128565b91505092915050565b61353a806101745f395ff3fe608060405234801561000f575f80fd5b50600436106100b2575f3560e01c80638da5cb5b1161006f5780638da5cb5b146101725780639a11143214610190578063c45a0155146101ac578063d5c6b504146101ca578063ea67cd43146101fa578063f2fde38b14610216576100b2565b806301ffc9a7146100b65780630d4f1f9d146100e657806331a503f0146101025780635bb478081461011e5780637a30f1ff1461013a5780638cc7104f14610156575b5f80fd5b6100d060048036038101906100cb9190611e8e565b610232565b6040516100dd9190611ed3565b60405180910390f35b61010060048036038101906100fb9190611f53565b61029b565b005b61011c60048036038101906101179190611f91565b61031c565b005b61013860048036038101906101339190612016565b610396565b005b610154600480360381019061014f9190612041565b6104b6565b005b610170600480360381019061016b91906120b2565b610612565b005b61017a6106f3565b6040516101879190612111565b60405180910390f35b6101aa60048036038101906101a59190612266565b610716565b005b6101b4610760565b6040516101c19190612370565b60405180910390f35b6101e460048036038101906101df9190612016565b610785565b6040516101f19190612111565b60405180910390f35b610214600480360381019061020f9190612389565b6107b5565b005b610230600480360381019061022b9190612016565b610bd0565b005b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610309576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610300906124e6565b60405180910390fd5b806103185761031782610d18565b5b5050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461038a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610381906124e6565b60405180910390fd5b61039381610d18565b50565b600173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610405576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103fc9061254e565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610473576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161046a906125b6565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f60025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057b9061261e565b60405180910390fd5b5f8173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b81526004016105be9190612111565b602060405180830381865afa1580156105d9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105fd9190612650565b905061060c8285338685611046565b50505050565b5f60025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036106e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d79061261e565b60405180910390fd5b6106ed8185338686611046565b50505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61075985858585856040518060400160405280600281526020017f7b7d0000000000000000000000000000000000000000000000000000000000008152506107b5565b5050505050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6002602052805f5260405f205f915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6107be856111c1565b8473ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b81526004016107fb9392919061268a565b6020604051808303815f875af1158015610817573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061083b91906126d3565b505f6108b5848773ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561088a573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108ae9190612734565b60066114fc565b905060025f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1930836040518363ffffffff1660e01b815260040161094e92919061275f565b5f604051808303815f87803b158015610965575f80fd5b505af1158015610977573d5f803e3d5ffd5b5050505060015f60148282829054906101000a900467ffffffffffffffff166109a091906127b3565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060405180606001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1681526020018281525060035f8060149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600201559050505f610b498860025f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684878a88611618565b905060f173ffffffffffffffffffffffffffffffffffffffff1663d46f64e6826040518263ffffffff1660e01b8152600401610b85919061283e565b6020604051808303815f875af1158015610ba1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bc591906126d3565b505050505050505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c26575f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610c5d575f80fd5b8073ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f60035f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f206040518060600160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152505090505f60025f836020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610ed0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec79061261e565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166342966c6883604001516040518263ffffffff1660e01b8152600401610f0d919061285e565b5f604051808303815f87803b158015610f24575f80fd5b505af1158015610f36573d5f803e3d5ffd5b505050505f610fbb83604001516006856020015173ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f92573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fb69190612734565b6114fc565b9050826020015173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb845f0151836040518363ffffffff1660e01b8152600401610fff92919061275f565b6020604051808303815f875af115801561101b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061103f91906126d3565b5050505050565b8473ffffffffffffffffffffffffffffffffffffffff166379cc679084836040518363ffffffff1660e01b815260040161108192919061275f565b6020604051808303815f875af115801561109d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110c191906126d3565b505f61113b8260068773ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611112573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111369190612734565b6114fc565b90508473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84836040518363ffffffff1660e01b815260040161117892919061275f565b6020604051808303815f875af1158015611194573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111b891906126d3565b50505050505050565b5f73ffffffffffffffffffffffffffffffffffffffff1660025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036114f9575f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ef1a866040518060400160405280600781526020017f57726170706564000000000000000000000000000000000000000000000000008152508473ffffffffffffffffffffffffffffffffffffffff166306fdde036040518163ffffffff1660e01b81526004015f60405180830381865afa15801561130c573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061133491906128e5565b604051602001611345929190612966565b6040516020818303038152906040526040518060400160405280600181526020017f57000000000000000000000000000000000000000000000000000000000000008152508573ffffffffffffffffffffffffffffffffffffffff166395d89b416040518163ffffffff1660e01b81526004015f60405180830381865afa1580156113d2573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906113fa91906128e5565b60405160200161140b929190612966565b60405160208183030381529060405260066040518463ffffffff1660e01b815260040161143a93929190612998565b6020604051808303815f875af1158015611456573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061147a91906129ef565b90508060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b50565b5f8160ff168360ff16111561158a575f82846115189190612a1a565b60ff16600a6115279190612b7d565b90505f81866115369190612bf4565b14611576576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156d90612c6e565b60405180910390fd5b80856115829190612c8c565b9150506115cf565b8160ff168360ff1610156115ca575f83836115a59190612a1a565b60ff16600a6115b49190612b7d565b905080856115c29190612cbc565b9150506115ce565b8390505b5b5f8103611611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160890612d47565b60405180910390fd5b9392505050565b60605f6116435f60149054906101000a900467ffffffffffffffff1667ffffffffffffffff166119a2565b61164c30611a6c565b60405160200161165d929190612e69565b60405160208183030381529060405290505f60f373ffffffffffffffffffffffffffffffffffffffff16635cc855e385846040518363ffffffff1660e01b81526004016116ab929190612ead565b5f60405180830381865afa1580156116c5573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906116ed91906128e5565b905060f373ffffffffffffffffffffffffffffffffffffffff16638d5c88178a6040518263ffffffff1660e01b8152600401611729919061283e565b5f60405180830381865afa158015611743573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061176b91906128e5565b60f173ffffffffffffffffffffffffffffffffffffffff166381cf0f6a8a6040518263ffffffff1660e01b81526004016117a59190612111565b5f604051808303815f875af11580156117c0573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906117e891906128e5565b6117f1896119a2565b60f173ffffffffffffffffffffffffffffffffffffffff16636af32a55306040518263ffffffff1660e01b815260040161182b9190612111565b5f604051808303815f875af1158015611846573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061186e91906128e5565b60f373ffffffffffffffffffffffffffffffffffffffff16638d5c88178a6040518263ffffffff1660e01b81526004016118a8919061283e565b5f60405180830381865afa1580156118c2573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906118ea91906128e5565b6118f38b6119a2565b60f373ffffffffffffffffffffffffffffffffffffffff16638d5c8817886040518263ffffffff1660e01b815260040161192d919061283e565b5f60405180830381865afa158015611947573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061196f91906128e5565b6040516020016119859796959493929190613360565b604051602081830303815290604052925050509695505050505050565b60605f60016119b084611a99565b0190505f8167ffffffffffffffff8111156119ce576119cd612142565b5b6040519080825280601f01601f191660200182016040528015611a005781602001600182028036833780820191505090505b5090505f82602001820190505b600115611a61578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581611a5657611a55612bc7565b5b0494505f8503611a0d575b819350505050919050565b6060611a928273ffffffffffffffffffffffffffffffffffffffff16601460ff16611bea565b9050919050565b5f805f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611af5577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381611aeb57611aea612bc7565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310611b32576d04ee2d6d415b85acef81000000008381611b2857611b27612bc7565b5b0492506020810190505b662386f26fc100008310611b6157662386f26fc100008381611b5757611b56612bc7565b5b0492506010810190505b6305f5e1008310611b8a576305f5e1008381611b8057611b7f612bc7565b5b0492506008810190505b6127108310611baf576127108381611ba557611ba4612bc7565b5b0492506004810190505b60648310611bd25760648381611bc857611bc7612bc7565b5b0492506002810190505b600a8310611be1576001810190505b80915050919050565b60605f8390505f6002846002611c009190612cbc565b611c0a919061347f565b67ffffffffffffffff811115611c2357611c22612142565b5b6040519080825280601f01601f191660200182016040528015611c555781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000815f81518110611c8c57611c8b6134b2565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611cef57611cee6134b2565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053505f6001856002611d2d9190612cbc565b611d37919061347f565b90505b6001811115611dd6577f3031323334353637383961626364656600000000000000000000000000000000600f841660108110611d7957611d786134b2565b5b1a60f81b828281518110611d9057611d8f6134b2565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a905350600483901c925080611dcf906134df565b9050611d3a565b505f8214611e1d5784846040517fe22e27eb000000000000000000000000000000000000000000000000000000008152600401611e14929190613506565b60405180910390fd5b809250505092915050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611e6d81611e39565b8114611e77575f80fd5b50565b5f81359050611e8881611e64565b92915050565b5f60208284031215611ea357611ea2611e31565b5b5f611eb084828501611e7a565b91505092915050565b5f8115159050919050565b611ecd81611eb9565b82525050565b5f602082019050611ee65f830184611ec4565b92915050565b5f67ffffffffffffffff82169050919050565b611f0881611eec565b8114611f12575f80fd5b50565b5f81359050611f2381611eff565b92915050565b611f3281611eb9565b8114611f3c575f80fd5b50565b5f81359050611f4d81611f29565b92915050565b5f8060408385031215611f6957611f68611e31565b5b5f611f7685828601611f15565b9250506020611f8785828601611f3f565b9150509250929050565b5f60208284031215611fa657611fa5611e31565b5b5f611fb384828501611f15565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611fe582611fbc565b9050919050565b611ff581611fdb565b8114611fff575f80fd5b50565b5f8135905061201081611fec565b92915050565b5f6020828403121561202b5761202a611e31565b5b5f61203884828501612002565b91505092915050565b5f806040838503121561205757612056611e31565b5b5f61206485828601612002565b925050602061207585828601612002565b9150509250929050565b5f819050919050565b6120918161207f565b811461209b575f80fd5b50565b5f813590506120ac81612088565b92915050565b5f805f606084860312156120c9576120c8611e31565b5b5f6120d686828701612002565b93505060206120e786828701612002565b92505060406120f88682870161209e565b9150509250925092565b61210b81611fdb565b82525050565b5f6020820190506121245f830184612102565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61217882612132565b810181811067ffffffffffffffff8211171561219757612196612142565b5b80604052505050565b5f6121a9611e28565b90506121b5828261216f565b919050565b5f67ffffffffffffffff8211156121d4576121d3612142565b5b6121dd82612132565b9050602081019050919050565b828183375f83830152505050565b5f61220a612205846121ba565b6121a0565b9050828152602081018484840111156122265761222561212e565b5b6122318482856121ea565b509392505050565b5f82601f83011261224d5761224c61212a565b5b813561225d8482602086016121f8565b91505092915050565b5f805f805f60a0868803121561227f5761227e611e31565b5b5f86013567ffffffffffffffff81111561229c5761229b611e35565b5b6122a888828901612239565b95505060206122b988828901612002565b945050604086013567ffffffffffffffff8111156122da576122d9611e35565b5b6122e688828901612239565b93505060606122f78882890161209e565b92505060806123088882890161209e565b9150509295509295909350565b5f819050919050565b5f61233861233361232e84611fbc565b612315565b611fbc565b9050919050565b5f6123498261231e565b9050919050565b5f61235a8261233f565b9050919050565b61236a81612350565b82525050565b5f6020820190506123835f830184612361565b92915050565b5f805f805f8060c087890312156123a3576123a2611e31565b5b5f87013567ffffffffffffffff8111156123c0576123bf611e35565b5b6123cc89828a01612239565b96505060206123dd89828a01612002565b955050604087013567ffffffffffffffff8111156123fe576123fd611e35565b5b61240a89828a01612239565b945050606061241b89828a0161209e565b935050608061242c89828a0161209e565b92505060a087013567ffffffffffffffff81111561244d5761244c611e35565b5b61245989828a01612239565b9150509295509295509295565b5f82825260208201905092915050565b7f6f6e6c792074686520636f6e747261637420697473656c662063616e2063616c5f8201527f6c20746869732066756e6374696f6e0000000000000000000000000000000000602082015250565b5f6124d0602f83612466565b91506124db82612476565b604082019050919050565b5f6020820190508181035f8301526124fd816124c4565b9050919050565b7f45524332303a2063616c6c6572206973206e6f742074686520636861696e00005f82015250565b5f612538601e83612466565b915061254382612504565b602082019050919050565b5f6020820190508181035f8301526125658161252c565b9050919050565b7f696e76616c696420666163746f727920616464726573730000000000000000005f82015250565b5f6125a0601783612466565b91506125ab8261256c565b602082019050919050565b5f6020820190508181035f8301526125cd81612594565b9050919050565b7f7772617070656420746f6b656e20646f65736e277420657869737400000000005f82015250565b5f612608601b83612466565b9150612613826125d4565b602082019050919050565b5f6020820190508181035f830152612635816125fc565b9050919050565b5f8151905061264a81612088565b92915050565b5f6020828403121561266557612664611e31565b5b5f6126728482850161263c565b91505092915050565b6126848161207f565b82525050565b5f60608201905061269d5f830186612102565b6126aa6020830185612102565b6126b7604083018461267b565b949350505050565b5f815190506126cd81611f29565b92915050565b5f602082840312156126e8576126e7611e31565b5b5f6126f5848285016126bf565b91505092915050565b5f60ff82169050919050565b612713816126fe565b811461271d575f80fd5b50565b5f8151905061272e8161270a565b92915050565b5f6020828403121561274957612748611e31565b5b5f61275684828501612720565b91505092915050565b5f6040820190506127725f830185612102565b61277f602083018461267b565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6127bd82611eec565b91506127c883611eec565b9250828201905067ffffffffffffffff8111156127e8576127e7612786565b5b92915050565b5f81519050919050565b8281835e5f83830152505050565b5f612810826127ee565b61281a8185612466565b935061282a8185602086016127f8565b61283381612132565b840191505092915050565b5f6020820190508181035f8301526128568184612806565b905092915050565b5f6020820190506128715f83018461267b565b92915050565b5f612889612884846121ba565b6121a0565b9050828152602081018484840111156128a5576128a461212e565b5b6128b08482856127f8565b509392505050565b5f82601f8301126128cc576128cb61212a565b5b81516128dc848260208601612877565b91505092915050565b5f602082840312156128fa576128f9611e31565b5b5f82015167ffffffffffffffff81111561291757612916611e35565b5b612923848285016128b8565b91505092915050565b5f81905092915050565b5f612940826127ee565b61294a818561292c565b935061295a8185602086016127f8565b80840191505092915050565b5f6129718285612936565b915061297d8284612936565b91508190509392505050565b612992816126fe565b82525050565b5f6060820190508181035f8301526129b08186612806565b905081810360208301526129c48185612806565b90506129d36040830184612989565b949350505050565b5f815190506129e981611fec565b92915050565b5f60208284031215612a0457612a03611e31565b5b5f612a11848285016129db565b91505092915050565b5f612a24826126fe565b9150612a2f836126fe565b9250828203905060ff811115612a4857612a47612786565b5b92915050565b5f8160011c9050919050565b5f808291508390505b6001851115612aa357808604811115612a7f57612a7e612786565b5b6001851615612a8e5780820291505b8081029050612a9c85612a4e565b9450612a63565b94509492505050565b5f82612abb5760019050612b76565b81612ac8575f9050612b76565b8160018114612ade5760028114612ae857612b17565b6001915050612b76565b60ff841115612afa57612af9612786565b5b8360020a915084821115612b1157612b10612786565b5b50612b76565b5060208310610133831016604e8410600b8410161715612b4c5782820a905083811115612b4757612b46612786565b5b612b76565b612b598484846001612a5a565b92509050818404811115612b7057612b6f612786565b5b81810290505b9392505050565b5f612b878261207f565b9150612b928361207f565b9250612bbf7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484612aac565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f612bfe8261207f565b9150612c098361207f565b925082612c1957612c18612bc7565b5b828206905092915050565b7f6475737420616d6f756e742073686f756c64206265207a65726f0000000000005f82015250565b5f612c58601a83612466565b9150612c6382612c24565b602082019050919050565b5f6020820190508181035f830152612c8581612c4c565b9050919050565b5f612c968261207f565b9150612ca18361207f565b925082612cb157612cb0612bc7565b5b828204905092915050565b5f612cc68261207f565b9150612cd18361207f565b9250828202612cdf8161207f565b91508282048414831517612cf657612cf5612786565b5b5092915050565b7f636f6e76657274656420616d6f756e74206973207a65726f00000000000000005f82015250565b5f612d31601883612466565b9150612d3c82612cfd565b602082019050919050565b5f6020820190508181035f830152612d5e81612d25565b9050919050565b7f7b2265766d223a207b226173796e635f63616c6c6261636b223a207b226964225f8201527f3a20000000000000000000000000000000000000000000000000000000000000602082015250565b5f612dbf60228361292c565b9150612dca82612d65565b602282019050919050565b7f2c22636f6e74726163745f61646472657373223a2200000000000000000000005f82015250565b5f612e0960158361292c565b9150612e1482612dd5565b601582019050919050565b7f227d7d7d000000000000000000000000000000000000000000000000000000005f82015250565b5f612e5360048361292c565b9150612e5e82612e1f565b600482019050919050565b5f612e7382612db3565b9150612e7f8285612936565b9150612e8a82612dfd565b9150612e968284612936565b9150612ea182612e47565b91508190509392505050565b5f6040820190508181035f830152612ec58185612806565b90508181036020830152612ed98184612806565b90509392505050565b7f7b224074797065223a20222f6962632e6170706c69636174696f6e732e7472615f8201527f6e736665722e76312e4d73675472616e73666572222c00000000000000000000602082015250565b5f612f3c60368361292c565b9150612f4782612ee2565b603682019050919050565b7f22736f757263655f706f7274223a20227472616e73666572222c0000000000005f82015250565b5f612f86601a8361292c565b9150612f9182612f52565b601a82019050919050565b7f22736f757263655f6368616e6e656c223a2000000000000000000000000000005f82015250565b5f612fd060128361292c565b9150612fdb82612f9c565b601282019050919050565b7f2c000000000000000000000000000000000000000000000000000000000000005f82015250565b5f61301a60018361292c565b915061302582612fe6565b600182019050919050565b7f22746f6b656e223a207b202264656e6f6d223a202200000000000000000000005f82015250565b5f61306460158361292c565b915061306f82613030565b601582019050919050565b7f222c0000000000000000000000000000000000000000000000000000000000005f82015250565b5f6130ae60028361292c565b91506130b98261307a565b600282019050919050565b7f22616d6f756e74223a20220000000000000000000000000000000000000000005f82015250565b5f6130f8600b8361292c565b9150613103826130c4565b600b82019050919050565b7f227d2c00000000000000000000000000000000000000000000000000000000005f82015250565b5f61314260038361292c565b915061314d8261310e565b600382019050919050565b7f2273656e646572223a20220000000000000000000000000000000000000000005f82015250565b5f61318c600b8361292c565b915061319782613158565b600b82019050919050565b7f227265636569766572223a2000000000000000000000000000000000000000005f82015250565b5f6131d6600c8361292c565b91506131e1826131a2565b600c82019050919050565b7f2274696d656f75745f686569676874223a207b227265766973696f6e5f6e756d5f8201527f626572223a202230222c227265766973696f6e5f686569676874223a2022302260208201527f7d2c000000000000000000000000000000000000000000000000000000000000604082015250565b5f61326c60428361292c565b9150613277826131ec565b604282019050919050565b7f2274696d656f75745f74696d657374616d70223a2022000000000000000000005f82015250565b5f6132b660168361292c565b91506132c182613282565b601682019050919050565b7f226d656d6f223a200000000000000000000000000000000000000000000000005f82015250565b5f61330060088361292c565b915061330b826132cc565b600882019050919050565b7f7d000000000000000000000000000000000000000000000000000000000000005f82015250565b5f61334a60018361292c565b915061335582613316565b600182019050919050565b5f61336a82612f30565b915061337582612f7a565b915061338082612fc4565b915061338c828a612936565b91506133978261300e565b91506133a282613058565b91506133ae8289612936565b91506133b9826130a2565b91506133c4826130ec565b91506133d08288612936565b91506133db82613136565b91506133e682613180565b91506133f28287612936565b91506133fd826130a2565b9150613408826131ca565b91506134148286612936565b915061341f8261300e565b915061342a82613260565b9150613435826132aa565b91506134418285612936565b915061344c826130a2565b9150613457826132f4565b91506134638284612936565b915061346e8261333e565b915081905098975050505050505050565b5f6134898261207f565b91506134948361207f565b92508282019050808211156134ac576134ab612786565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6134e98261207f565b91505f82036134fb576134fa612786565b5b600182039050919050565b5f6040820190506135195f83018561267b565b613526602083018461267b565b939250505056fea164736f6c6343000819000a", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Updated ERC20Wrapper contract bytecode.
The compiled bytecode for the ERC20Wrapper contract has been updated. This is auto-generated code from the underlying Solidity contract changes.
🏁 Script executed:
#!/bin/bash
# Verify the Solidity compiler version used for this bytecode
# Extract compiler version stamp from the bytecode (last 10 bytes of the bytecode)
BYTECODE_EXCERPT=$(echo "${Erc20WrapperMetaData.Bin: -20}" | tail -c 20)
echo "Compiler version stamp from bytecode: $BYTECODE_EXCERPT"
# Check if there are any recent changes to the ERC20Wrapper Solidity contract
git log -n 3 --oneline -- "**/ERC20Wrapper.sol"
Length of output: 242
Updated ERC20Wrapper Bytecode Verified – Verification Script Update Required
The ERC20Wrapper contract’s auto-generated bytecode has been updated as expected with the recent Solidity contract changes. However, the verification script that extracts the Solidity compiler version stamp is failing with a “bad substitution” error. This appears to be due to the use of a negative substring expansion (i.e. ${Erc20WrapperMetaData.Bin: -20}
), which isn’t supported in the current shell environment.
Action Items:
- Update the extraction command for the compiler version stamp to a shell-compatible alternative (for example, using
rev | cut -c1-20 | rev
or a suitablesed
command). This will ensure that the stamp is correctly captured for verification.
"memo": "{ | ||
\"evm\": { | ||
// execute message on receive packet | ||
"message": { | ||
"contract_addr": "0x1", | ||
"input": "hex encoded byte string", | ||
"value": "0", | ||
"access_list": { | ||
"address" : "0x1", // contract address | ||
"storage_keys": ["0xabc","0xdef"] // storage keys of contract | ||
\"message\": { | ||
\"contract_addr\": \"0x1\", | ||
\"input\": \"hex encoded byte string\", | ||
\"value\": \"0\", | ||
\"access_list\": { | ||
\"address\" : \"0x1\", // contract address | ||
\"storage_keys\": [\"0xabc\",\"0xdef\"] // storage keys of contract | ||
} | ||
}, | ||
// optional field to get async callback (ack and timeout) | ||
"async_callback": { | ||
"id": 1, | ||
"contract_addr": "0x1" | ||
\"async_callback\": { | ||
\"id\": 1, | ||
\"contract_addr\": \"0x1\" | ||
} | ||
} | ||
} | ||
}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated JSON memo format from object to string representation.
The memo field format has been changed from a direct JSON object to a string representation of a JSON object. This change affects how clients need to encode memos in ICS20 packets.
This change might break compatibility with existing clients that are sending memos as JSON objects rather than as strings. Make sure to:
- Update client documentation to reflect this change
- Ensure server code properly handles both formats during a transition period if possible
- Verify that dependent systems are aware of this breaking change
The backend code should properly deserialize the string before processing the memo contents.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #165 +/- ##
==========================================
+ Coverage 57.08% 57.16% +0.07%
==========================================
Files 114 115 +1
Lines 11061 11137 +76
==========================================
+ Hits 6314 6366 +52
- Misses 3810 3830 +20
- Partials 937 941 +4
|
…into feat/upgrade
…into feat/upgrade
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
x/evm/keeper/context_test.go (1)
438-468
: LGTM: Test for execute requests behavior during revertThis test correctly verifies that the
recursive_revert
function works as expected by checking the emitted logs. The test helps ensure that execute requests are properly handled even when transactions are reverted.However, consider adding explicit assertions that verify the execute requests are not cleaned on revert, which would more directly test the behavior implied by the test name.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
x/evm/contracts/counter/Counter.go
(3 hunks)x/evm/contracts/counter/Counter.sol
(1 hunks)x/evm/keeper/context_test.go
(1 hunks)x/evm/state/snapshot.go
(2 hunks)x/evm/types/keys.go
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Run test and upload codecov
- GitHub Check: Minitiad
🔇 Additional comments (10)
x/evm/types/keys.go (1)
49-50
: LGTM: New context key for parent execute requestsThe addition of
CONTEXT_KEY_PARENT_EXECUTE_REQUESTS
as a new context key is well-documented and follows the existing pattern. This key will be used to track execute requests from parent contexts.x/evm/contracts/counter/Counter.sol (2)
111-119
: LGTM: New recursive_revert functionThe
recursive_revert
function is well-implemented. It properly emits an event before attempting to call the nested function, and uses a try-catch block to handle any exceptions without propagating them.
121-125
: LGTM: New nested_recursive_revert functionThe
nested_recursive_revert
function correctly executes a Cosmos message using the existing_recursive
helper function and then immediately reverts. This design creates a controlled test case for reversion after executing external calls.x/evm/state/snapshot.go (3)
3-3
: LGTM: Import added for types packageThe import of the types package is necessary to access the new context keys.
11-18
: LGTM: Enhanced snapshot initialization with parent execute requests trackingThe modifications to
NewSnapshot
correctly initialize the context with tracking for both parent and current execute requests, enabling proper propagation of requests between execution contexts.
28-32
: LGTM: Properly propagating execute requests to parent contextThe implementation correctly retrieves both parent and current execute requests from the context and appends the current requests to the parent's list, ensuring that execute requests are properly managed during context transitions.
x/evm/contracts/counter/Counter.go (4)
34-35
: ABI and Bin updates align with the new function implementations.The ABI and Bin fields in CounterMetaData have been updated to include the signatures for the two new functions:
nested_recursive_revert
andrecursive_revert
. These changes are necessary to support the new contract functionality.
414-433
: Implementation for NestedRecursiveRevert looks good.The implementation follows the consistent pattern used for other transaction methods in this generated file. The method is correctly exposed at all three levels: CounterTransactor, CounterSession, and CounterTransactorSession.
477-496
: Implementation for RecursiveRevert looks good.The implementation follows the consistent pattern used for other transaction methods in this generated file. The method is correctly exposed at all three levels: CounterTransactor, CounterSession, and CounterTransactorSession.
1-3
: Note: This is an auto-generated file.As indicated by the comment, this is a generated binding and manual changes will be lost during regeneration. The new methods appear to be properly generated using the same tools that generated the rest of the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
integration-tests/go.mod (1)
247-279
: Dependency Replacement Consistency Check.
The replace directives (e.g., forgithub.com/99designs/keyring
,github.com/dgrijalva/jwt-go
,github.com/gin-gonic/gin
, and others) remain critical for ensuring compatibility. Please verify that these replacements continue to work seamlessly with the updated dependencies and check particularly for any interactions with the dependency changes outlined in PR 349.x/evm/contracts/i_cosmos/ICosmos.sol (2)
62-62
:❓ Verification inconclusive
Added gas limit parameter to execute_cosmos function.
The
execute_cosmos
function signature has been updated to include auint64 gas_limit
parameter. This change allows better control over gas consumption for cosmos message execution.This is a breaking change to the interface. Please ensure that all callers of this function have been updated to provide the new parameter.
🏁 Script executed:
#!/bin/bash # Search for all callers of execute_cosmos to ensure they're updated rg "execute_cosmos\s*\(\s*[^,)]*\s*\)" --type solidityLength of output: 89
Action Required: Verify All Callers for Updated
execute_cosmos
SignatureThe
execute_cosmos
function inx/evm/contracts/i_cosmos/ICosmos.sol
has been updated to include auint64 gas_limit
parameter:function execute_cosmos(string memory msg, uint64 gas_limit) external returns (bool dummy);This change is breaking. Please ensure that every caller of this function has been updated to supply the new parameter. Note that the previous shell script using
--type solidity
resulted in an error; re-run the search with a corrected command (which scopes to Solidity files) as follows:#!/bin/bash # Searching for all callers of execute_cosmos in Solidity files rg "execute_cosmos\s*\(" -g "*.sol"Manually verify the output of this command to confirm that all invocations now include the required
gas_limit
argument.
90-92
:❓ Verification inconclusive
Added gas limit parameter to execute_cosmos_with_options function.
The
execute_cosmos_with_options
function signature has been updated to include auint64 gas_limit
parameter. This change allows better control over gas consumption for cosmos message execution with options.This is a breaking change to the interface. Please ensure that all callers of this function have been updated to provide the new parameter.
🏁 Script executed:
#!/bin/bash # Search for all callers of execute_cosmos_with_options to ensure they're updated rg "execute_cosmos_with_options\s*\(\s*[^,)]*\s*,\s*[^,)]*\s*\)" --type solidityLength of output: 115
Action Required: Verify All Callers of
execute_cosmos_with_options
The interface change adds a new
uint64 gas_limit
parameter toexecute_cosmos_with_options
, which is a breaking change. Please ensure that all invocations of this function across the codebase have been updated to supply the new parameter.
- In particular, confirm that in
x/evm/contracts/i_cosmos/ICosmos.sol
(lines 90-92) the updated signature is correctly implemented.- Since our initial search command failed due to the unrecognized file type "solidity", re-run the search using a command that targets Solidity files, for example:
rg "execute_cosmos_with_options\s*\(" --glob "*.sol"- Manually verify the results to ensure that every caller now provides the
gas_limit
argument.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
integration-tests/go.sum
is excluded by!**/*.sum
📒 Files selected for processing (19)
.github/workflows/docker.yml
(0 hunks)integration-tests/go.mod
(5 hunks)x/evm/contracts/counter/Counter.go
(4 hunks)x/evm/contracts/counter/Counter.sol
(4 hunks)x/evm/contracts/erc20_wrapper/ERC20Wrapper.go
(2 hunks)x/evm/contracts/erc20_wrapper/ERC20Wrapper.sol
(4 hunks)x/evm/contracts/i_cosmos/ICosmos.go
(2 hunks)x/evm/contracts/i_cosmos/ICosmos.sol
(2 hunks)x/evm/keeper/context.go
(5 hunks)x/evm/keeper/context_test.go
(6 hunks)x/evm/keeper/precompiles_test.go
(3 hunks)x/evm/precompiles/cosmos/contract.go
(7 hunks)x/evm/precompiles/cosmos/contract_test.go
(16 hunks)x/evm/precompiles/cosmos/types.go
(2 hunks)x/evm/precompiles/erc20_registry/contract.go
(1 hunks)x/evm/precompiles/erc20_registry/contract_test.go
(4 hunks)x/evm/precompiles/jsonutils/contract.go
(1 hunks)x/evm/precompiles/jsonutils/contract_test.go
(8 hunks)x/evm/types/dispatch.go
(1 hunks)
💤 Files with no reviewable changes (1)
- .github/workflows/docker.yml
🚧 Files skipped from review as they are similar to previous changes (4)
- x/evm/keeper/context.go
- x/evm/precompiles/cosmos/contract.go
- x/evm/precompiles/cosmos/types.go
- x/evm/contracts/counter/Counter.sol
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Run test and upload codecov
🔇 Additional comments (56)
integration-tests/go.mod (10)
8-8
: Dependency Update: cosmos-sdk Version Change.
The dependency ongithub.com/cosmos/cosmos-sdk
has been upgraded to v0.50.12. Please verify that this version is compatible with the rest of the system and that any dependent modules (or external integrations) are adjusted accordingly.
68-68
: Dependency Update: cosmos-db Version Change.
The update ofgithub.com/cosmos/cosmos-db
to v1.1.1 aligns with the audit fixes and upgrade objectives. Confirm that downstream modules relying on this dependency remain unaffected by the version bump.
73-73
: Dependency Update: ibc-apps Middleware Version Change.
Thegithub.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8
dependency is now at v8.1.1. Ensure that integration tests cover any behavioral changes that might come with this update.
78-78
: Dependency Update: ledger-cosmos-go Version Update.
Upgradinggithub.com/cosmos/ledger-cosmos-go
to v0.14.0 should bring necessary fixes and improvements. Please make sure that any components interacting with ledger functionality are tested for compatibility.
145-145
: Dependency Update: OPinit Version Update.
Thegithub.com/initia-labs/OPinit
dependency has been updated to v0.7.2. Verify that any public API or behavioral changes in OPinit are well covered by integration tests.
150-150
: Dependency Update: evm-tx Submodule Version Update.
The version ofgithub.com/initia-labs/kvindexer/submodules/evm-tx
has been increased to v0.1.6. Please confirm that this update is in line with related transaction processing logic and does not cause any regression.
152-152
: Dependency Update: movevm Module Version Update.
The upgrade togithub.com/initia-labs/movevm
v0.7.0 is in keeping with the overall dependency alignment objectives. Ensure that any new or deprecated features from this version are accounted for in tests and documentation.
173-173
: Dependency Update: forwarding Module Version Update.
The upgrade ofgithub.com/noble-assets/forwarding/v2
to v2.0.1 should be validated against the usage scenarios in the integration tests. Monitor for any API changes that might affect functionality.
199-199
: Dependency Update: spf13/cast Version Update.
Thegithub.com/spf13/cast
dependency now uses v1.7.1. Please review its usage across the project to ensure that there are no breaking changes in type conversion or other API behavior.
1-279
: Overall Dependency Upgrade Verification.
All dependency versions have been updated as required by the audit fixes and upgrade objectives. It is recommended to run the full integration test suite to confirm that there are no breaking changes or regressions. Additionally, double-check that the temporary replace directives and indirect dependency updates are consistent with the root-level dependency management.x/evm/types/dispatch.go (1)
17-19
: Good addition of the GasLimit field to ExecuteRequest.Adding the gas limit field to the ExecuteRequest struct enhances the contract execution capabilities by allowing explicit gas control, which aligns with the broader gas management improvements across the codebase.
x/evm/precompiles/erc20_registry/contract_test.go (4)
90-92
: Improved error handling for gas-related test cases.The test now properly checks for the execution reverted error and verifies that the output contains "out of gas", which is more consistent with how the EVM handles gas errors.
108-110
: Consistent error handling approach for gas limit tests.This change follows the same pattern of checking for ErrExecutionReverted and validating the output message, maintaining consistency with the previous change.
141-143
: Standardized gas limit error verification.The update follows the standard error handling pattern established in the previous test cases, ensuring a consistent approach throughout the file.
159-161
: Aligned panic test with updated error handling approach.The out of gas panic test now correctly checks for ErrExecutionReverted and validates the error message, consistent with the error handling approach in other test cases.
x/evm/keeper/precompiles_test.go (6)
63-63
: Added gas limit parameter to execute_cosmos call.The addition of a 150,000 gas limit parameter to the execute_cosmos function call aligns with the updated function signature in the contracts, ensuring proper gas management during test execution.
292-292
: Added consistent gas limit parameter.This change adds the necessary gas limit parameter to another execute_cosmos call, maintaining consistency across function calls.
313-313
: Gas limit parameter addition for contract function.Adding the gas limit parameter here ensures that the test properly handles gas limitations in accordance with updated contract interfaces.
355-355
: Added gas limit parameter to execute_cosmos_with_options.The gas limit parameter addition ensures that this test case aligns with the updated function signature.
396-396
: Consistent gas limit parameter added.This change maintains consistency with the previous test cases by including the gas limit parameter.
414-414
: Added required gas limit parameter.The gas limit parameter is correctly added to the final test case, ensuring all test cases follow the updated function signature.
x/evm/keeper/context_test.go (6)
292-292
: Added gas limit parameter to execute_cosmos function call.The addition of a 120,000 gas limit parameter aligns with the updated function signature, ensuring proper gas management during contract execution testing.
313-313
: Consistent gas limit parameter added.This change maintains consistency with the previous function call by including the appropriate gas limit parameter.
355-355
: Added gas limit parameter to execute_cosmos_with_options.The gas limit parameter ensures this test follows the updated function signature and properly tests gas limit handling.
396-396
: Consistent gas limit parameter added.This change follows the pattern established in previous test cases, maintaining consistency in how function calls are made.
414-414
: Added required gas limit parameter.The gas limit parameter is correctly included to match the updated function signature.
443-473
: Good addition of a new test for recursive execution with revert.This test effectively verifies that execute requests are properly handled even when revert occurs in a recursive call context. The test case helps ensure the system's resilience against potential contract execution issues.
x/evm/precompiles/erc20_registry/contract.go (2)
54-58
: Improved error handling for out of gas conditions.The error handling has been updated to provide a more descriptive error message when an out-of-gas condition occurs in the precompile. This change ensures that the gas accounting is correct by setting the used gas to the supplied gas.
66-67
: Streamlined error handling logic.The error handling has been simplified by removing the special case for out-of-gas errors. Now all errors are consistently converted to
vm.ErrExecutionReverted
with the appropriate revert reason, which improves debugging and error reporting.x/evm/precompiles/jsonutils/contract.go (2)
63-67
: Improved error handling for out of gas conditions.The error handling has been updated to provide a more descriptive error message when an out-of-gas condition occurs in the precompile. This change ensures proper gas accounting by setting the used gas to the supplied gas.
73-76
: Streamlined error handling logic.The error handling has been simplified by removing the special case for out-of-gas errors. Now all errors are consistently converted to
vm.ErrExecutionReverted
with the appropriate revert reason, which improves debugging and error reporting.x/evm/precompiles/cosmos/contract_test.go (5)
84-86
: Updated error assertion to match new error handling.The test has been updated to reflect the changes in error handling from
vm.ErrOutOfGas
tovm.ErrExecutionReverted
with additional verification of the error message content.
130-132
: Updated additional test cases to match new error handling pattern.All test cases that previously checked for
vm.ErrOutOfGas
have been consistently updated to verifyvm.ErrExecutionReverted
with an appropriate error message check.Also applies to: 175-177, 219-221, 251-253, 295-297, 374-376, 470-472, 517-519, 559-561
278-279
: Added gas limit variable for testing.A new
contractExecGas
variable has been introduced to clearly define the gas limit for contract execution in tests, improving readability and maintainability.Also applies to: 356-357
291-291
: Updated test data to include gas limit parameter.The test data has been updated to include the newly required
gas_limit
parameter for theexecute_cosmos
andexecute_cosmos_with_options
functions.Also applies to: 332-332, 370-370, 411-411
316-319
: Updated expected execution request to include gas limit.The test expectations have been updated to include the
GasLimit
field in the expected execution request, ensuring that the gas limit is properly passed through the system.Also applies to: 395-398
x/evm/precompiles/jsonutils/contract_test.go (1)
108-110
: Improved error handling for gas exhaustion scenariosThe error handling has been updated to check for
vm.ErrExecutionReverted
instead of a specific out-of-gas error, with an additional verification of the error message content. This change better aligns with Ethereum's behavior where out-of-gas conditions trigger execution reverts.x/evm/contracts/erc20_wrapper/ERC20Wrapper.sol (2)
68-80
: Enhanced gas control for IBC transfersThe addition of the
gas_limit
parameter to thewrap
function provides fine-grained control over gas consumption during cross-chain transfers. The implementation maintains backward compatibility by having the existing function signatures delegate to the new implementation with a sensible default of 250,000 gas units.
246-260
: Improved JSON formatting for IBC message constructionThe IBC transfer message construction has been enhanced by using proper JSON utilities (
JSONUTILS_CONTRACT.stringify_json
) instead of string concatenation. This makes the code more robust against JSON formatting errors and improves maintainability.x/evm/contracts/erc20_wrapper/ERC20Wrapper.go (2)
34-35
: Updated contract bindings reflect Solidity contract changesThe auto-generated bindings have been properly updated to reflect the changes in the Solidity contract, including the updated ABI and bytecode.
476-495
: Updated method bindings for new gas_limit parameterThe Go bindings for the
Wrap0
method have been correctly updated to include the newgas_limit
parameter, maintaining consistency with the Solidity contract changes.x/evm/contracts/i_cosmos/ICosmos.go (2)
282-301
: Enhanced ICosmos interface with gas managementThe ICosmos interface has been consistently updated to include the
gas_limit
parameter in theexecute_cosmos
method, aligning with the changes in the contract implementations. This provides better control over gas consumption during cosmos message execution.
303-322
: Consistent gas_limit parameter addition to ExecuteCosmosWithOptionsThe
execute_cosmos_with_options
method has been similarly updated to include thegas_limit
parameter, maintaining API consistency across the cosmos execution functions. This coordinated change ensures proper gas management throughout the codebase.x/evm/contracts/counter/Counter.go (13)
34-35
: Ensure ABI and BIN are in sync with recent contract changes
These lines typically update automatically after any Solidity contract modifications. It's good practice to verify that the generated ABI and BIN match the actual compiled contract.Would you like to confirm these changes with an additional build or code search?
288-293
: New signature forExecuteCosmos
The function now accepts agas_limit
parameter, aligning with the updated contract. This appears correct given the ABI.
295-300
:ExecuteCosmos
session binding updated
The updated signature in the session method is consistent with the transactor method.
302-307
: Consistency check forExecuteCosmos
in TransactorSession
All references to the new parameter (gas_limit
) look properly wired.
309-314
:ExecuteCosmosWithOptions
extended
The added argument list matches the contract method signatures for gas control and callback logic.
316-321
: Session binding forExecuteCosmosWithOptions
The updated function signature is correct as per the new contract definition.
323-328
:ExecuteCosmosWithOptions
in TransactorSession
All parameters, includinggas_limit
andallow_failure
, align with the ABI.
414-419
: NewNestedRecursiveRevert
transactor method
This newly exposed function for nested recursion and revert behavior matches the ABI. Consider adding thorough tests that verify revert conditions.
421-426
:NestedRecursiveRevert
in Session
The session version’s signature and call flow correctly follow the transactor method above.
428-433
:NestedRecursiveRevert
in TransactorSession
All parameters are passed as expected. Ensure testing covers the revert paths.
477-482
: Introduction ofRecursiveRevert
in Transactor
Ensure your contract logic for “recursive_revert” is tested extensively to cover edge cases.
484-489
:RecursiveRevert
in Session
Matches the contract signature for revert testing scenarios.
491-496
:RecursiveRevert
in TransactorSession
No issues spotted. This final binding is consistent with the rest.
Description
This PR includes dependency upgrades and also includes audit fixes.
need to wait: initia-labs/initia#349
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changeReviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
Summary by CodeRabbit
New Features
Improvements
Documentation
Chores