Can I verify colony token on Etherscan?

I created a colony TRUTH token for the 911 data colony that can be seen on etherscan

https://etherscan.io/token/0xb5a4afeb172af3d6a5401b3a345751dd5c96c1ca

I know there may be issues with validating the colony contracts but is that also true of the token contract? It seems to be a regular token. Also, are the tokens ERC 20 or ERC 721?

Thanks,

James

Hi James,
Great to hear from you, mate!

You can find the token contracts here and the contract it imports here.

I think that should give you everything you need to verify the contract on etherscan.

Thanks Auryn, I’ll give it a try :).

1 Like

It looks like etherscan doesn’t like the import “…/lib…” so i tried to hack the main token to have a local import “erc20.sol” but it doesn’t like that either. I’ll take another look at it later…but are the token libraries deployed to mainnet addresses? That’s the other option. I also tried just embedding erc20.sol in ERC20Extended but similar error.

" Compiler debug log:
Error! Unable to generate Contract ByteCode and ABI
Found the following ContractName(s) in source code: ERC20Extended.sol: ERC20Extended , erc20.sol: ERC20 , erc20.sol: ERC20Events
But we were unable to locate a matching bytecode (err_code_2)
For troubleshooting, you can try compiling your source code with the Remix - Solidity IDE and check for exceptions

  • Compiler Version: v0.5.8+commit.23d335f2
  • Optimization Enabled: False
  • Runs: 200

