solidctf icon indicating copy to clipboard operation
solidctf copied to clipboard

Create user account failed

Open m4p1e opened this issue 9 months ago • 3 comments

When connect to the platform, and type 1 in the console, it shows a error such as

nc 127.0.0.1 20000
Can you make the isSolved() function return true?

[1] - Create an account which will be used to deploy the challenge contract
[2] - Deploy the challenge contract using your generated account
[3] - Get your flag once you meet the requirement
[4] - Show the contract source code
[-] input your choice: 1
Unsupported type: The primitive argument must be one of: bytes,bytearray, int or bool and not str

Other numbers are ok, only failed when type 1.

m4p1e avatar Apr 23 '25 08:04 m4p1e

me too! how solve?

zhaojinxiu6 avatar Jul 18 '25 03:07 zhaojinxiu6

me too! how solve?

Hey, you need to modify the service.py such as

+ from hexbytes import HexBytes

- self._contract: Contract = Contract(build_json["abi"], build_json["bytecode"])
+ self._contract: Contract = Contract(build_json["abi"], HexBytes(build_json["bytecode"]))

m4p1e avatar Jul 21 '25 07:07 m4p1e

me too! how solve?

Hey, you need to modify the service.py such as

  • from hexbytes import HexBytes
  • self._contract: Contract = Contract(build_json["abi"], build_json["bytecode"])
  • self._contract: Contract = Contract(build_json["abi"], HexBytes(build_json["bytecode"])) Thank you for your reply. Although I didn't use your method, my project is now running properly. Thanks again!

zhaojinxiu6 avatar Jul 21 '25 07:07 zhaojinxiu6