github futureversecom/trn-seed v4.44.0

latest releases: v11.81.0, v11.80.0, v11.79.0...
22 months ago

Release

Release Name: 4.44.0
Spec Version: 44
Client Version: 4.0.0

Key Changes:

  • Fixed an issue in gas calculation of the ERC-20 precompile, it's now charged the correct amount
    • transfer should cost ~ 317,060 drops
    • transferFrom should cost ~ 358,396 drops
  • Added an admin extrinsic set_length_multiplier that allows us to control the gas scaling by the length of the transaction
  • Added public mint functionalities for NFT and SFT pallets. This allows any account to mint tokens from the enabled collections
    • Disabled by default, needs to be enabled with toggle_public_mint extrinsic
    • Mint fee can be set with set_mint_fee extrinsic
  • Added Vortex token distribution pallet. This allows for the distribution of Vortex tokens at the end of a 90 day cycle.
    • Asset prices are calculated off chain and provided with the use of an admin function set_asset_prices
    • Token distribution amounts can be specified per account with the admin function register_rewards
    • Vortex distribution calculated and tokens minted through the admin function trigger_vtx_distribution
    • Vortex payout enabled through the use of an admin function start_vtx_dist
    • Users can claim their tokens manually through the extrinsic redeem_tokens_from_vault
  • Enabled bridging of ROOT token through existing ERC20-Peg. This differs from standard ERC20 bridging as it will transfer tokens to and from the erc20-peg pallet address rather then burning / minting on demand
  • Disabled submit_challenge extrinsic on ETH bridge

Testing Recommendations:

ERC-20 Precompile

  • transfer and transferFrom should charged the right amount

NFT and SFT

  • Regression testing for standard minting should be unchanged for existing collections (Without public mint enabled)
  • Public mint functionality with specified mint fee should work for existing and new collections if enabled (Both NFT and SFT)

Ethereum / XRPL Bridge

  • Regression testing for standard ERC20 tokens bridging (Deposit and Withdraw)
  • Regression testing for XRPL bridging (Deposit and Withdraw)
  • Bridging ROOT token to new ROOTPeg contract (Deposit and Withdraw)
  • submit_challenge extrinsic for ethBridge should fail

Vortex Distribution

  • Vortex token distribution should work with specified asset prices and registered rewards
    • Should payout correctly over more than 100 accounts

Client Changes:

  • Yes
  • No

RPC Changes:

Added:

Changed:

Removed:


Runtime Changes:

  • Yes
  • No

New Pallets:

  • pallet-vortex introduced to manage vortex token distribution: #726

EVM Precompile Changes:

Added:

  • pallet-evm-precompiles-erc721
    • function togglePublicMint(bool enabled)
      • emits PublicMintToggled(bool indexed enabled)
    • function setMintFee(address paymentAsset, uint256 mintFee)
      • emits event MintFeeUpdated(address indexed paymentAsset, uint256 indexed mintFee)
  • pallet-evm-precompiles-erc1155
    • function togglePublicMint(uint256 id, bool enabled)
      • emits PublicMintToggled(uint32 indexed id, bool enabled)
    • function setMintFee(uint256 id, address paymentAsset, uint128 mintFee)
      • emits MintFeeUpdated(uint32 indexed id, address indexed paymentAsset, uint128 indexed mintFee)

Changed:

Removed:

Extrinsic Changes:

Added:

  • pallet-nft
    • toggle_public_mint(origin: OriginFor<T>, collection_id: CollectionUuid, enabled: bool)
    • set_mint_fee(origin: OriginFor<T>, collection_id: CollectionUuid, pricing_details: Option<(AssetId, Balance)>)
  • pallet-sft
    • toggle_public_mint(origin: OriginFor<T>, token_id: TokenId, enabled: bool)
    • set_mint_fee(origin: OriginFor<T>, token_id: TokenId, pricing_details: Option<(AssetId, Balance)>)
  • pallet-fee-control
    • set_length_multiplier(origin: OriginFor<T>, value: Balance)
  • pallet-erc20-peg
    • set_root_peg_address(origin, eth_address: EthAddress)
    • set_erc20_asset_map(origin, asset_id: AssetId, eth_address: EthAddress)
  • pallet-vortex-distribution
    • create_vtx_dist(origin, vortex_token_amount)
    • disable_vtx_dist(origin, id)
    • start_vtx_dist(origin, id)
    • set_vtx_dist_eras(origin, id, start_era, end_era)
    • set_asset_prices(origin, asset_prices, id)
    • register_rewards(origin, id, rewards)
    • trigger_vtx_distribution(origin, root_price, vortex_price, root_vault, fee_vault, id)
    • redeem_tokens_from_vault(id, vortex_token_amount)

Changed:

  • pallet-erc20-peg
    • set_contract_address - set_erc20_peg_address

Removed:

Event Changes:

Added:

  • pallet-nft
    • PublicMintToggle
    • MintFeePaid
    • MintPriceSet
  • pallet-sft
    • PublicMintToggle
    • MintFeePaid
    • MintPriceSet
  • pallet-fee-control
    • EvmBaseFeeSet
      • WeightMultiplierSet
      • LengthMultiplierSet
  • pallet-erc20-peg
    • SetRootPegContract(EthAddress)
  • pallet-vortex-distribution
  • RewardRegistered
  • VtxDistEnabled
  • VtxDistDisabled
  • VtxDistDone
  • VtxDistPaidOut
  • VtxDistStarted
  • SetVtxDistEras
  • SetAssetPrices
  • TriggerVtxDistribution

Changed:

Removed:

  • pallet-nft
    • NotForFixedPriceSale
    • NotForAuction
    • TokenNotListed
    • MaxOffersReached
    • BidTooLow
    • MixedBundleSale
    • MarketplaceNotRegistered
      • InvalidOffer
      • NotBuyer
      • NotSeller
      • IsTokenOwner
    • ZeroOffer
    • TokenOnAuction
    • FailedMintOnBridgedToken

Error Messages:

Added:

  • pallet-sft
    • PublicMintDisabled
  • pallet-erc20-peg
    • InvalidSourceAddress
  • pallet-vortex-distribution
    • VtxDistIdNotAvailable
    • VtxDistAlreadyEnabled
    • VtxDistNotEnabled
    • InvalidEndBlock
    • NoVtxAssetMinted
    • InvalidAmount
    • VtxDistIdInUse
    • NotAValidator
    • VortexPeriodNotSet
    • VaultAccountNotFound
    • PivotStringTooLong
    • AssetsShouldNotIncludeVtxAsset
    • AlreadyTriggered
    • NotTriggered

Changed:

Removed:

Storage Changes:

Added:

  • pallet-nft
    • PublicMintInfo
  • pallet-sft
    • PublicMintInfo
  • pallet-erc20-peg
    • RootPegContractAddress
  • pallet-vortex-distribution
    • NextVortexId
    • VtxDistStatuses
    • VtxDistEras
    • VtxDistOrderbook
    • StakeRewardsPoints
    • AssetPrices
    • TotalVortex
    • NextUnsignedAt
    • VtxDistPayoutPivot

Changed:

Removed:

Storage Migrations:

Added:

Removed:

Don't miss a new trn-seed release

NewReleases is sending notifications on new releases.