okwme
  • Member for 4 years, 6 months
  • Last seen more than a month ago
  • Berlin, Germany
How to type cast fixed size byte arrays in solc 0.5.x?
3 votes

I figured it out... You have to cast the uint to the same length so in this case it would be: bytes28 bar = bytes28(uint224(foo)); If it were bytes16 it would be: bytes16 bar = bytes28(uint128(foo))...

View answer
How to interact with Smart Contracts (for test)
3 votes

For Question 1: You can try running a local test network using testrpc which is initialized with 10 test accounts each filled with ~100ETH and a Mnemonic key that you can use with Metamask to gain ...

View answer
Why would Oraclize fail when a normal post doesn't?
Accepted answer
1 votes

I got a reply from an Oraclize developer on their github that can be seen here. He says when using the second parameter as a POST payload a whitespace needs to be included at the beginning or end of ...

View answer
Oraclize failing to return data when using example contract
1 votes

It looks like the query is working on the Oraclize Test site. You can see it working here. It has a request like: json(https://api.kraken.com/0/public/Ticker?pair=ETHXBT).result.XETHXXBT.c[0] with a ...

View answer
Converting 8x8 board game to bytes
Accepted answer
1 votes

So BigNumber has really helpful base change operations. For anyone it might be helpful for here's what I did: var board = 'bbbbbbbbbbbbbbbbwbbwbwbbbbwwwwbbbbbbbbbbwbwwbwbww-bbbbwwwwwwwwww' ...

View answer
Inability to verify contract with ABIEncoderV2 on Etherscan
0 votes

Have you tried compiling with 0.4.25? After doing so, I was able to remove ABIEncoderV2 and my verifications started working.

View answer
Contract not using Upgraded Proxy Contracts
0 votes

You need to make your fallback function called baz(), then treat Bar.sol the same way you treat ZeroDelegate (as a non-inherited external contract—maybe actually library). The delegated call will be ...

View answer
Conversion of uint to string
0 votes

Based on the Oraclize code that Dmitry supplied I made a function to return a uint as a string in hex format: function uint2hexstr(uint i) internal pure returns (string) { if (i == 0) return "0"; ...

View answer
geth: Failed to unlock account
0 votes

I was having the same problem. strangely i seem to have gotten past it by first entering a blank password and then entering the real password on attempt 2/3. That worked for some reason...

View answer
Using injected web3.js in Vuex as a plugin
0 votes

I had trouble using web3 as part of the vue instance (ie this.web3 = window.web3 caused errors). Instead I ended up moving all of my contract logic into a separate js file and including it in my store ...

View answer
Does deploying a contract mean it will overwrite the last instance?
0 votes

Re-running the migration will re-deploy it to the blockchain at a new address. It will also overwrite the ABIs inside of /build/contracts/. I accidentally did this while trying my contract on another ...

View answer