Questions tagged [import]

This question is related to importing one file to another which means content of imported file is partially or fully accessible to this file.

Filter by
Sorted by
Tagged with
0
votes
0answers
32 views

Contract can't import remote repository locally

I made a compiler script that takes all contracts in folder ./contracts/ and produces a .json for each contract, containing an ABI and Bytecode. This worked fine for a while. However, I added some ...
3
votes
1answer
55 views

What are remappings and how do they work in solidity?

How can they be used with solc?
0
votes
1answer
33 views

“onlyOwner” Function restrict the call from child contract

I have a basic knowledge of solidity. I am trying to create an upgradable ERC20 Token. For that, I create TokenStorage contract and Logic contract and trying to write the Proxy contract. In the Logic ...
0
votes
1answer
24 views

Importing Ethereum Account Private Key and Using on Different Servers

Let's suppose i have a wallet on one remote server, R-1. Is it possible to get the private key of that wallet/account and use it on different remote server R-2? I know, i can copy/paste files under ...
0
votes
1answer
41 views

Can't import a contract interface in vyper

I need to import a contract interface using the JSON ABI but I get syntax error when trying to import the interface. I have created the JSON file in remix and named it IERC1620.json then I am trying ...
0
votes
0answers
185 views

Node: How Can I Import Web3 To Node.js?

I'm trying to import the web3 library in Node.js so that I can handle Ethereum smart contract events, however I can't get the import to work. I'm running Babel on each file to convert to es5, and the ...
0
votes
1answer
41 views

Import dependencies which rely on additional dependencies

I'm using truffle to create a contract that extends another contract in a GitHub repository e.g. contract Consumer is Chainlinked { } My first problem is that I an unable to import directly from a ...
2
votes
0answers
27 views

Can I import a Library from a Library?

Is it possible to import a library into another library? I give a simplified example below of what I'd like to achieve: library structLib { struct Point { uint X; uint Y; } } ...
1
vote
1answer
146 views

“Cannot import url”, “File outside of allowed directories” using --standard-json

I'm trying to understand how to use solidity's JSON input-output API. Here's my json file; { "language": "Solidity", "sources": { "StandardToken.sol": { "urls": [ "file:///home/...
0
votes
1answer
273 views

Call to a external function

I have two solidity files. Im trying to get access to one function that is in the second solidity file. I the first contract I import the file. import "./DateTime.sol"; How can now acced to one ...
1
vote
3answers
788 views

How can import one contract functions in solidity

Looking at the solidity documentation i don´t find a date type. Searching in the web I find a GitHub repo that appear one contract that give the posibility to work with date. https://github.com/...
0
votes
1answer
913 views

how to import multiple files on remix IDE using github url?

i'm using the following way! but got error URL not parseable: Ownable.sol!! import "github.com/OpenZeppelin/zeppelin-solidity/contracts/ownership/Ownable.sol";
0
votes
1answer
56 views

While compiling contract i got an error “Error: Could not find path from any sources; imported from path”

pragma solidity ^0.4.22; import './NewToken.sol'; import 'zeppelin-solidity/contracts/crowdsale/emission/MintedCrowdsale.sol'; import 'zeppelin-solidity/contracts/crowdsale/validation/...
2
votes
2answers
2k views

How do I import from / install OpenZeppelin properly?

I'm a newb dev and want to play with smart contracts, and was trying to figure this out. Ive installed truffle and openzeppelin, everything seems to check out, but in Mist I still get an error when I ...
0
votes
1answer
496 views

Error compiling OpenZeppelin imported contracts

I'm running a truffle project and have imported OpenZeppelin contracts. While running truffle compile I'm facing following error: github.com/OpenZeppelin/openzeppelin-solidity/contracts/crowdsale/...
1
vote
1answer
493 views

DeclarationError: Identifier already declared. Two imports import the same ERC721 contract

Im building a contract that uses two contracts that both use the ERC721 zeppelin contract, when I import the two as such: import nonFungableWidthAddedFunctionality1.sol; import ...
0
votes
2answers
46 views

How does an Import Wallet work in Ethereum?