ByteCode (what we are looking for) :
60806040523480156200001157600080fd5b50604051620011ce380380620011ce833981018060405260608110156200003757600080fd5b8101908080516401000000008111156200005057600080fd5b820160208101848111156200006457600080fd5b81516401000000008111828201871017156200007f57600080fd5b505092919060200180516401000000008111156200009c57600080fd5b82016020810184811115620000b057600080fd5b8151640100000000811182820187101715620000cb57600080fd5b505060209182015133600081815260019094526040808520859055848055600480546001600160a01b0319168317905551929550909350917fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9491a282516200013b90600690602086019062000199565b5081516200015190600590602085019062000199565b506004805460ff9092167401000000000000000000000000000000000000000002600160a01b60ff021990921691909117905550506007805460ff191660011790556200023e565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001dc57805160ff19168380011785556200020c565b828001600101855582156200020c579182015b828111156200020c578251825591602001919060010190620001ef565b506200021a9291506200021e565b5090565b6200023b91905b808211156200021a576000815560010162000225565b90565b610f80806200024e6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c80637a9e5e4b116100ad578063a69df4b511610071578063a69df4b514610383578063a9059cbb1461038b578063bf7e214f146103b7578063cf309012146103bf578063dd62ed3e146103c757610121565b80637a9e5e4b146102e85780638da5cb5b1461030e57806395d89b41146103325780639dc29fac1461033a578063a0712d681461036657610121565b806323b872dd116100f457806323b872dd14610225578063313ce5671461025b57806340c10f191461027957806342966c68146102a557806370a08231146102c257610121565b806306fdde0314610126578063095ea7b3146101a357806313af4035146101e357806318160ddd1461020b575b600080fd5b61012e6103f5565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610483565b604080519115158252519081900360200190f35b610209600480360360208110156101f957600080fd5b50356001600160a01b03166104ea565b005b610213610592565b60408051918252519081900360200190f35b6101cf6004803603606081101561023b57600080fd5b506001600160a01b03813581169160208101359091169060400135610598565b610263610623565b6040805160ff9092168252519081900360200190f35b6102096004803603604081101561028f57600080fd5b506001600160a01b038135169060200135610633565b610209600480360360208110156102bb57600080fd5b503561075c565b610213600480360360208110156102d857600080fd5b50356001600160a01b0316610769565b610209600480360360208110156102fe57600080fd5b50356001600160a01b0316610784565b61031661082c565b604080516001600160a01b039092168252519081900360200190f35b61012e61083b565b6102096004803603604081101561035057600080fd5b506001600160a01b038135169060200135610896565b6102096004803603602081101561037c57600080fd5b5035610a74565b610209610ad6565b6101cf600480360360408110156103a157600080fd5b506001600160a01b038135169060200135610b3a565b610316610b4e565b6101cf610b5d565b610213600480360360408110156103dd57600080fd5b506001600160a01b0381358116916020013516610b66565b6006805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561047b5780601f106104505761010080835404028352916020019161047b565b820191906000526020600020905b81548152906001019060200180831161045e57829003601f168201915b505050505081565b3360008181526002602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b610500336000356001600160e01b031916610b91565b6105425760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60005490565b60075460009060ff1615610610576105bc336000356001600160e01b031916610b91565b6106105760408051600160e51b62461bcd02815260206004820152601960248201527f636f6c6f6e792d746f6b656e2d756e617574686f726973656400000000000000604482015290519081900360640190fd5b61061b848484610c7b565b949350505050565b600454600160a01b900460ff1681565b610649336000356001600160e01b031916610b91565b61068b5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b6001600160a01b0382166000908152600160205260409020546106ae9082610e7e565b6001600160a01b038316600090815260016020526040812091909155546106d59082610e7e565b6000556040805182815290516001600160a01b038416917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885919081900360200190a26040805182815290516001600160a01b038416916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6107663382610896565b50565b6001600160a01b031660009081526001602052604090205490565b61079a336000356001600160e01b031916610b91565b6107dc5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6004546001600160a01b031681565b6005805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561047b5780601f106104505761010080835404028352916020019161047b565b6001600160a01b0382163314610974576001600160a01b03821660009081526002602090815260408083203384529091529020548111156109215760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b038216600090815260026020908152604080832033845290915290205461094f9082610ed9565b6001600160a01b03831660009081526002602090815260408083203384529091529020555b6001600160a01b0382166000908152600160205260409020548111156109e45760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b038216600090815260016020526040902054610a079082610ed9565b6001600160a01b03831660009081526001602052604081209190915554610a2e9082610ed9565b6000556040805182815290516001600160a01b038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b610a8a336000356001600160e01b031916610b91565b610acc5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b6107663382610633565b610aec336000356001600160e01b031916610b91565b610b2e5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b6007805460ff19169055565b6000610b47338484610598565b9392505050565b6003546001600160a01b031681565b60075460ff1681565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b60006001600160a01b038316301415610bac575060016104e4565b6004546001600160a01b0384811691161415610bca575060016104e4565b6003546001600160a01b0316610be2575060006104e4565b60035460408051600160e01b63b70096130281526001600160a01b0386811660048301523060248301526001600160e01b0319861660448301529151919092169163b7009613916064808301926020929190829003018186803b158015610c4857600080fd5b505afa158015610c5c573d6000803e3d6000fd5b505050506040513d6020811015610c7257600080fd5b505190506104e4565b60006001600160a01b0384163314610d5b576001600160a01b0384166000908152600260209081526040808320338452909152902054821115610d085760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b0384166000908152600260209081526040808320338452909152902054610d369083610ed9565b6001600160a01b03851660009081526002602090815260408083203384529091529020555b6001600160a01b038416600090815260016020526040902054821115610dcb5760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b038416600090815260016020526040902054610dee9083610ed9565b6001600160a01b038086166000908152600160205260408082209390935590851681522054610e1d9083610e7e565b6001600160a01b0380851660008181526001602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b808201828110156104e45760408051600160e51b62461bcd02815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b808203828111156104e45760408051600160e51b62461bcd02815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fdfe64732d617574682d756e617574686f72697a6564000000000000000000000000
{bzzr}000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000f39313120547275746820546f6b656e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055452555448000000000000000000000000000000000000000000000000000000

  • vs what we got -

We tried looking for a match from the list of compiled contract bytecode outputs (as listed below), but was unable to find an exact match.

  1. erc20.sol : ERC20Events
    6080604052348015600f57600080fd5b50603580601d6000396000f3fe6080604052600080fdfe
    {bzzr}000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000f39313120547275746820546f6b656e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055452555448000000000000000000000000000000000000000000000000000000"

Hi @heiho1,

It is possible to verify the token contracts generated. I have taken the liberty of doing so for the token you linked, but for other people finding this topic looking for more detailed instructions:

  1. Go to https://etherscan.io/verifyContract
  2. Enter the address, choose ‘Solidity (Single File)’ as the compiler type, v0.5.8+commit.23d335f2 as the compiler version, and GNU GPL v3 as the license type.
  3. On the next page, enter the flattened code for the contract. You can either generate this yourself using a tool like solidity-steamroller, or use the ultimate output that I’ve made available at this gist.
  4. Choose ‘Yes’ under ‘Optimization’. Double check that under ‘Misc Settings -> Runs (optimizer)’, it is set to 200.
  5. Pass the captcha and click ‘Verify and Publish’.

These instructions are certainly good for any token deployed up to and including the Auburn Glider release. Future releases will most likely only require the solidity version to be updated.

2 Likes

Thanks area, that solution saved me some time for sure :smiley: