forked from cerc-io/laconicd-deprecated
fix lint
This commit is contained in:
parent
f8b3a67a54
commit
810ac5abb7
2
client/docs/swagger-ui/swagger-ui-bundle.js
vendored
2
client/docs/swagger-ui/swagger-ui-bundle.js
vendored
@ -3048,7 +3048,7 @@
|
|||||||
})
|
})
|
||||||
}, t.getCommonExtensions = function(e) {
|
}, t.getCommonExtensions = function(e) {
|
||||||
return e.filter(function(e, t) {
|
return e.filter(function(e, t) {
|
||||||
return /^pattern|maxLength|minLength|maximum|minimum/.test(t)
|
return /^pattern$|^maxLength$|^minLength$|^maximum$|^minimum$/.test(t)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}).call(t, n(54).Buffer)
|
}).call(t, n(54).Buffer)
|
||||||
|
@ -3283,7 +3283,7 @@
|
|||||||
})
|
})
|
||||||
}, e.getCommonExtensions = function(t) {
|
}, e.getCommonExtensions = function(t) {
|
||||||
return t.filter(function(t, e) {
|
return t.filter(function(t, e) {
|
||||||
return /^pattern|maxLength|minLength|maximum|minimum/.test(e)
|
return /^pattern$|^maxLength$|^minLength$|^maximum$|^minimum$/.test(e)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}).call(e, n(68).Buffer)
|
}).call(e, n(68).Buffer)
|
||||||
|
4
client/docs/swagger-ui/swagger.yaml
vendored
4
client/docs/swagger-ui/swagger.yaml
vendored
@ -14180,10 +14180,6 @@ paths:
|
|||||||
type: boolean
|
type: boolean
|
||||||
tags:
|
tags:
|
||||||
- Query
|
- Query
|
||||||
=======
|
|
||||||
>>>>>>> v0.20.0
|
|
||||||
=======
|
|
||||||
>>>>>>> v0.21.0
|
|
||||||
definitions:
|
definitions:
|
||||||
ethermint.evm.v1.ChainConfig:
|
ethermint.evm.v1.ChainConfig:
|
||||||
type: object
|
type: object
|
||||||
|
@ -5,4 +5,4 @@ plugins:
|
|||||||
opt: plugins=grpc,Mgoogle/protobuf/duration.proto=Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types,Mcosmos/orm/v1alpha1/orm.proto=github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1alpha1
|
opt: plugins=grpc,Mgoogle/protobuf/duration.proto=Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types,Mcosmos/orm/v1alpha1/orm.proto=github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1alpha1
|
||||||
- name: grpc-gateway
|
- name: grpc-gateway
|
||||||
out: .
|
out: .
|
||||||
opt: logtostderr=true,allow_colon_final_segments=true
|
opt: logtostderr=true,allow_colon_final_segments=true
|
||||||
|
@ -12,4 +12,4 @@ plugins:
|
|||||||
- logtostderr=true
|
- logtostderr=true
|
||||||
- fqn_for_swagger_name=true
|
- fqn_for_swagger_name=true
|
||||||
- simple_operation_ids=true
|
- simple_operation_ids=true
|
||||||
strategy: all
|
strategy: all
|
||||||
|
File diff suppressed because one or more lines are too long
@ -15,44 +15,6 @@ from .utils import (
|
|||||||
w3_wait_for_new_blocks,
|
w3_wait_for_new_blocks,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Smart contract names
|
|
||||||
GREETER_CONTRACT = "Greeter"
|
|
||||||
ERC20_CONTRACT = "TestERC20A"
|
|
||||||
|
|
||||||
# ChangeGreeting topic from Greeter contract calculated from event signature
|
|
||||||
CHANGE_GREETING_TOPIC = Web3.keccak(text="ChangeGreeting(address,string)")
|
|
||||||
# ERC-20 Transfer event topic
|
|
||||||
TRANSFER_TOPIC = Web3.keccak(text="Transfer(address,address,uint256)")
|
|
||||||
|
|
||||||
|
|
||||||
def test_get_logs_by_topic(cluster):
|
|
||||||
w3: Web3 = cluster.w3
|
|
||||||
|
|
||||||
contract, _ = deploy_contract(w3, CONTRACTS["Greeter"])
|
|
||||||
|
|
||||||
topic = Web3.keccak(text="ChangeGreeting(address,string)")
|
|
||||||
|
|
||||||
# with tx
|
|
||||||
tx = contract.functions.setGreeting("world").build_transaction()
|
|
||||||
receipt = send_transaction(w3, tx)
|
|
||||||
assert receipt.status == 1
|
|
||||||
|
|
||||||
# The getLogs method under the hood works as a filter
|
|
||||||
# with the specified topics and a block range.
|
|
||||||
# If the block range is not specified, it defaults
|
|
||||||
# to fromBlock: "latest", toBlock: "latest".
|
|
||||||
# Then, if we make a getLogs call within the same block that the tx
|
|
||||||
# happened, we will get a log in the result. However, if we make the call
|
|
||||||
# one or more blocks later, the result will be an empty array.
|
|
||||||
logs = w3.eth.get_logs({"topics": [topic.hex()]})
|
|
||||||
|
|
||||||
assert len(logs) == 1
|
|
||||||
assert logs[0]["address"] == contract.address
|
|
||||||
|
|
||||||
w3_wait_for_new_blocks(w3, 2)
|
|
||||||
logs = w3.eth.get_logs({"topics": [topic.hex()]})
|
|
||||||
assert len(logs) == 0
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module")
|
@pytest.fixture(scope="module")
|
||||||
def custom_ethermint(tmp_path_factory):
|
def custom_ethermint(tmp_path_factory):
|
||||||
|
@ -228,7 +228,9 @@ func NewCLILogger(cmd *cobra.Command) CLILogger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new Network for integration tests or in-process testnets run via the CLI
|
// New creates a new Network for integration tests or in-process testnets run via the CLI
|
||||||
func New(l Logger, baseDir string, cfg Config) (*Network, error) {
|
func New(l Logger, baseDir string, cfg Config) (*Network, error) { // nosemgrep
|
||||||
|
// ignore semgrep: Missing mutex unlock before returning from a function.
|
||||||
|
// unlocking in cleanup func
|
||||||
// only one caller/test can create and use a network at a time
|
// only one caller/test can create and use a network at a time
|
||||||
l.Log("acquiring test network lock")
|
l.Log("acquiring test network lock")
|
||||||
lock.Lock()
|
lock.Lock()
|
||||||
@ -330,8 +332,7 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) {
|
|||||||
} else {
|
} else {
|
||||||
_, jsonRPCPort, err := server.FreeTCPAddr()
|
_, jsonRPCPort, err := server.FreeTCPAddr()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// ignore semgrep: Missing mutex unlock before returning from a function.
|
|
||||||
// unlocking in cleanup func
|
|
||||||
return nil, err // nosemgrep
|
return nil, err // nosemgrep
|
||||||
}
|
}
|
||||||
appCfg.JSONRPC.Address = fmt.Sprintf("127.0.0.1:%s", jsonRPCPort)
|
appCfg.JSONRPC.Address = fmt.Sprintf("127.0.0.1:%s", jsonRPCPort)
|
||||||
|
Loading…
Reference in New Issue
Block a user