Comments (3)
What are the tokens/denoms you are trying to use for a new pool? Which pool type do you want to create?
Does your wallet balance is >0 and you ever made any transaction on injective testnet before?
from astroport-core.
@epanchee Thanks for answer
i have solved the problem now i need to automatic create pair and store pair info to storage but not succeess
here is code
use astroport::asset::AssetInfo;
use astroport::factory::{PairType, ExecuteMsg};
use astroport::factory::ExecuteMsg::CreatePair;
use cosmwasm_std::{Addr, attr, Response, to_binary, WasmMsg, DepsMut, Env, MessageInfo};
use cw20_base::ContractError;
const FACTORY: &str = "inj1c4e2787cwawlqslph0yzn62wq4xpzzq9y9kjwj";
pub fn try_create_pair(
deps: DepsMut,
env: Env,
info: MessageInfo,
token_code_id: u64,
) -> Result<Response, ContractError> {
let assets: Vec<AssetInfo> = vec![
AssetInfo::NativeToken {
denom: "inj".to_string(),
},
AssetInfo::Token {
contract_addr: env.contract.address,
},
];
let create_pair_msg = to_binary(&CreatePair {
pair_type: PairType::Xyk {},
asset_infos:assets,
init_params: None,
})?;
let msg = WasmMsg::Execute {
contract_addr: FACTORY.to_string(),
msg: create_pair_msg,
funds: vec![],
};
//create error
failed to execute message; message index: 0: dispatch: submessages: Error parsing into type astroport::factory::ExecuteMsg: unknown variant `asset_infos`, expected one of `update_config`, `update_pair_config`, `create_pair`, `deregister`, `propose_new_owner`, `drop_ownership_proposal`, `claim_ownership`, `mark_as_migrated`: execute wasm contract failed
//get pair address and store to storage
Ok(Response::new()
.add_message(msg)
.add_attributes(vec![
attr("action", "create_pair"),
]))
}
}
from astroport-core.
Hi,
Sorry for the long reply.
Are you using test-tube? Please note that Astroport doesn't provide test-tube support and you have to figure out it yourself.
The error denotes that you're trying to send wrong execute message on factory. Consult with factory execute messages here.
from astroport-core.
Related Issues (20)
- Address validation + lower case verification HOT 1
- receive_cw20 not enforcing admins or contract owners HOT 2
- update() function in periphery contract is callable by anyone. HOT 2
- generator `update_pool_rewards` need to update `proxy_reward_balance_before_update` HOT 2
- Handling bAsset pending rewards HOT 1
- precision mismatch on spread amount calc HOT 1
- Incorrect spread calculation for stable pool simulation
- Bluna stable pool HOT 1
- Testnet contract addresses HOT 3
- feature request: swap w/ receive asset HOT 2
- Astroport - Adding Liquidity HOT 2
- Publish updated version to crates.io HOT 4
- Astroport liquidity pool issues HOT 1
- Types found within `astroport` and `astroport-pair` on crates.io are incompatible HOT 2
- Publish updated version to crates.io HOT 4
- Error: [reason:"insufficient funds" metadata:{key:"ABCICode" value:"5"} metadata:{key:"Codespace" value:"sdk"}]: rpc error: code = Unknown desc = spendable balance 24995000000000inj is smaller than 200000000000000inj: insufficient funds: insufficient funds [!injective!labs/[email protected]/x/auth/ante/fee.go:132] With gas wanted: '50000000' and gas used: '15391' : unknown request HOT 2
- [bug] can't swap on neutron HOT 1
- What is the contract version corresponding to Neutron 33? HOT 3
- cargo schema failed HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from astroport-core.