How to provide import wallet option in Ethereum bloackchain? How does is imports/ how import wallet works?
0
votes
1answer
494 views

Import account from one geth node to another geth node

I had a geth node where i created an account. Then i backed up the keystore folder just in case. I had to format the pc and install geth again. So i would like to know how can i import my old account ...
1
vote
2answers
181 views

Solidity import Tensor Flow Libraries?

Like how we import oraclize in Solidity (as follows), is there some way to import tensorflow libraries for machine learning purpose? import "github.com/oraclize/ethereum-api/oraclizeAPI.sol";
0
votes
1answer
698 views

Restore wallet in Exodus using JSON file

I've a wallet file in the JSON format with address, cipher, ciphertext, salt, etc (version 3). How can I restore it into Exodus wallet? In Developer menu I can only see Restore from 12-word phrase......
0
votes
1answer
69 views

Best practices for importing contracts (Github vs. Including in project)?

On the remix docs, it gives examples of importing contracts from source either locally or from github. I'm wondering for importing standard contracts (like say, OpenZeppelin's ERC20 StandardToken) ...
2
votes
2answers
1k views

How to use Solidity solc to compile A.sol that imports B.sol file?

I know how to install solc via "npm install --save solc" then use solc.compile to compile one sol file. But now I've got A.sol file that imports B.sol file, and when I run node compile.js, no error in ...
0
votes
1answer
311 views

How can I import Rinkeby account to metamask after deploying my contract to Rinkeby test network? [duplicate]

I finished deploying(compiled and migrated) my contract to Rinkeby test network. So, now I'm trying to go to MetaMask and clicked on Rinkeby TestNet and don't know what to do after. How do I get my ...
0
votes
1answer
271 views

how to import UTC-JSON file through web3-eth methods

hey I am working on ethereum wallet. in this i want to import my account through UTC json file, but i didn't find any solution for this in web3-eth command someone can please help to find out the ...
3
votes
0answers
199 views

Backup blockchain from a running geth fullnode

I need to make backups from my running node to be able to start a second node quickly or to restore the node quickly if it gets corrupted. Does geth export work on a running node? is it a good option ...
2
votes
0answers
480 views

Importing files from an “outside” folder

I am trying to import files from a relative path outside of my Truffle-project folder: import '../../../common/solidity/contracts/token/ERC20/BurnableToken.sol'; import '../../../common/solidity/...
4
votes
2answers
570 views

Importing private key: Why is it so fast?

I've just imported two private keys with both, geth and the zcash-cli. While the zcash-cli (a public t.* address) took more than 15 minutes* (I guess it scanned the whole blockchain), geth was ...
1
vote
2answers
912 views

how to import the wallet generated from geth into parity through the passphase?

I have create a eth wallet by using geth, which is a go-lang based ethereum command line interface. ~ geth account new WARN [08-13|16:57:51] No etherbase set and no accounts found as default Your ...
0
votes
1answer
356 views

how to make geth import faster? [duplicate]

my computer is mac and it has run geth import for about a week, and it's 4000000 block now. I have ran geth --fast before and it's slow too. I am in china, is it something i can do to make it faster?
0
votes
1answer
296 views

Import contract wallet

