Skip to content

Instantly share code, notes, and snippets.

@maurelian
Last active June 1, 2018 13:35
Show Gist options
  • Save maurelian/5dd464eafe986b65fa502b607054ec33 to your computer and use it in GitHub Desktop.
Save maurelian/5dd464eafe986b65fa502b607054ec33 to your computer and use it in GitHub Desktop.
Trying to make an external call with vyper
# Attempt 1
other_contract: address
@public
def __init__():
self.other_contract = 0x1111111000000000000000000000000000000000
@public
def foo():
calldata: bytes = 0x1111111000000000000000000000000000000000000000000000000000000000 # Invalid base type: bytes
raw_call(self.other_contract, calldata)
# Attempt 2
other_contract: address
@public
def __init__():
self.other_contract = 0x1111111000000000000000000000000000000000
@public
def foo():
calldata: bytes32 = 0x1111111000000000000000000000000000000000000000000000000000000000
raw_call(self.other_contract, calldata) # Expecting bytes for argument 2 of raw_call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment