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