Commit Graph

1553 Commits

Author SHA1 Message Date
Robert Pirtle
528be6350e
feat(evmutil): add CosmosCoinsFullyBackedInvariant (#1610)
* add IterateAllDeployedCosmosCoinContracts method

* refactor unpacking big int from erc20 query

* add QueryERC20TotalSupply method

* feat(evmutil): add CosmosCoinsFullyBackedInvariant

* update changelog
2023-06-05 11:39:53 -07:00
Robert Pirtle
f4b8bf8f07
feat(evmutil): implement MsgConvertCosmosCoinFromERC20 (#1609)
* first pass at convert cosmos coin -> evm msg

* test ConvertCosmosCoinFromERC20 method

* test message server for MsgConvertCosmosCoinFromERC20

* update spec to include MsgConvertCosmosCoinFromERC20

* update changelog

* add CLI command for convert-cosmos-coin-from-erc20

* add test of removed/re-enable denom for convert
2023-06-02 14:26:51 -07:00
Robert Pirtle
d988330d7f
feat(evmutil): add MsgConvertCosmosCoinFromERC20 proto (#1608)
* add MsgConvertCosmosCoinFromERC20 proto & Msg impl

* test MsgConvertCosmosCoinFromERC20 validation

* register msg codec in this PR 😅
2023-06-02 12:36:59 -07:00
Robert Pirtle
d500cd1236
feat(evmutil): Add DeployedCosmosCoinContracts query (#1605)
* add QueryDeployedCosmosCoinContracts proto

* also implement protobuf marshaler for InternalEVMAddress

* setup iteration & collection for deployed addrs

* rewrite grpc query tests

* support querying for all deployed contracts

* support querying by cosmos denom

* fix & test pagination

* remove unused iteration methods

* add CLI query command

* update changelog

* update spec

* add InternalEVMAddress.MarshalJSON test
2023-06-02 11:23:52 -07:00
Adam Robert Turman
12e3dfecc3
Update internal testnet commit hash (#1611)
* Update KAVA.VERSION

Updated to match: dc1f8eb153

* Update ci/env/kava-internal-testnet/KAVA.VERSION

* Update ci/env/kava-internal-testnet/KAVA.VERSION

* update internal genesis params

---------

Co-authored-by: Robert Pirtle <astropirtle@gmail.com>
2023-06-01 13:31:34 -05:00
Robert Pirtle
fd83da7a05
feat(evmutil)!: emit events on MsgConvertCosmosCoinToERC20 (#1604)
* better error message for mismatched events

* rename evm asset conversion event types

* emit message event for MsgConvertCosmosCoinToERC20

* emit convert_cosmos_coin_to_erc20 event
2023-05-30 13:06:46 -07:00
Robert Pirtle
741f1e42ee
feat(evmutil)!: implement MsgConvertCosmosCoinToERC20 (#1603)
* feat(evmutil): implement MsgConvertCosmosCoinToERC20

* docs(evmutil): update module spec

* update changelog

* rename conversion -> conversion_evm_native

* refactor ConvertCosmosCoinToERC20 to keeper method

* add CLI cmd for MsgConvertCosmosCoinToERC20

* updates from pr
2023-05-30 12:00:01 -07:00
Ruaridh
1459170a37
fix(evmutil): register MsgConvertCosmosCoinToERC20 on amino (#1599)
* add amino registration test

* register evmutil types on app amino codec

* register new msg type in amino and proto,
also use new register method that checks length to catch ledger issues

* clarify variable naming
2023-05-26 19:06:26 -07:00
Nick DeLuca
13b079b70f
update ibc to 6.1.1 (#1602) 2023-05-25 09:30:49 -07:00
Robert Pirtle
6585ac24b0
feat(evmutil): track deployed contracts in state (#1598)
* feat(evmutil): track deployed contracts in state

* docs(evmutil): update state spec

* update changelog
2023-05-24 16:23:33 -07:00
Robert Pirtle
8495619130
docs: update mainnet kava version (#1597)
* docs: update mainnet kava version

* ci: reenable breaking proto checks
2023-05-23 12:38:46 -07:00
Robert Pirtle
d4cbc759f8
update new names, NativeCoin -> CosmosCoin (#1596)
* rename contract NativeCoin -> CosmosCoin

* rename all entities NativeCoin -> CosmosCoin

* update changelog

* update protonet genesis.json
2023-05-23 12:32:27 -07:00
Robert Pirtle
61c3aa090b
feat(evmutil): add proto for MsgConvertNativeCoinToERC20 (#1595)
* add proto for MsgConvertNativeCoinToERC20

* implement Msg types & unit test validation
2023-05-23 11:01:45 -07:00
Robert Pirtle
278f7854dc
feat(evmutil): add ERC20KavaWrappedNativeCoinContract (#1591)
* feat(evmutil): add ERC20KavaWrappedNativeCoinContract

* adds the contract ABI & bytecode for an Ownable erc20 with the following:
  * customizable decimals on deploy -> requires overriding decimals() view
  * mint() exposed for the contract owner which will be the evmutil module
  * burn() exposed for the contract owner which will be the evmutil module
* sets up keeper to deploy above token based on details from an
  AllowedNativeCoinERC20Token
* tests basic queries and permissions of deployed contract

* update changelog

* improve error messages & comments for erc20 deploy
2023-05-23 10:16:00 -07:00
Robert Pirtle
6da31bd662
feat: add contract for ERC20KavaWrappedNativeCoin (#1594)
* setup empty hardhat project for evm contract dev

* setup eslint

* setup prettier

* setup solhint

* ignore contracts dir in docker

* add ERC20KavaWrappedNativeCoin contract

* add unit tests for ERC20KavaWrappedNativeCoin

* use solidity 0.8.18

* configure solc with optimization and evm target

* compile ERC20KavaWrappedNativeCoin for evmutil

* setup script for deploying directly to a network

* fix burn test for ERC20KavaWrappedNativeCoin

Co-authored-by: drklee3 <derrick@dlee.dev>

---------

Co-authored-by: drklee3 <derrick@dlee.dev>
2023-05-19 16:39:50 -07:00
Robert Pirtle
ff709d73e1
feat(evmutil): add allow list for evm-convertible sdk denoms (#1590)
* add proto for allowed sdk denoms -> evm conversion

* add validation for AllowedNativeCoinERC20Token

* add validation for AllowedNativeCoinERC20Tokens

* add AllowedNativeDenoms into params & genesis

* add evmutil Params.Validate() test

* fix eip712 ante test

* update changelog

* update internal testnet genesis.json

* update state & param specs

updates to the sections describing functionality will be updated once
that functionality actually exists... :)

* update field decimal -> decimals

field now matches erc20 spec

* add validation decimals will cast to uint8

* add v2 store migration for evmutil

* create & register evmutil migrations

* adds migrator to evmutil's keeper
* sets up Migrate1To2 migration
* registers migration in module
* updates GetParams to properly handle historic block queries

* add unit test for GetParams with historic store
2023-05-19 16:01:46 -07:00
Robert Pirtle
362e39abf6
docs: update changelog to reflect v0.23.0 release (#1589) 2023-05-15 14:15:49 -07:00
Nick DeLuca
31ba0badfc
update ethermint for latest kava version that fixes (#1588)
migration and legacy parameter handling
2023-05-04 10:27:04 -07:00
Nick DeLuca
165ec7bff0
update golang from 1.19 to 1.20, the recommended version for kava 13 (#1571)
mainnet and testnet
2023-05-03 16:16:47 -07:00
Robert Pirtle
250801dd77
fix ci & sort denoms in internal testnet genesis coins (#1580)
* fix internal genesis validation ci

* sort coins in internal testnet genesis
2023-04-27 07:49:55 -07:00
Paul Downing
ea3f2511d4
update multichain btc denom (#1579)
denom in prod is `erc20/multichain/wbtc` apparently instead of `erc20/multichain/btc`
2023-04-25 12:58:34 -05:00
Robert Pirtle
a739e42009
ci: run CI test suite against release branches (#1578) 2023-04-24 12:53:29 -07:00
drklee3
95d9fb9aca
feat: add CommunityCDPWithdrawCollateralPermission (#1568)
* Add CommunityCDPWithdrawCollateralPermission

* Add changelog entry

* Move permission Allow func closer to its other cdp friend
2023-04-20 17:13:02 -07:00
Draco
fff3f50877
Fix cli to fund community pool (#1570) 2023-04-20 19:56:24 -04:00
drklee3
31eae1c6d7
feat: add community cdp withdraw collateral proposal (#1567)
* Initial proposal types

* Add withdraw cdp proposal handler

* Add codec registration for proposal type

* Update CommunityCDPWithdrawCollateralProposal name

* Rename CommunityCDPWithdrawCollateralProposal

* Add changelog entry

* Add proposal registration, unit tests

* Register CommunityCDPWithdrawCollateralProposal proposal type codec
2023-04-20 16:08:53 -07:00
Robert Pirtle
14a0860ddb
feat: add CommunityCDPRepayDebtPermission (#1566)
* feat: add CommunityCDPRepayDebtPermission

When granted, the new permission allows a committee to submit a
CommunityCDPRepayDebtProposal to lower principal owed on a cdp
owned by the x/community module.

* update changelog

* update protonet genesis.json
2023-04-20 14:42:11 -07:00
Robert Pirtle
c5f414e6a5
feat: add community cdp repay debt proposal (#1565)
* add CommunityPoolCDPRepayDebtProposal proto & type

* add cdpKeeper to x/community's keeper

* add handler for CommunityPoolCDPRepayDebtProposal

* more test cases

* rename CommunityPoolCDP -> CommunityCDP

the proposal does not interact with the vanilla community pool

* fix & test stringer

* update changelog
2023-04-20 14:13:16 -07:00
Draco
99890b9c84
add authorizations for x/gov (#1569) 2023-04-20 16:43:33 -04:00
Paul Downing
9b0a348239
Update protonet json earn vaults (#1564)
* Update protonet json earn vaults

Currently our `/kava/incentive/v1beta1/apy` endpoint is expecting there to be an earn vault for each `earn_reward_period` returned by `kava/incentive/v1beta1/params`. Right now, the genesis state for testnet (and protonet) aren't providing all the vaults as options.

Our two choices are:
1. Remove the incentive params for the vaults not included
2 Add the vaults so there is a vault for each incentive param

Going with option 2 here because mainnet has vaults for the denoms which are currently missing

* update protonet genesis earn vaults
2023-04-18 18:55:57 -05:00
Robert Pirtle
8c1c29a03a
feat: add CommunityPoolLendWithdrawalPermission (#1562)
* feat: add CommunityPoolLendWithdrawalPermission

* update kvtool to master branch

* register with PubProposal legacy amino codec

* register missing legacy amino codec PubProposal
2023-04-18 12:31:43 -07:00
drklee3
56f697fba6
feat: overwrite x/distribution /community_pool endpoint to include x/community balance (#1563)
* Add query path rewrites

* Add test for new x/community endpoint

* Update doc for RegisterAPIRouteRewrites

* Add changelog entry

* Add changelog entry link
2023-04-17 12:54:13 -07:00
Levi Schoen
98fb7ced20 match contracts deployed in protonet seed script with internal testnet 2023-04-14 13:44:51 -07:00
Levi Schoen
3e4d081583 fix protonet seed script usdc contract address variable 2023-04-14 12:25:57 -07:00
Levi Schoen
be2db71cb0 update-protonet-committee-params
allow protonet committee members to update evmutil EnabledConversionPairs param
2023-04-14 12:25:57 -07:00
Levi Schoen
1dda67312e dynamically set default contract addresses for bridged asset in testnet seed scripts 2023-04-14 11:00:50 -07:00
Levi Schoen
40f3c0b67b add example script for how to update testnet module params using god committee 2023-04-14 11:00:50 -07:00
Levi Schoen
e6524dc647 namespace seed contract names for easier debugging 2023-04-14 11:00:50 -07:00
Adam Robert Turman
40d390c24b
align internal testnet markets with upcoming release (#1557) 2023-04-13 16:10:19 -05:00
Levi Schoen
6bf654aca7 give internal testnet permissions to update evmutil EnabledConversionPairs param 2023-04-13 12:27:45 -07:00
Levi Schoen
ea9668cd00
run manual internal testnet job everytime it is triggered 2023-04-13 14:30:12 -04:00
Levi Schoen
d671c29c10 add manually triggerable cd job for internal testnet 2023-04-13 10:45:45 -07:00
Adam Robert Turman
70d9d61357
add multichain assets to evmutils (#1554) 2023-04-13 12:15:17 -05:00
Robert Pirtle
79eaad6660
bug: fix invalid accumulation time genesis validation (#1550)
* bug: increase valid accumulation time to 5 years

* add changelog entry

* resolve test failures

* update validation to only check that value is set
2023-04-13 09:42:01 -07:00
Paul Downing
22231db05a
update kava version to the correct current commit (#1552)
* update kava version to the correct current commit

https://github.com/Kava-Labs/kava/pull/1551/files used the id instead of the commit hash 😞 
Use the commit hash not the id

* use eternal release tag

* use kava version for current commit when validating internal testnet genesis

---------

Co-authored-by: Levi Schoen <levismschoen@gmail.com>
2023-04-13 03:34:52 -05:00
Paul Downing
e81507a242
update version internalTestnet to match mainnet (#1551)
mainnet is currently returning:
```
{
  "node_info": {
    "protocol_version": {
      "p2p": "8",
      "block": "11",
      "app": "0"
    },
    "id": "7f57dae02b4f732fac4cf5f53379728d92578d5f",
    "listen_addr": "tcp://0.0.0.0:26656",
    "network": "kava_2222-10",
    "version": "v0.34.24",
    "channels": "40202122233038606100",
    "moniker": "kava-outbound-pruning",
    "other": {
      "tx_index": "on",
      "rpc_address": "tcp://0.0.0.0:26657"
    }
  },
```
Update the internal testnet to match since we aren't testing any unique backend changes in internal testnet and I believe this is just out of date
2023-04-12 20:58:22 -05:00
Adam Robert Turman
c756748dd6
add incentivized lend money markets for multichain wBTC, USDC, and USDT (#1549) 2023-04-12 16:20:11 -05:00
Levi Schoen
580742ad35 fix: always use latest seed script when seeding chains 2023-04-12 14:03:12 -07:00
samcode206
03e9820b84
add wBTC to internal testnet (#1547)
* add wBTC to internal testnet

* Update .github/scripts/seed-internal-testnet.sh

* Update .github/scripts/seed-internal-testnet.sh

---------

Co-authored-by: Adam Robert Turman <67024033+adamrturman@users.noreply.github.com>
2023-04-12 10:44:54 -05:00
drklee3
1ed6b6add3
chore: bump ethermint to v0.21.0-kava-v22-1 (#1546)
addresses btcd vulnerability
2023-04-11 11:04:01 -07:00
drklee3
c12ad1d436
chore: update go.mod replace directives (#1544)
* Update go.mod replace directives

* Update changelog

* Bump github.com/hashicorp/go-getter to v1.7.1
2023-04-11 10:05:35 -07:00