clients/js: handle injective mainnet
This commit is contained in:
parent
09aee3cfde
commit
004ccecaf8
|
@ -31,7 +31,7 @@ export async function execute_injective(
|
||||||
|
|
||||||
const network = getNetworkInfo(endPoint);
|
const network = getNetworkInfo(endPoint);
|
||||||
const walletPKHash = n.key;
|
const walletPKHash = n.key;
|
||||||
const walletPK = PrivateKey.fromHex(walletPKHash);
|
const walletPK = PrivateKey.fromMnemonic(walletPKHash);
|
||||||
const walletInjAddr = walletPK.toBech32();
|
const walletInjAddr = walletPK.toBech32();
|
||||||
const walletPublicKey = walletPK.toPublicKey().toBase64();
|
const walletPublicKey = walletPK.toPublicKey().toBase64();
|
||||||
|
|
||||||
|
@ -130,7 +130,9 @@ export async function execute_injective(
|
||||||
contractAddress: target_contract,
|
contractAddress: target_contract,
|
||||||
exec: {
|
exec: {
|
||||||
action,
|
action,
|
||||||
...execute_msg[action],
|
msg: {
|
||||||
|
...execute_msg[action],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log("transaction:", transaction);
|
console.log("transaction:", transaction);
|
||||||
|
@ -141,10 +143,6 @@ export async function execute_injective(
|
||||||
const { signBytes, txRaw } = createTransaction({
|
const { signBytes, txRaw } = createTransaction({
|
||||||
message: transaction.toDirectSign(),
|
message: transaction.toDirectSign(),
|
||||||
memo: "",
|
memo: "",
|
||||||
fee: {
|
|
||||||
...DEFAULT_STD_FEE,
|
|
||||||
gas: (parseInt(DEFAULT_STD_FEE.gas, 10) * 2.5).toString(),
|
|
||||||
},
|
|
||||||
pubKey: walletPublicKey,
|
pubKey: walletPublicKey,
|
||||||
sequence: parseInt(accountDetails.account.base_account.sequence, 10),
|
sequence: parseInt(accountDetails.account.base_account.sequence, 10),
|
||||||
accountNumber: parseInt(
|
accountNumber: parseInt(
|
||||||
|
|
|
@ -86,8 +86,9 @@ const MAINNET = {
|
||||||
"85957f38de1768d6db9eab29bee9dd2a01462aff9c8d83daefb9bcd2506c32d2",
|
"85957f38de1768d6db9eab29bee9dd2a01462aff9c8d83daefb9bcd2506c32d2",
|
||||||
},
|
},
|
||||||
injective: {
|
injective: {
|
||||||
rpc: undefined,
|
rpc: "http://sentry0.injective.network:26657",
|
||||||
key: undefined,
|
chain_id: "injective-1",
|
||||||
|
key: get_env_var("INJECTIVE_KEY"),
|
||||||
},
|
},
|
||||||
osmosis: {
|
osmosis: {
|
||||||
rpc: undefined,
|
rpc: undefined,
|
||||||
|
|
Loading…
Reference in New Issue