# Following Create an ERC20 using Truffle tutorial but nothing works after copying artifacts

**URL:** <https://forum.openzeppelin.com/t/following-create-an-erc20-using-truffle-tutorial-but-nothing-works-after-copying-artifacts/4070>\
**Category:** Contracts\
**Created:** [October 7, 2020, 6:44pm UTC](https://forum.openzeppelin.com/t/following-create-an-erc20-using-truffle-tutorial-but-nothing-works-after-copying-artifacts/4070 "2020-10-07T18:44:48Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Triston\_Edwards](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/triston_edwards/32/3179_2.png) [@Triston\_Edwards](https://forum.openzeppelin.com/u/Triston_Edwards)\
**Post date:** [October 7, 2020, 6:44pm UTC](https://forum.openzeppelin.com/t/following-create-an-erc20-using-truffle-tutorial-but-nothing-works-after-copying-artifacts/4070/1 "2020-10-07T18:44:48Z")

</div>

Hello All.  
from Australia. i am a bit stuck on the below. [Create an ERC20 using Truffle, without writing Solidity](https://forum.openzeppelin.com/t/create-an-erc20-using-truffle-without-writing-solidity/2713)

The Preset contracts have already been compiled, so we only need to copy the artifacts to the `build/contracts` directory.

```auto
$ mkdir -p build/contracts/
$ cp node_modules/@openzeppelin/contracts/build/contracts/* build/contracts/

i have the folder their and yet i when i paste the second line of text in to my terminal nothing works.

`
```

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [October 8, 2020, 3:40am UTC](https://forum.openzeppelin.com/t/following-create-an-erc20-using-truffle-tutorial-but-nothing-works-after-copying-artifacts/4070/2 "2020-10-08T03:40:42Z")

</div>

Hi @Triston_Edwards,

Welcome to the community 👋

I am in Melbourne Australia 🇦🇺 (where we are in lockdown and it is raining 😄).

When you say nothing works, what actually happens?

What operating system and version of node, npm are you using?

I am using WSL2 on Windows 10 (Ubuntu 18.04) using node 10.

```auto
$ npx truffle version
Truffle v5.1.47 (core: 5.1.47)
Solidity v0.5.16 (solc-js)
Node v10.22.1
Web3.js v1.2.1

```

I did the following using the steps from the tutorial (apart from the directory name) and was able to interact with the token.

```auto
abcoathup@OpenZeppelin:~/projects/forum$ mkdir triston
abcoathup@OpenZeppelin:~/projects/forum$ cd triston
abcoathup@OpenZeppelin:~/projects/forum/triston$ npm init -y
Wrote to /home/abcoathup/projects/forum/triston/package.json:

{
  "name": "triston",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}

abcoathup@OpenZeppelin:~/projects/forum/triston$ npm i --save-dev @openzeppelin/contracts
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN triston@1.0.0 No description
npm WARN triston@1.0.0 No repository field.

+ @openzeppelin/contracts@3.2.0
added 1 package from 1 contributor and audited 1 package in 3.587s
found 0 vulnerabilities

abcoathup@OpenZeppelin:~/projects/forum/triston$ npm i truffle
npm WARN deprecated flat@4.1.0: Fixed a prototype pollution security issue in 4.1.0, please upgrade to ^4.1.1 or ^5.0.1.

> truffle@5.1.47 postinstall /home/abcoathup/projects/forum/triston/node_modules/truffle
> node ./scripts/postinstall.js

- Fetching solc version list from solc-bin. Attempt #1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN triston@1.0.0 No description
npm WARN triston@1.0.0 No repository field.

+ truffle@5.1.47
added 138 packages from 62 contributors and audited 139 packages in 22.406s

31 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

abcoathup@OpenZeppelin:~/projects/forum/triston$ npx truffle init

Starting init...
================

> Copying project files to /home/abcoathup/projects/forum/triston

Init successful, sweet!

abcoathup@OpenZeppelin:~/projects/forum/triston$ mkdir -p build/contracts/
abcoathup@OpenZeppelin:~/projects/forum/triston$ cp node_modules/@openzeppelin/contracts/build/contracts/* build/contracts/
abcoathup@OpenZeppelin:~/projects/forum/triston$ npx truffle develop
Truffle Develop started at http://127.0.0.1:9545/

Accounts:
(0) 0x0445c33bdce670d57189158b88c0034b579f37ce
(1) 0x46b68a577f95d02d2732cbe93c1809e9ca25b443
(2) 0xff8ddfd4ae8ed56c4b94738fef931b732f3aaeb5
(3) 0xc28aaeb2c63c3617e6733d786a6d7273871b805f
(4) 0xab36c13ac120075f84f0cffc17f30ec22c6abf39
(5) 0x95d6b12b0681c43c269738f6dfc854b2f0e5b413
(6) 0x5f6522939e0e5ffeae31015d547e7e06f70be492
(7) 0xcf501b78c509f5b5726de358955c3b42507feebb
(8) 0x236ae33001d49014212d14260715f4a4fe41402f
(9) 0x294021281f336480fca886e238cb96449a211b6a

Private Keys:
(0) 11e8321617611610d7561dfdf1fdbf87cee4cc99b97cc73c68f0eb5715fff7cc
(1) b28ee7deb262fbb6cccabb43179406e97bf7ff4c20b66feac3321019373531bd
(2) 44e5ce1f204a63e50faf2f202af1d5653aace83805dd9bc7062033f0625aaaa7
(3) 168e28ad21ede684f8fd3ddc8b88e9474c740884f43bda1d567e968544b53a6e
(4) 1a19f312af61a4f982c5f10e9321d2ca38827dc6a1685c13138579bfe221d8f2
(5) c6345c61bf7460b52816100238f87f28e2864503f49cad57aecd5e189426d6b1
(6) 4412060a796a8f1b3c722d68771c01159283961e055879f93ef01024bdd8fdc0
(7) da6e2922a627bb7313156121e3b090609298eb9d76754d3e233912de5a735b04
(8) 8a1694b08e7631d94c906d93e8d00df37a4cc42ec16388b29aaaee6cd645f754
(9) 6d138e6e5b3b78b6ad6bc619fa8d417cfc0233d5d1e1a250688d1c38289a13cf

Mnemonic: ridge drop soon clutch empty north car drum maximum obey clinic coin

⚠️ Important ⚠️ : This mnemonic was created for you by Truffle. It is not secure.
Ensure you do not use it on production blockchains, or else you risk losing funds.

truffle(develop)> token = await ERC20PresetMinterPauser.new("My Token", "TKN")
undefined
truffle(develop)> await token.name()
'My Token'

```

---

<div class="post-metadata">

**Author:** ![Triston\_Edwards](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/triston_edwards/32/3179_2.png) [@Triston\_Edwards](https://forum.openzeppelin.com/u/Triston_Edwards)\
**Post date:** [October 8, 2020, 10:13pm UTC](https://forum.openzeppelin.com/t/following-create-an-erc20-using-truffle-tutorial-but-nothing-works-after-copying-artifacts/4070/3 "2020-10-08T22:13:11Z")

</div>

hi @abcoathup

I am based on the sunshine coast. sorry to say but its a real nice day today.  
thank you for taking the time to help me. i am really not getting this. would there be anyway i could do a screen share or a phone call?.

I am on windows 10 with the latest node install. I have ganache connected. i just dont get how to move on from this point and i feel like i am close.

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [October 8, 2020, 11:41pm UTC](https://forum.openzeppelin.com/t/following-create-an-erc20-using-truffle-tutorial-but-nothing-works-after-copying-artifacts/4070/4 "2020-10-08T23:41:27Z")

</div>

Hi @Triston_Edwards,

Enjoy the sunshine and the freedom. It is still raining outside here. 🌧

What version of node are you using? I recommend using node 10 or node 12.  
To benefit the entire community support is done via the forum. We don’t currently do community calls (yet).

Can you share the output of `npx truffle version`?

When you said nothing works, what happens? Can you share the output or a screenshot.

If you get stuck, you can try using Remix (web based) just so that you can start playing around with a token: [Create an ERC20 using Remix, without writing Solidity](https://forum.openzeppelin.com/t/create-an-erc20-using-remix-without-writing-solidity/2908)

---

<div class="post-metadata">

**Author:** ![Triston\_Edwards](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/triston_edwards/32/3179_2.png) [@Triston\_Edwards](https://forum.openzeppelin.com/u/Triston_Edwards)\
**Post date:** [October 9, 2020, 12:51am UTC](https://forum.openzeppelin.com/t/following-create-an-erc20-using-truffle-tutorial-but-nothing-works-after-copying-artifacts/4070/5 "2020-10-09T00:51:29Z")

</div>

> [@abcoathup](#):
>
> what happens? Can you share the output or a screenshot.

i have made a video of where i get stuck. taking in mind that i am wanting to use my ganache account.  
as you see i get stuck on the next parts.

[![](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/5/587de48d34c59d77c7d6946a5fe7a388a8bd696f.jpeg "openzep help") ](https://www.youtube.com/watch?v=USCw_lnBugI)

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [October 9, 2020, 1:05am UTC](https://forum.openzeppelin.com/t/following-create-an-erc20-using-truffle-tutorial-but-nothing-works-after-copying-artifacts/4070/6 "2020-10-09T01:05:54Z")

</div>

Hi @Triston_Edwards,

Awesome. Thanks for the video. That was really helpful to see where I can improve the tutorial.

The tutorial uses a precompiled contract (so we don’t have to write any Solidity to get started), so we are just copying the artifacts to our projects build directory and can then deploy.

The first step creates the build directory. The second step copies the artifacts.

```auto
$ mkdir -p build/contracts/
$ cp node_modules/@openzeppelin/contracts/build/contracts/* build/contracts/

```

* * *

The following used to be the output of `npx truffle init`. I can see from your video how this could be confusing.

```auto
$ npx truffle init
This directory is non-empty...
? Proceed anyway? (Y/n)
Starting unbox...
=================

? Proceed anyway? Yes
✔ Preparing to download box
✔ Downloading
✔ cleaning up temporary files
✔ Setting up box

Unbox successful, sweet!

Commands:

  Compile: truffle compile
  Migrate: truffle migrate
  Test contracts: truffle test

```

---

<div class="post-metadata">

**Author:** ![Triston\_Edwards](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/triston_edwards/32/3179_2.png) [@Triston\_Edwards](https://forum.openzeppelin.com/u/Triston_Edwards)\
**Post date:** [October 9, 2020, 2:01am UTC](https://forum.openzeppelin.com/t/following-create-an-erc20-using-truffle-tutorial-but-nothing-works-after-copying-artifacts/4070/7 "2020-10-09T02:01:23Z")

</div>

[![](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/c/c2b4005a230ce2379c30c345eefb23c345e983f8.jpeg "2020 10 09 11 49 28") ](https://www.youtube.com/watch?v=FICuaKc_sTk)

ok as you can see i cut and pasted  
$ mkdir -p build/contracts/  
$ cp node\_modules/@openzeppelin/contracts/build/contracts/\* build/contracts/

Now i have some files in that folder but my token Has no name or info how do i do this as right now it saying 0 passing (0ms).

# Compiling your contracts...

> Everything is up to date, there is nothing to compile.

0 passing (0ms)

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [October 9, 2020, 3:19am UTC](https://forum.openzeppelin.com/t/following-create-an-erc20-using-truffle-tutorial-but-nothing-works-after-copying-artifacts/4070/8 "2020-10-09T03:19:03Z")

</div>

Hi @Triston_Edwards,

You don’t have any tests (we don’t cover that in the tutorial), so `npx truffle test` doesn’t test anything.  
You don’t have any migration scripts (apart from the default), so `npx truffle migrate` only deploys Truffle’s `Migration.sol`. You can add a migration script to deploy the token (at the end of the tutorial).

Once you have copied the artifacts you can then deploy the token.

If you go back to the tutorial you can run:

```auto
npx truffle develop

```

Then you can create a new token specifying the name and symbol

```auto
truffle(develop)> token = await ERC20PresetMinterPauser.new("My Token", "TKN")
undefined

```

We can call the contract to read token metadata such as `name` , `symbol` and `decimals`

```auto
truffle(develop)> await token.name()
'My Token'
truffle(develop)> await token.symbol()
'TKN'
truffle(develop)> (await token.decimals()).toString()
'18'

```

You can follow the tutorial for minting and burning.

* * *

Once you have done the above, you can deploy to a local network (such as Ganache GUI).

You would need to create a migration script that will be run when you use `npx truffle migrate`

---

<div class="post-metadata">

**Author:** ![Triston\_Edwards](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/triston_edwards/32/3179_2.png) [@Triston\_Edwards](https://forum.openzeppelin.com/u/Triston_Edwards)\
**Post date:** [October 9, 2020, 3:51am UTC](https://forum.openzeppelin.com/t/following-create-an-erc20-using-truffle-tutorial-but-nothing-works-after-copying-artifacts/4070/10 "2020-10-09T03:51:05Z")

</div>

sorry i dont know what what or how you mean by:  
Once you have copied the artifacts you can then deploy the token.

I tried pasting this in terminal  
truffle(develop)\> token = await ERC20PresetMinterPauser.new(“My Token”, “TKN”)  
undefined… and it didnt work.

also if i use npx truffle develop its not in my Ganache as it is now giving new Truffle Develop started at [http://127.0.0.1:9545/](http://127.0.0.1:9545/) and thats not my ganache ?

---

<div class="post-metadata">

**Author:** ![Triston\_Edwards](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/triston_edwards/32/3179_2.png) [@Triston\_Edwards](https://forum.openzeppelin.com/u/Triston_Edwards)\
**Post date:** [October 9, 2020, 3:55am UTC](https://forum.openzeppelin.com/t/following-create-an-erc20-using-truffle-tutorial-but-nothing-works-after-copying-artifacts/4070/11 "2020-10-09T03:55:25Z")

</div>

what artifacts ? i cant see what you mean can you do a Video ? as to me (noobish) i cant understand this part.

i jumped to these commands  
await token.name  
await token.symbol  
and it tells me My Token", “TKN” i am super confused over this and i know i shouldn’t be.

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [October 9, 2020, 4:12am UTC](https://forum.openzeppelin.com/t/following-create-an-erc20-using-truffle-tutorial-but-nothing-works-after-copying-artifacts/4070/12 "2020-10-09T04:12:48Z")

</div>

Hi @Triston_Edwards,

I made an asciinema of me going through all the steps in the tutorial:  
[https://asciinema.org/a/364291](https://asciinema.org/a/364291)

Once you have that working you can then update your `truffle-config.js` to create a network configuration to use `Ganache GUI` and a migration script to deploy the token.

---

<div class="post-metadata">

**Author:** ![Triston\_Edwards](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/triston_edwards/32/3179_2.png) [@Triston\_Edwards](https://forum.openzeppelin.com/u/Triston_Edwards)\
**Post date:** [October 10, 2020, 3:13am UTC](https://forum.openzeppelin.com/t/following-create-an-erc20-using-truffle-tutorial-but-nothing-works-after-copying-artifacts/4070/14 "2020-10-10T03:13:26Z")

</div>

yikes whats all this about. IF THE TOKEN IS IN A PAUSED STATE. how do you call the Unpaused transaction ?  
}

```auto
truffle(develop)> await token.pause()
Uncaught:
Error: Returned error: VM Exception while processing transaction: revert Pausable: paused -- Reason given: Pausable: paused.
    at evalmachine.<anonymous>:1:15
    at evalmachine.<anonymous>:2:49
    at sigintHandlersWrap (vm.js:272:15)
    at Script.runInContext (vm.js:127:14)
    at runScript (C:\Users\jake\Documents\My Apps in NODE\Basic Site\Create an ERC20 using Truffle, without writing Solidity\mytoken\node_modules\truffle\build\webpack:\packages\core\lib\console.js:251:1)
    at Console.interpret (C:\Users\jake\Documents\My Apps in NODE\Basic Site\Create an ERC20 using Truffle, without writing Solidity\mytoken\node_modules\truffle\build\webpack:\packages\core\lib\console.js:266:1)
    at bound (domain.js:427:14)
    at REPLServer.runBound [as eval] (domain.js:440:12)
    at REPLServer.onLine (repl.js:760:10)
    at REPLServer.emit (events.js:315:20)
    at REPLServer.EventEmitter.emit (domain.js:483:12)
    at REPLServer.Interface._onLine (readline.js:329:10)
    at REPLServer.Interface._line (readline.js:658:8)
    at REPLServer.Interface._ttyWrite (readline.js:1003:14)
    at REPLServer.self._ttyWrite (repl.js:850:9)
    at ReadStream.onkeypress (readline.js:205:10)
    at ReadStream.emit (events.js:315:20)
    at ReadStream.EventEmitter.emit (domain.js:483:12)
    at emitKeys (internal/readline/utils.js:335:14)
    at emitKeys.next (<anonymous>)
    at ReadStream.onData (readline.js:1137:36)
    at ReadStream.emit (events.js:315:20)
    at ReadStream.EventEmitter.emit (domain.js:483:12)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:271:9)
    at ReadStream.Readable.push (_stream_readable.js:212:10)
    at TTY.onStreamRead (internal/stream_base_commons.js:186:23)
    at TTY.callbackTrampoline (internal/async_hooks.js:120:14) {
  reason: 'Pausable: paused',
  hijackedStack: 'Error: Returned error: VM Exception while processing transaction: revert Pausable: paused -- Reason given: Pausable: paused.\n' +

```

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [October 12, 2020, 12:13am UTC](https://forum.openzeppelin.com/t/following-create-an-erc20-using-truffle-tutorial-but-nothing-works-after-copying-artifacts/4070/15 "2020-10-12T00:13:26Z")

</div>

Hi @Triston_Edwards,

When you pause a token, the functionality is configured that no transfers can occur, though you can use other functions.

It looks like you already called pause when you called pause.

In the asciinema video, you can call `await token.unpause()` from an account with the Pauser role to return the token to an unpaused state.  
[https://asciinema.org/a/364291](https://asciinema.org/a/364291)