I am trying to import a contract wallet after having deleted all the data from my laptop. I have the keystore file so I am able to recover my main account (in theory this should give me access to ...
0
votes
2answers
30 views

Is there a GUI way to import chain data and what would be best practice?

I am trying to copy over chain data from one machine to another. Is there a way in the GUI to do this? Is there a how to/best practice for putting 300+ GB of chain data on new machine and launching ...
2
votes
2answers
480 views

Consolidate Batch of ETH Wallets w/ERC20 Tokens?

I have a large number of Ethereum wallets with small amounts of ERC-20 tokens in each. How can I send all of these tokens to a single ethereum wallet without doing this process manually? (it would ...
3
votes
1answer
8k views

Import unencrypted private key into ethereum wallet [duplicate]

I have an ETH adress. I have an unencrypted private key. How to import these in MyEtherWallet? Or another Desktop Ether wallet? Don't answer with an howto for Mist or Geth, because I use ...
1
vote
1answer
435 views

Importing a contract from GitHub

I'm trying to import a contract from GitHub: pragma solidity ^0.4.18; pragma experimental ABIEncoderV2; pragma experimental "v0.5.0"; import "github.com/ethereum/dapp-bin/library/stringUtils.sol"; ...
1
vote
0answers
28 views

How to import libraries to Mist? [duplicate]

I've create a contract in Remix imporing 2 differents libreries and it works ok, but when I copy and paste it into Mist I got an error at the import statement. Code goes like this: pragma solidity ^...
1
vote
1answer
112 views

Troubles importing mist wallet

I am currently attempting to import my old wallet onto a new pc in order to be able to transfer the 2 ethereums that I have stored on it onto an exchange, but can't for the life of me figure out how ...
1
vote
1answer
236 views

Metamask account related to Geth account?

I've created a Metamask account and now I want to import it to Geth. I don't have a Geth account. I've exported the private key to a .txt file. When I import the file Geth asks me to insert 2 times ...
13
votes
4answers
8k views

“SyntaxError: Unexpected token import” on truffle test

I get an "SyntaxError: Unexpected token import" error when I do 'truffle test'. I am trying to import a function declared in another file into the java-script test file. I have been searching about ...
2
votes
2answers
5k views

How to import my current wallet in Mist?

I generated my wallet with geth command line "geth new account", with password, and got my key. Following a guide, I just downloaded Claymore's Dual Miner, setup the start.bat pasting my key and ...
1
vote
1answer
816 views

Transfer Exodus Wallet to Mist

How do I transfer my Exodus wallet to Mist? I have some Eth based tokens (DRP) and I'd like to be able to see them, but they don't show up in Exodus. I'm baffled by the import function or opening GETH ...
3
votes
0answers
71 views

Problem with import of ether.li wallet into Mist [duplicate]

I am unable to follow the guide provided from the creator of ether.li: https://masonborda.com/etherli-wallet-recoveries/. I managed to import both accounts via the console into Mist but I am unable ...
1
vote
0answers
72 views

Tech challenges related to coinbase account recovery

I am trying to reacquire access to a coinbase account that I used as the repository for ethereum I was mining almost 2 years ago. I have the json file corresponding to the correct address. I have ...
7
votes
3answers
3k views

How to import a plain private key into Parity?

Basically the parity version of this. Can Parity import raw private keys or Geth keystore files?
0
votes
1answer
165 views

How exactly does “importing a wallet” work?

I think I might import my old wallet using Geth but there's something that's not clear. I have made a wallet backup a few months ago. However I've earned some ETH after that backup. If I restore ...
4
votes
2answers
2k views

How to import an account in parity using CLI?

Here is what I tried: parity account new --chain dev it creates new account and generates JSON file in %HOME%\AppData\Roaming\Parity\Ethereum\keys\DevelopmentChain\ So, then I cut the file from ...
10
votes
3answers
1k views

Solidity: accessing a library constant in a contract that imports the library

Is it possible to access a library constant in a contract that imports the library? I am using solidity 0.4.11 For instance: library Lib { bytes1 constant flag = 0x01 ... } separate file ...
5
votes
1answer
997 views

Geth not synchronizing to MetaMask

I want to import my account of MetaMask(testnet) to the geth accounts list. First I copied the private key from MetaMask and saved to a txt file. After that I run this command : geth account ...
5
votes
1answer
472 views

is it possible I imported my wallet “Keystore” file and somehow the password files not included?

I tried running My Ethereum Wallet on my windows P.C, created a wallet and had some ETH sent to it. Then for some reason I waited and waited but the software just would not sync. So, I stored the ...
4
votes
3answers
2k views

Cannot import Ethereum web3.js in React Native application

I'm trying to import the Ethereum web3.js library into a React Native project. I've followed the React Linking Libraries instructions, installing the web3.js package and linking it with the commands: ...
1
vote
1answer
817 views

how to import unencrypted private key in testnet

I tried using the following command geth --testnet account import <path_to_key_file> I am getting the following error: Fatal: Failed to load the private key: unexpected EOF Note that my key ...