Skip to content
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

update new names, NativeCoin -> CosmosCoin #1596

Merged
merged 4 commits into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ jobs:
- run: make check-proto-deps
- run: make check-proto-lint
- run: make check-proto-format
- run: make check-proto-breaking-remote
- run: BUF_CHECK_BREAKING_AGAINST_REMOTE="branch=$GITHUB_BASE_REF" make check-proto-breaking-remote
if: github.event_name == 'pull_request'
# TODO: reenable me after merge of Native -> Cosmos name change committed to master.
# - run: make check-proto-breaking-remote
# - run: BUF_CHECK_BREAKING_AGAINST_REMOTE="branch=$GITHUB_BASE_REF" make check-proto-breaking-remote
# if: github.event_name == 'pull_request'
Comment on lines +21 to +24
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am disabling these checks temporarily. i've confirmed all breaking proto changes are only for unreleased types:

Checking for proto backward compatibility
proto/kava/evmutil/v1beta1/conversion_pair.proto:1:1:Previously present message "AllowedNativeCoinERC20Token" was deleted from file.
proto/kava/evmutil/v1beta1/genesis.proto:50:3:Field "1" with name "allowed_cosmos_denoms" on message "Params" changed option "json_name" from "allowedNativeDenoms" to "allowedCosmosDenoms".
proto/kava/evmutil/v1beta1/genesis.proto:50:12:Field "1" on message "Params" changed type from "kava.evmutil.v1beta1.AllowedNativeCoinERC20Token" to "kava.evmutil.v1beta1.AllowedCosmosCoinERC20Token".
proto/kava/evmutil/v1beta1/genesis.proto:50:40:Field "1" on message "Params" changed name from "allowed_native_denoms" to "allowed_cosmos_denoms".
proto/kava/evmutil/v1beta1/tx.proto:1:1:Previously present message "MsgConvertNativeCoinToERC20" was deleted from file.
proto/kava/evmutil/v1beta1/tx.proto:1:1:Previously present message "MsgConvertNativeCoinToERC20Response" was deleted from file.
proto/kava/evmutil/v1beta1/tx.proto:13:1:Previously present RPC "ConvertNativeCoinToERC20" on service "Msg" was deleted.

intend to reenable in next pr.

- run: make check-proto-gen
- run: make check-proto-gen-doc
- run: make check-proto-gen-swagger
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [Unreleased]

