<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/modifying-evm-storage-to-seed-token-balances-in-testing-pdknsa2zv" -->

---
title: Modifying EVM Storage to Seed Token Balances in Testing
description: This post explores the concept of modifying EVM storage directly with a seeding function in order to simplify testing of smart contracts. It explains how EVM...
canonical: https://daily.dev/posts/modifying-evm-storage-to-seed-token-balances-in-testing-pdknsa2zv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Modifying EVM Storage to Seed Token Balances in Testing | daily.dev
og:description: This post explores the concept of modifying EVM storage directly with a seeding function in order to simplify testing of smart contracts. It explains how EVM...
og:url: https://daily.dev/posts/modifying-evm-storage-to-seed-token-balances-in-testing-pdknsa2zv
og:image: https://api.daily.dev/og/posts/PdknSa2Zv.png
og:image:alt: Modifying EVM Storage to Seed Token Balances in Testing
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Modifying EVM Storage to Seed Token Balances in Testing

**[Coins Bench](https://daily.dev/sources/coinsbench)** · 8 min read · 0 upvotes · 0 comments

## Summary

This post explores the concept of modifying EVM storage directly with a seeding function in order to simplify testing of smart contracts. It explains how EVM storage works, provides code examples, and demonstrates how to use Hardhat.js to manipulate the local EVM storage. The article also discusses nested mappings and offers a helper function for directly modifying storage. Overall, it offers insights into improving testing processes for smart contracts.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://coinsbench.com/modifying-evm-storage-to-seed-token-balances-in-testing-a6d58b596ceb>

---

Tags: [#testing](https://daily.dev/tags/testing), [#crypto](https://daily.dev/tags/crypto), [#blockchain](https://daily.dev/tags/blockchain), [#ethereum](https://daily.dev/tags/ethereum), [#smart-contracts](https://daily.dev/tags/smart-contracts), [#solidity](https://daily.dev/tags/solidity), [#hardhat](https://daily.dev/tags/hardhat)

[View this post on daily.dev](https://daily.dev/posts/modifying-evm-storage-to-seed-token-balances-in-testing-pdknsa2zv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Modifying EVM Storage to Seed Token Balances in Testing","url":"https://daily.dev/posts/modifying-evm-storage-to-seed-token-balances-in-testing-pdknsa2zv","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/modifying-evm-storage-to-seed-token-balances-in-testing-pdknsa2zv"},"datePublished":"2024-02-16T15:58:46.907Z","dateModified":"2024-05-09T09:28:18.744Z","description":"This post explores the concept of modifying EVM storage directly with a seeding function in order to simplify testing of smart contracts. It explains how EVM...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9b531ec54b967143009b9be675c3c1a4?_a=AQAEufR","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9b531ec54b967143009b9be675c3c1a4?_a=AQAEufR","isAccessibleForFree":true,"articleSection":"Coins Bench","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Coins Bench","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/ba340d3c8caa4c2586911332928e24d9","url":"https://daily.dev/sources/coinsbench"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/modifying-evm-storage-to-seed-token-balances-in-testing-pdknsa2zv","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"testing,crypto,blockchain,ethereum,smart-contracts,solidity,hardhat","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Coins Bench","item":"https://daily.dev/sources/coinsbench"},{"@type":"ListItem","position":3,"name":"Modifying EVM Storage to Seed Token Balances in Testing"}]}
```

