-
Notifications
You must be signed in to change notification settings - Fork 4
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: support new x/posts
features
#301
Conversation
1e1eabe
to
fb8e6d7
Compare
@@ -1,35 +0,0 @@ | |||
#!/usr/bin/env bash |
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.
Removed it since it is unused.
# Initialize the second contract | ||
echo "Initializing second contract..." | ||
echo $KEYRING_PASS | desmos --keyring-backend=file tx wasm instantiate 1 "{}" \ | ||
--from $USER1 --label "test-contract-" --admin $USER1_ADDRESS --chain-id=testchain -b=sync -y | ||
echo "Second contract initialized" |
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.
It is for testing receiver of MsgAcceptPostOwnerTransferRequest
and MsgRefusePostOwnerTransferRequest
contract, the second contract is used as receiver.
The query interaction test errors since missing stargate queries registration: |
@@ -116,13 +116,16 @@ impl DesmosCli { | |||
/// Gets a contract address by it's id. | |||
/// | |||
/// * `id` - ID of the contract of interest. | |||
pub fn get_contract_by_code(&self, id: u64) -> String { | |||
/// * `offset` - Offset of the target contract. | |||
pub fn get_contract_by_code(&self, id: u64, offset: usize) -> String { |
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.
Add offset parameter for triggering between sender contract and receiver contract.
02e0c40
to
b1d2e94
Compare
}; | ||
|
||
/// Creates a post inside the given subspace for interaction testing | ||
pub fn create_test_post(subspace_id: u64, contract_address: &str) -> Post { |
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.
To make test stateless, we can create a post then return it for the test, then we can avoid from a lot of const number like TEST_MOVABLE_POST
and etc.
x/posts
features
b1d2e94
to
554627e
Compare
The test will be passed after this PR released desmos-labs/desmos#1218 |
ec0e025
to
5defba3
Compare
The tests would be passed after desmos-labs/desmos#1226 released. |
79b41d5
to
144cd56
Compare
@manu0466 It is ready to review |
Deps: #300Deps #308Deps: #362
This PR intends to support new posts msgs and queries.