We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add uint256 decimal support for convert
### What's your issue about?

Convert should allow conversion of uint256 -> decimal.

### How can it be fixed?

convert.py:57

#### Cute Animal Picture
^.^

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `vyper/types/convert.py`
Content:
```
1 from vyper.functions.signature import (
2     signature
3 )
4 from vyper.parser.parser_utils import (
5     LLLnode,
6     getpos,
7     byte_array_to_num
8 )
9 from vyper.exceptions import (
10     InvalidLiteralException,
11     TypeMismatchException,
12 )
13 from vyper.types import (
14     BaseType,
15 )
16 from vyper.types import (
17     get_type,
18 )
19 from vyper.utils import (
20     DECIMAL_DIVISOR,
21     MemoryPositions,
22     SizeLimits
23 )
24 
25 
26 @signature(('int128', 'uint256', 'bytes32', 'bytes'), 'str_literal')
27 def to_int128(expr, args, kwargs, context):
28     in_node = args[0]
29     typ, len = get_type(in_node)
30     if typ in ('int128', 'uint256', 'bytes32'):
31         if in_node.typ.is_literal and not SizeLimits.in_bounds('int128', in_node.value):
32             raise InvalidLiteralException("Number out of range: {}".format(in_node.value), expr)
33         return LLLnode.from_list(
34             ['clamp', ['mload', MemoryPositions.MINNUM], in_node,
35                         ['mload', MemoryPositions.MAXNUM]], typ=BaseType('int128', in_node.typ.unit), pos=getpos(expr)
36         )
37     else:
38         return byte_array_to_num(in_node, expr, 'int128')
39 
40 
41 @signature(('num_literal', 'int128', 'bytes32'), 'str_literal')
42 def to_uint256(expr, args, kwargs, context):
43     in_node = args[0]
44     typ, len = get_type(in_node)
45     if isinstance(in_node, int):
46 
47         if not SizeLimits.in_bounds('uint256', in_node):
48             raise InvalidLiteralException("Number out of range: {}".format(in_node))
49         _unit = in_node.typ.unit if typ == 'int128' else None
50         return LLLnode.from_list(in_node, typ=BaseType('uint256', _unit), pos=getpos(expr))
51     elif isinstance(in_node, LLLnode) and typ in ('int128', 'num_literal'):
52         _unit = in_node.typ.unit if typ == 'int128' else None
53         return LLLnode.from_list(['clampge', in_node, 0], typ=BaseType('uint256', _unit), pos=getpos(expr))
54     elif isinstance(in_node, LLLnode) and typ in ('bytes32'):
55         return LLLnode(value=in_node.value, args=in_node.args, typ=BaseType('uint256'), pos=getpos(expr))
56     else:
57         raise InvalidLiteralException("Invalid input for uint256: %r" % in_node, expr)
58 
59 
60 @signature('int128', 'str_literal')
61 def to_decimal(expr, args, kwargs, context):
62     input = args[0]
63     return LLLnode.from_list(['mul', input, DECIMAL_DIVISOR], typ=BaseType('decimal', input.typ.unit, input.typ.positional),
64                              pos=getpos(expr))
65 
66 
67 @signature(('int128', 'uint256', 'address', 'bytes'), 'str_literal')
68 def to_bytes32(expr, args, kwargs, context):
69     input = args[0]
70     typ, len = get_type(input)
71     if typ == 'bytes':
72         if len != 32:
73             raise TypeMismatchException("Unable to convert bytes[{}] to bytes32".format(len))
74         if input.location == "memory":
75             return LLLnode.from_list(
76             ['mload', ['add', input, 32]], typ=BaseType('bytes32')
77             )
78         elif input.location == "storage":
79             return LLLnode.from_list(
80                 ['sload', ['add', ['sha3_32', input], 1]], typ=BaseType('bytes32')
81             )
82     else:
83         return LLLnode(value=input.value, args=input.args, typ=BaseType('bytes32'), pos=getpos(expr))
84 
85 
86 def convert(expr, context):
87     output_type = expr.args[1].s
88     if output_type in conversion_table:
89         return conversion_table[output_type](expr, context)
90     else:
91         raise Exception("Conversion to {} is invalid.".format(output_type))
92 
93 
94 conversion_table = {
95     'int128': to_int128,
96     'uint256': to_uint256,
97     'decimal': to_decimal,
98     'bytes32': to_bytes32,
99 }
100
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/vyper/types/convert.py b/vyper/types/convert.py
--- a/vyper/types/convert.py
+++ b/vyper/types/convert.py
@@ -57,11 +57,20 @@
         raise InvalidLiteralException("Invalid input for uint256: %r" % in_node, expr)
 
 
-@signature('int128', 'str_literal')
+@signature(('int128', 'uint256'), 'str_literal')
 def to_decimal(expr, args, kwargs, context):
     input = args[0]
-    return LLLnode.from_list(['mul', input, DECIMAL_DIVISOR], typ=BaseType('decimal', input.typ.unit, input.typ.positional),
-                             pos=getpos(expr))
+    if input.typ.typ == 'uint256':
+        return LLLnode.from_list(
+            ['uclample', ['mul', input, DECIMAL_DIVISOR], ['mload', MemoryPositions.MAXDECIMAL]],
+            typ=BaseType('decimal', input.typ.unit, input.typ.positional), pos=getpos(expr)
+        )
+    else:
+        return LLLnode.from_list(
+            ['mul', input, DECIMAL_DIVISOR],
+            typ=BaseType('decimal', input.typ.unit, input.typ.positional),
+            pos=getpos(expr)
+        )
 
 
 @signature(('int128', 'uint256', 'address', 'bytes'), 'str_literal')

{"golden_diff": "diff --git a/vyper/types/convert.py b/vyper/types/convert.py\n--- a/vyper/types/convert.py\n+++ b/vyper/types/convert.py\n@@ -57,11 +57,20 @@\n         raise InvalidLiteralException(\"Invalid input for uint256: %r\" % in_node, expr)\n \n \n-@signature('int128', 'str_literal')\n+@signature(('int128', 'uint256'), 'str_literal')\n def to_decimal(expr, args, kwargs, context):\n     input = args[0]\n-    return LLLnode.from_list(['mul', input, DECIMAL_DIVISOR], typ=BaseType('decimal', input.typ.unit, input.typ.positional),\n-                             pos=getpos(expr))\n+    if input.typ.typ == 'uint256':\n+        return LLLnode.from_list(\n+            ['uclample', ['mul', input, DECIMAL_DIVISOR], ['mload', MemoryPositions.MAXDECIMAL]],\n+            typ=BaseType('decimal', input.typ.unit, input.typ.positional), pos=getpos(expr)\n+        )\n+    else:\n+        return LLLnode.from_list(\n+            ['mul', input, DECIMAL_DIVISOR],\n+            typ=BaseType('decimal', input.typ.unit, input.typ.positional),\n+            pos=getpos(expr)\n+        )\n \n \n @signature(('int128', 'uint256', 'address', 'bytes'), 'str_literal')\n", "issue": "Add uint256 decimal support for convert\n### What's your issue about?\r\n\r\nConvert should allow conversion of uint256 -> decimal.\r\n\r\n### How can it be fixed?\r\n\r\nconvert.py:57\r\n\r\n#### Cute Animal Picture\r\n^.^\n", "before_files": [{"content": "from vyper.functions.signature import (\n    signature\n)\nfrom vyper.parser.parser_utils import (\n    LLLnode,\n    getpos,\n    byte_array_to_num\n)\nfrom vyper.exceptions import (\n    InvalidLiteralException,\n    TypeMismatchException,\n)\nfrom vyper.types import (\n    BaseType,\n)\nfrom vyper.types import (\n    get_type,\n)\nfrom vyper.utils import (\n    DECIMAL_DIVISOR,\n    MemoryPositions,\n    SizeLimits\n)\n\n\n@signature(('int128', 'uint256', 'bytes32', 'bytes'), 'str_literal')\ndef to_int128(expr, args, kwargs, context):\n    in_node = args[0]\n    typ, len = get_type(in_node)\n    if typ in ('int128', 'uint256', 'bytes32'):\n        if in_node.typ.is_literal and not SizeLimits.in_bounds('int128', in_node.value):\n            raise InvalidLiteralException(\"Number out of range: {}\".format(in_node.value), expr)\n        return LLLnode.from_list(\n            ['clamp', ['mload', MemoryPositions.MINNUM], in_node,\n                        ['mload', MemoryPositions.MAXNUM]], typ=BaseType('int128', in_node.typ.unit), pos=getpos(expr)\n        )\n    else:\n        return byte_array_to_num(in_node, expr, 'int128')\n\n\n@signature(('num_literal', 'int128', 'bytes32'), 'str_literal')\ndef to_uint256(expr, args, kwargs, context):\n    in_node = args[0]\n    typ, len = get_type(in_node)\n    if isinstance(in_node, int):\n\n        if not SizeLimits.in_bounds('uint256', in_node):\n            raise InvalidLiteralException(\"Number out of range: {}\".format(in_node))\n        _unit = in_node.typ.unit if typ == 'int128' else None\n        return LLLnode.from_list(in_node, typ=BaseType('uint256', _unit), pos=getpos(expr))\n    elif isinstance(in_node, LLLnode) and typ in ('int128', 'num_literal'):\n        _unit = in_node.typ.unit if typ == 'int128' else None\n        return LLLnode.from_list(['clampge', in_node, 0], typ=BaseType('uint256', _unit), pos=getpos(expr))\n    elif isinstance(in_node, LLLnode) and typ in ('bytes32'):\n        return LLLnode(value=in_node.value, args=in_node.args, typ=BaseType('uint256'), pos=getpos(expr))\n    else:\n        raise InvalidLiteralException(\"Invalid input for uint256: %r\" % in_node, expr)\n\n\n@signature('int128', 'str_literal')\ndef to_decimal(expr, args, kwargs, context):\n    input = args[0]\n    return LLLnode.from_list(['mul', input, DECIMAL_DIVISOR], typ=BaseType('decimal', input.typ.unit, input.typ.positional),\n                             pos=getpos(expr))\n\n\n@signature(('int128', 'uint256', 'address', 'bytes'), 'str_literal')\ndef to_bytes32(expr, args, kwargs, context):\n    input = args[0]\n    typ, len = get_type(input)\n    if typ == 'bytes':\n        if len != 32:\n            raise TypeMismatchException(\"Unable to convert bytes[{}] to bytes32\".format(len))\n        if input.location == \"memory\":\n            return LLLnode.from_list(\n            ['mload', ['add', input, 32]], typ=BaseType('bytes32')\n            )\n        elif input.location == \"storage\":\n            return LLLnode.from_list(\n                ['sload', ['add', ['sha3_32', input], 1]], typ=BaseType('bytes32')\n            )\n    else:\n        return LLLnode(value=input.value, args=input.args, typ=BaseType('bytes32'), pos=getpos(expr))\n\n\ndef convert(expr, context):\n    output_type = expr.args[1].s\n    if output_type in conversion_table:\n        return conversion_table[output_type](expr, context)\n    else:\n        raise Exception(\"Conversion to {} is invalid.\".format(output_type))\n\n\nconversion_table = {\n    'int128': to_int128,\n    'uint256': to_uint256,\n    'decimal': to_decimal,\n    'bytes32': to_bytes32,\n}\n", "path": "vyper/types/convert.py"}], "after_files": [{"content": "from vyper.functions.signature import (\n    signature\n)\nfrom vyper.parser.parser_utils import (\n    LLLnode,\n    getpos,\n    byte_array_to_num\n)\nfrom vyper.exceptions import (\n    InvalidLiteralException,\n    TypeMismatchException,\n)\nfrom vyper.types import (\n    BaseType,\n)\nfrom vyper.types import (\n    get_type,\n)\nfrom vyper.utils import (\n    DECIMAL_DIVISOR,\n    MemoryPositions,\n    SizeLimits\n)\n\n\n@signature(('int128', 'uint256', 'bytes32', 'bytes'), 'str_literal')\ndef to_int128(expr, args, kwargs, context):\n    in_node = args[0]\n    typ, len = get_type(in_node)\n    if typ in ('int128', 'uint256', 'bytes32'):\n        if in_node.typ.is_literal and not SizeLimits.in_bounds('int128', in_node.value):\n            raise InvalidLiteralException(\"Number out of range: {}\".format(in_node.value), expr)\n        return LLLnode.from_list(\n            ['clamp', ['mload', MemoryPositions.MINNUM], in_node,\n                        ['mload', MemoryPositions.MAXNUM]], typ=BaseType('int128', in_node.typ.unit), pos=getpos(expr)\n        )\n    else:\n        return byte_array_to_num(in_node, expr, 'int128')\n\n\n@signature(('num_literal', 'int128', 'bytes32'), 'str_literal')\ndef to_uint256(expr, args, kwargs, context):\n    in_node = args[0]\n    typ, len = get_type(in_node)\n    if isinstance(in_node, int):\n\n        if not SizeLimits.in_bounds('uint256', in_node):\n            raise InvalidLiteralException(\"Number out of range: {}\".format(in_node))\n        _unit = in_node.typ.unit if typ == 'int128' else None\n        return LLLnode.from_list(in_node, typ=BaseType('uint256', _unit), pos=getpos(expr))\n    elif isinstance(in_node, LLLnode) and typ in ('int128', 'num_literal'):\n        _unit = in_node.typ.unit if typ == 'int128' else None\n        return LLLnode.from_list(['clampge', in_node, 0], typ=BaseType('uint256', _unit), pos=getpos(expr))\n    elif isinstance(in_node, LLLnode) and typ in ('bytes32'):\n        return LLLnode(value=in_node.value, args=in_node.args, typ=BaseType('uint256'), pos=getpos(expr))\n    else:\n        raise InvalidLiteralException(\"Invalid input for uint256: %r\" % in_node, expr)\n\n\n@signature(('int128', 'uint256'), 'str_literal')\ndef to_decimal(expr, args, kwargs, context):\n    input = args[0]\n    if input.typ.typ == 'uint256':\n        return LLLnode.from_list(\n            ['uclample', ['mul', input, DECIMAL_DIVISOR], ['mload', MemoryPositions.MAXDECIMAL]],\n            typ=BaseType('decimal', input.typ.unit, input.typ.positional), pos=getpos(expr)\n        )\n    else:\n        return LLLnode.from_list(\n            ['mul', input, DECIMAL_DIVISOR],\n            typ=BaseType('decimal', input.typ.unit, input.typ.positional),\n            pos=getpos(expr)\n        )\n\n\n@signature(('int128', 'uint256', 'address', 'bytes'), 'str_literal')\ndef to_bytes32(expr, args, kwargs, context):\n    input = args[0]\n    typ, len = get_type(input)\n    if typ == 'bytes':\n        if len != 32:\n            raise TypeMismatchException(\"Unable to convert bytes[{}] to bytes32\".format(len))\n        if input.location == \"memory\":\n            return LLLnode.from_list(\n            ['mload', ['add', input, 32]], typ=BaseType('bytes32')\n            )\n        elif input.location == \"storage\":\n            return LLLnode.from_list(\n                ['sload', ['add', ['sha3_32', input], 1]], typ=BaseType('bytes32')\n            )\n    else:\n        return LLLnode(value=input.value, args=input.args, typ=BaseType('bytes32'), pos=getpos(expr))\n\n\ndef convert(expr, context):\n    output_type = expr.args[1].s\n    if output_type in conversion_table:\n        return conversion_table[output_type](expr, context)\n    else:\n        raise Exception(\"Conversion to {} is invalid.\".format(output_type))\n\n\nconversion_table = {\n    'int128': to_int128,\n    'uint256': to_uint256,\n    'decimal': to_decimal,\n    'bytes32': to_bytes32,\n}\n", "path": "vyper/types/convert.py"}]}