Deploying vyper contract throws InvalidType
See original GitHub issueEnvironment information
brownie
Version: 1.19.1ganache-cli
Version:solc
Version: 7.0.4- Python Version: 3.8.10
- OS: linux (ubuntu 20.*)
- Vyper: 0.3.4+commit.ac8cb6e6
What was wrong?
When trying to deploy a vyper contract using brownie, it throws an error
ethbox@ethbox-VirtualBox:~/Vyper-Main/ERC1155$ brownie run deploy1155.py
Brownie v1.19.0 - Python development framework for Ethereum
Compiling contracts...
Vyper version: 0.3.4
Unhandled exception in 'contracts/ERC1155ownable.vy':
InvalidType: Subscript must be a literal integer
contract "contracts/ERC1155ownable.vy", line 35:16
34 # the contracts URI to find the metadata
---> 35 baseuri: String[MAX_URI_LENGTH]
------------------------^
36 contractURI: public(String[MAX_URI_LENGTH])
MAX_URI_LENGTH is an uint256 with value 300
MAX_URI_LENGTH: constant(uint256) = 300
When compiling directly with Vyper, the compilation is successful.
ethbox@ethbox-VirtualBox:~/Vyper-Main/ERC1155$ vyper ./contracts/ERC1155ownable.vy -f combined_json
{"contracts/ERC1155ownable.vy": {"bytecode": "0x602061281e600039600051600001608060208261281e0160003960005
How can it be fixed?
I don’t know
Issue Analytics
- State:
- Created a year ago
- Comments:11
Top Results From Across the Web
Vyper Documentation
to deploy the contract on the blockchain, which is not returned. We assert that the deposit is divisible by 2 to ensure.
Read more >Solidity vs Vyper explained - step-by-step beginners guides
One hard rule about developing on the blockchain is that any smart contracts that are deployed cannot be altered. Smart contracts are often...
Read more >Hardhat errors | Ethereum development environment for ...
You tried to run Hardhat from a global installation or not installing it at all. ... One of your Hardhat or task arguments...
Read more >Value must be a literal - Vyper Ethereum smart contract - Stack ...
this call of a for loop: for i in range(self.some_uint256): # do something... is throwing the error: StateAccessViolation: Value must ...
Read more >Ethereum - Bountysource
VIP: `msg.data` $ 0. Created 3 years ago in vyperlang/vyper with 8 comments. ... When trying to deploy a vyper contract using brownie,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll create an issue on the vyper repo
Closed, is a vyper issue!