## Features
- (evmutil) [#1590] Add allow list param of sdk native denoms that can be transferred to evm
- (evmutil) [#1591] Configure module to support deploying ERC20KavaWrappedNativeCoin contracts
- (evmutil) [#1590] & [#1596] Add allow list param of sdk native denoms that can be transferred to evm
- (evmutil) [#1591] & [#1596] Configure module to support deploying ERC20KavaWrappedCosmosCoin contracts

## [v0.23.0]

Expand Down Expand Up @@ -241,6 +241,7 @@ the [changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.38.4/CHANGELOG.md).
- [#257](https://github.com/Kava-Labs/kava/pulls/257) Include scripts to run
large-scale simulations remotely using aws-batch

[#1596]: https://github.com/Kava-Labs/kava/pull/1596
[#1591]: https://github.com/Kava-Labs/kava/pull/1591
[#1590]: https://github.com/Kava-Labs/kava/pull/1590
[#1568]: https://github.com/Kava-Labs/kava/pull/1568
Expand Down
2 changes: 1 addition & 1 deletion ci/env/kava-protonet/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -2004,7 +2004,7 @@
"evmutil": {
"accounts": [],
"params": {
"allowed_native_denoms": [],
"allowed_cosmos_denoms": [],
"enabled_conversion_pairs": [
{
"kava_erc20_address": "0xBb304f44b7EFD865361F2AD973d8ebA433893ABC",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

/// @title An ERC20 token contract owned and deployed by the evmutil module of Kava.
/// Tokens are backed one-for-one by sdk coins held in the module account.
/// Tokens are backed one-for-one by cosmos-sdk coins held in the module account.
/// @author Kava Labs, LLC
/// @custom:security-contact security@kava.io
contract ERC20KavaWrappedNativeCoin is ERC20, Ownable {
contract ERC20KavaWrappedCosmosCoin is ERC20, Ownable {
/// @notice The decimals places of the token. For display purposes only.
uint8 private immutable _decimals;

Expand Down
2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"clean": "hardhat clean",
"compile": "hardhat compile",
"coverage": "hardhat coverage",
"ethermint-json": "jq '{ abi: .abi | tostring, bin: .bytecode | ltrimstr(\"0x\")}' artifacts/contracts/ERC20KavaWrappedNativeCoin.sol/ERC20KavaWrappedNativeCoin.json > ../x/evmutil/types/ethermint_json/ERC20KavaWrappedNativeCoin.json",
"ethermint-json": "jq '{ abi: .abi | tostring, bin: .bytecode | ltrimstr(\"0x\")}' artifacts/contracts/ERC20KavaWrappedCosmosCoin.sol/ERC20KavaWrappedCosmosCoin.json > ../x/evmutil/types/ethermint_json/ERC20KavaWrappedCosmosCoin.json",
"gen-ts-types": "hardhat typechain",
"lint": "eslint '**/*.{js,ts}'",
"lint-fix": "eslint '**/*.{js,ts}' --fix",
Expand Down
6 changes: 3 additions & 3 deletions contracts/scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ async function main() {
const tokenSymbol = "kATOM";
const tokenDecimals = 6;

const ERC20KavaWrappedNativeCoin = await ethers.getContractFactory(
"ERC20KavaWrappedNativeCoin"
const ERC20KavaWrappedCosmosCoin = await ethers.getContractFactory(
"ERC20KavaWrappedCosmosCoin"
);
const token = await ERC20KavaWrappedNativeCoin.deploy(
const token = await ERC20KavaWrappedCosmosCoin.deploy(
tokenName,
tokenSymbol,
tokenDecimals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ import { expect } from "chai";
import { Signer } from "ethers";
import { ethers } from "hardhat";
import {
ERC20KavaWrappedNativeCoin,
ERC20KavaWrappedNativeCoin__factory as ERC20KavaWrappedNativeCoinFactory,
ERC20KavaWrappedCosmosCoin,
ERC20KavaWrappedCosmosCoin__factory as ERC20KavaWrappedCosmosCoinFactory,
} from "../typechain-types";

const decimals = 6n;

describe("ERC20KavaWrappedNativeCoin", function () {
let erc20: ERC20KavaWrappedNativeCoin;
let erc20Factory: ERC20KavaWrappedNativeCoinFactory;
describe("ERC20KavaWrappedCosmosCoin", function () {
let erc20: ERC20KavaWrappedCosmosCoin;
let erc20Factory: ERC20KavaWrappedCosmosCoinFactory;
let owner: Signer;
let sender: Signer;

beforeEach(async function () {
erc20Factory = await ethers.getContractFactory(
"ERC20KavaWrappedNativeCoin"
"ERC20KavaWrappedCosmosCoin"
);
erc20 = await erc20Factory.deploy("Wrapped ATOM", "ATOM", decimals);
[owner, sender] = await ethers.getSigners();
Expand Down
60 changes: 30 additions & 30 deletions docs/core/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
- [Msg](#kava.earn.v1beta1.Msg)

- [kava/evmutil/v1beta1/conversion_pair.proto](#kava/evmutil/v1beta1/conversion_pair.proto)
- [AllowedNativeCoinERC20Token](#kava.evmutil.v1beta1.AllowedNativeCoinERC20Token)
- [AllowedCosmosCoinERC20Token](#kava.evmutil.v1beta1.AllowedCosmosCoinERC20Token)
- [ConversionPair](#kava.evmutil.v1beta1.ConversionPair)

- [kava/evmutil/v1beta1/genesis.proto](#kava/evmutil/v1beta1/genesis.proto)
Expand All @@ -264,10 +264,10 @@
- [kava/evmutil/v1beta1/tx.proto](#kava/evmutil/v1beta1/tx.proto)
- [MsgConvertCoinToERC20](#kava.evmutil.v1beta1.MsgConvertCoinToERC20)
- [MsgConvertCoinToERC20Response](#kava.evmutil.v1beta1.MsgConvertCoinToERC20Response)
- [MsgConvertCosmosCoinToERC20](#kava.evmutil.v1beta1.MsgConvertCosmosCoinToERC20)
- [MsgConvertCosmosCoinToERC20Response](#kava.evmutil.v1beta1.MsgConvertCosmosCoinToERC20Response)
- [MsgConvertERC20ToCoin](#kava.evmutil.v1beta1.MsgConvertERC20ToCoin)
- [MsgConvertERC20ToCoinResponse](#kava.evmutil.v1beta1.MsgConvertERC20ToCoinResponse)
- [MsgConvertNativeCoinToERC20](#kava.evmutil.v1beta1.MsgConvertNativeCoinToERC20)
- [MsgConvertNativeCoinToERC20Response](#kava.evmutil.v1beta1.MsgConvertNativeCoinToERC20Response)

- [Msg](#kava.evmutil.v1beta1.Msg)

Expand Down Expand Up @@ -3661,18 +3661,18 @@ Msg defines the earn Msg service.



<a name="kava.evmutil.v1beta1.AllowedNativeCoinERC20Token"></a>
<a name="kava.evmutil.v1beta1.AllowedCosmosCoinERC20Token"></a>

### AllowedNativeCoinERC20Token
AllowedNativeCoinERC20Token defines allowed sdk denom & metadata
### AllowedCosmosCoinERC20Token
AllowedCosmosCoinERC20Token defines allowed cosmos-sdk denom & metadata
for evm token representations of sdk assets.
NOTE: once evm token contracts are deployed, changes to metadata for a given
sdk_denom will not change metadata of deployed contract.
cosmos_denom will not change metadata of deployed contract.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sdk_denom` | [string](#string) | | Denom of the sdk.Coin |
| `cosmos_denom` | [string](#string) | | Denom of the sdk.Coin |
| `name` | [string](#string) | | Name of ERC20 contract |
| `symbol` | [string](#string) | | Symbol of ERC20 contract |
| `decimals` | [uint32](#uint32) | | Number of decimals ERC20 contract is deployed with. |
Expand Down Expand Up @@ -3756,7 +3756,7 @@ Params defines the evmutil module params
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `enabled_conversion_pairs` | [ConversionPair](#kava.evmutil.v1beta1.ConversionPair) | repeated | enabled_conversion_pairs defines the list of conversion pairs allowed to be converted between Kava ERC20 and sdk.Coin |
| `allowed_native_denoms` | [AllowedNativeCoinERC20Token](#kava.evmutil.v1beta1.AllowedNativeCoinERC20Token) | repeated | allowed_native_denoms is a list of denom & erc20 token metadata pairs. if a denom is in the list, it is allowed to be converted to an erc20 in the evm. |
| `allowed_cosmos_denoms` | [AllowedCosmosCoinERC20Token](#kava.evmutil.v1beta1.AllowedCosmosCoinERC20Token) | repeated | allowed_cosmos_denoms is a list of denom & erc20 token metadata pairs. if a denom is in the list, it is allowed to be converted to an erc20 in the evm. |



Expand Down Expand Up @@ -3857,56 +3857,56 @@ MsgConvertCoinToERC20Response defines the response value from Msg/ConvertCoinToE



<a name="kava.evmutil.v1beta1.MsgConvertERC20ToCoin"></a>
<a name="kava.evmutil.v1beta1.MsgConvertCosmosCoinToERC20"></a>

### MsgConvertERC20ToCoin
MsgConvertERC20ToCoin defines a conversion from Kava ERC20 to sdk.Coin.
### MsgConvertCosmosCoinToERC20
ConvertCosmosCoinToERC20 defines a conversion from cosmos sdk.Coin to ERC20.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `initiator` | [string](#string) | | EVM 0x hex address initiating the conversion. |
| `receiver` | [string](#string) | | Kava bech32 address that will receive the converted sdk.Coin. |
| `kava_erc20_address` | [string](#string) | | EVM 0x hex address of the ERC20 contract. |
| `amount` | [string](#string) | | ERC20 token amount to convert. |
| `initiator` | [string](#string) | | Kava bech32 address initiating the conversion. |
| `receiver` | [string](#string) | | EVM hex address that will receive the ERC20 tokens. |
| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | Amount is the sdk.Coin amount to convert. |






<a name="kava.evmutil.v1beta1.MsgConvertERC20ToCoinResponse"></a>
<a name="kava.evmutil.v1beta1.MsgConvertCosmosCoinToERC20Response"></a>

### MsgConvertERC20ToCoinResponse
MsgConvertERC20ToCoinResponse defines the response value from
Msg/MsgConvertERC20ToCoin.
### MsgConvertCosmosCoinToERC20Response
MsgConvertCosmosCoinToERC20Response defines the response value from Msg/MsgConvertCosmosCoinToERC20.






<a name="kava.evmutil.v1beta1.MsgConvertNativeCoinToERC20"></a>
<a name="kava.evmutil.v1beta1.MsgConvertERC20ToCoin"></a>

### MsgConvertNativeCoinToERC20
ConvertNativeCoinToERC20 defines a conversion from native sdk.Coin to ERC20.
### MsgConvertERC20ToCoin
MsgConvertERC20ToCoin defines a conversion from Kava ERC20 to sdk.Coin.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `initiator` | [string](#string) | | Kava bech32 address initiating the conversion. |
| `receiver` | [string](#string) | | EVM hex address that will receive the ERC20 tokens. |
| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | Amount is the sdk.Coin amount to convert. |
| `initiator` | [string](#string) | | EVM 0x hex address initiating the conversion. |
| `receiver` | [string](#string) | | Kava bech32 address that will receive the converted sdk.Coin. |
| `kava_erc20_address` | [string](#string) | | EVM 0x hex address of the ERC20 contract. |
| `amount` | [string](#string) | | ERC20 token amount to convert. |






<a name="kava.evmutil.v1beta1.MsgConvertNativeCoinToERC20Response"></a>
<a name="kava.evmutil.v1beta1.MsgConvertERC20ToCoinResponse"></a>

### MsgConvertNativeCoinToERC20Response
MsgConvertNativeCoinToERC20Response defines the response value from Msg/MsgConvertNativeCoinToERC20.
### MsgConvertERC20ToCoinResponse
MsgConvertERC20ToCoinResponse defines the response value from
Msg/MsgConvertERC20ToCoin.



Expand All @@ -3928,7 +3928,7 @@ Msg defines the evmutil Msg service.
| ----------- | ------------ | ------------- | ------------| ------- | -------- |
| `ConvertCoinToERC20` | [MsgConvertCoinToERC20](#kava.evmutil.v1beta1.MsgConvertCoinToERC20) | [MsgConvertCoinToERC20Response](#kava.evmutil.v1beta1.MsgConvertCoinToERC20Response) | ConvertCoinToERC20 defines a method for converting sdk.Coin to Kava ERC20. | |
| `ConvertERC20ToCoin` | [MsgConvertERC20ToCoin](#kava.evmutil.v1beta1.MsgConvertERC20ToCoin) | [MsgConvertERC20ToCoinResponse](#kava.evmutil.v1beta1.MsgConvertERC20ToCoinResponse) | ConvertERC20ToCoin defines a method for converting Kava ERC20 to sdk.Coin. | |
| `ConvertNativeCoinToERC20` | [MsgConvertNativeCoinToERC20](#kava.evmutil.v1beta1.MsgConvertNativeCoinToERC20) | [MsgConvertNativeCoinToERC20Response](#kava.evmutil.v1beta1.MsgConvertNativeCoinToERC20Response) | ConvertNativeCoinToERC20 defines a method for converting a native sdk.Coin to an ERC20. | |
| `ConvertCosmosCoinToERC20` | [MsgConvertCosmosCoinToERC20](#kava.evmutil.v1beta1.MsgConvertCosmosCoinToERC20) | [MsgConvertCosmosCoinToERC20Response](#kava.evmutil.v1beta1.MsgConvertCosmosCoinToERC20Response) | ConvertCosmosCoinToERC20 defines a method for converting a cosmos sdk.Coin to an ERC20. | |

<!-- end services -->

Expand Down
8 changes: 4 additions & 4 deletions proto/kava/evmutil/v1beta1/conversion_pair.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ message ConversionPair {
string denom = 2;
}

// AllowedNativeCoinERC20Token defines allowed sdk denom & metadata
// AllowedCosmosCoinERC20Token defines allowed cosmos-sdk denom & metadata
// for evm token representations of sdk assets.
// NOTE: once evm token contracts are deployed, changes to metadata for a given
// sdk_denom will not change metadata of deployed contract.
message AllowedNativeCoinERC20Token {
// cosmos_denom will not change metadata of deployed contract.
message AllowedCosmosCoinERC20Token {
option (gogoproto.goproto_getters) = false;

// Denom of the sdk.Coin
string sdk_denom = 1;
string cosmos_denom = 1;
// Name of ERC20 contract
string name = 2;
// Symbol of ERC20 contract
Expand Down
6 changes: 3 additions & 3 deletions proto/kava/evmutil/v1beta1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ message Params {
(gogoproto.castrepeated) = "ConversionPairs"
];

// allowed_native_denoms is a list of denom & erc20 token metadata pairs.
// allowed_cosmos_denoms is a list of denom & erc20 token metadata pairs.
// if a denom is in the list, it is allowed to be converted to an erc20 in the evm.
repeated AllowedNativeCoinERC20Token allowed_native_denoms = 1 [
repeated AllowedCosmosCoinERC20Token allowed_cosmos_denoms = 1 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "AllowedNativeCoinERC20Tokens"
(gogoproto.castrepeated) = "AllowedCosmosCoinERC20Tokens"
];
}
12 changes: 6 additions & 6 deletions proto/kava/evmutil/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ service Msg {
// ConvertERC20ToCoin defines a method for converting Kava ERC20 to sdk.Coin.
rpc ConvertERC20ToCoin(MsgConvertERC20ToCoin) returns (MsgConvertERC20ToCoinResponse);

// ConvertNativeCoinToERC20 defines a method for converting a native sdk.Coin to an ERC20.
rpc ConvertNativeCoinToERC20(MsgConvertNativeCoinToERC20) returns (MsgConvertNativeCoinToERC20Response);
// ConvertCosmosCoinToERC20 defines a method for converting a cosmos sdk.Coin to an ERC20.
rpc ConvertCosmosCoinToERC20(MsgConvertCosmosCoinToERC20) returns (MsgConvertCosmosCoinToERC20Response);
}

// MsgConvertCoinToERC20 defines a conversion from sdk.Coin to Kava ERC20.
Expand Down Expand Up @@ -54,8 +54,8 @@ message MsgConvertERC20ToCoin {
// Msg/MsgConvertERC20ToCoin.
message MsgConvertERC20ToCoinResponse {}

// ConvertNativeCoinToERC20 defines a conversion from native sdk.Coin to ERC20.
message MsgConvertNativeCoinToERC20 {
// ConvertCosmosCoinToERC20 defines a conversion from cosmos sdk.Coin to ERC20.
message MsgConvertCosmosCoinToERC20 {
// Kava bech32 address initiating the conversion.
string initiator = 1;
// EVM hex address that will receive the ERC20 tokens.
Expand All @@ -64,5 +64,5 @@ message MsgConvertNativeCoinToERC20 {
cosmos.base.v1beta1.Coin amount = 3;
}

// MsgConvertNativeCoinToERC20Response defines the response value from Msg/MsgConvertNativeCoinToERC20.
message MsgConvertNativeCoinToERC20Response {}
// MsgConvertCosmosCoinToERC20Response defines the response value from Msg/MsgConvertCosmosCoinToERC20.
message MsgConvertCosmosCoinToERC20Response {}
10 changes: 5 additions & 5 deletions x/evmutil/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ func (s *genesisTestSuite) TestExportGenesis() {
KavaERC20Address: testutil.MustNewInternalEVMAddressFromString("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2").Bytes(),
Denom: "weth"},
}
params.AllowedNativeDenoms = []types.AllowedNativeCoinERC20Token{
params.AllowedCosmosDenoms = []types.AllowedCosmosCoinERC20Token{
{
SdkDenom: "hard",
Name: "Kava EVM HARD",
Symbol: "HARD",
Decimals: 6,
CosmosDenom: "hard",
Name: "Kava EVM HARD",
Symbol: "HARD",
Decimals: 6,
},
}
s.Keeper.SetParams(s.Ctx, params)
Expand Down
18 changes: 9 additions & 9 deletions x/evmutil/keeper/erc20.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@ func (k Keeper) DeployTestMintableERC20Contract(
return types.NewInternalEVMAddress(contractAddr), nil
}

// DeployKavaWrappedNativeCoinERC20Contract validates token details and then deploys an ERC20
// DeployKavaWrappedCosmosCoinERC20Contract validates token details and then deploys an ERC20
// contract with the token metadata.
// This method does NOT check if a token for the provided SdkDenom has already been deployed.
func (k Keeper) DeployKavaWrappedNativeCoinERC20Contract(
func (k Keeper) DeployKavaWrappedCosmosCoinERC20Contract(
ctx sdk.Context,
token types.AllowedNativeCoinERC20Token,
token types.AllowedCosmosCoinERC20Token,
) (types.InternalEVMAddress, error) {
if err := token.Validate(); err != nil {
return types.InternalEVMAddress{}, errorsmod.Wrapf(err, "failed to deploy erc20 for sdk denom %s", token.SdkDenom)
return types.InternalEVMAddress{}, errorsmod.Wrapf(err, "failed to deploy erc20 for sdk denom %s", token.CosmosDenom)
}

packedAbi, err := types.ERC20KavaWrappedNativeCoinContract.ABI.Pack(
packedAbi, err := types.ERC20KavaWrappedCosmosCoinContract.ABI.Pack(
"", // Empty string for contract constructor
token.Name,
token.Symbol,
Expand All @@ -86,13 +86,13 @@ func (k Keeper) DeployKavaWrappedNativeCoinERC20Contract(
return types.InternalEVMAddress{}, errorsmod.Wrapf(err, "failed to pack token with details %+v", token)
}

data := make([]byte, len(types.ERC20KavaWrappedNativeCoinContract.Bin)+len(packedAbi))
data := make([]byte, len(types.ERC20KavaWrappedCosmosCoinContract.Bin)+len(packedAbi))
copy(
data[:len(types.ERC20KavaWrappedNativeCoinContract.Bin)],
types.ERC20KavaWrappedNativeCoinContract.Bin,
data[:len(types.ERC20KavaWrappedCosmosCoinContract.Bin)],
types.ERC20KavaWrappedCosmosCoinContract.Bin,
)
copy(
data[len(types.ERC20KavaWrappedNativeCoinContract.Bin):],
data[len(types.ERC20KavaWrappedCosmosCoinContract.Bin):],
packedAbi,
)

Expand Down
Loading