Skip to content

Commit

Permalink
accounts/abi/bind: fix erroneous test (#22053)
Browse files Browse the repository at this point in the history
closes #22049
  • Loading branch information
yumiel yoomee1313 authored Dec 30, 2020
1 parent a425a47 commit 0a3993c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions accounts/abi/bind/bind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1640,11 +1640,7 @@ var bindTests = []struct {
contract NewFallbacks {
event Fallback(bytes data);
fallback() external {
bytes memory data;
assembly {
calldatacopy(data, 0, calldatasize())
}
emit Fallback(data);
emit Fallback(msg.data);
}
event Received(address addr, uint value);
Expand All @@ -1653,7 +1649,7 @@ var bindTests = []struct {
}
}
`,
[]string{"60806040523480156100115760006000fd5b50610017565b61016e806100266000396000f3fe60806040526004361061000d575b36610081575b7f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f885258743334604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b005b34801561008e5760006000fd5b505b606036600082377f9043988963722edecc2099c75b0af0ff76af14ffca42ed6bce059a20a2a9f986816040518080602001828103825283818151815260200191508051906020019080838360005b838110156100fa5780820151818401525b6020810190506100de565b50505050905090810190601f1680156101275780820380516001836020036101000a031916815260200191505b509250505060405180910390a1505b00fea26469706673582212205643ca37f40c2b352dc541f42e9e6720de065de756324b7fcc9fb1d67eda4a7d64736f6c63430006040033"},
[]string{"6080604052348015600f57600080fd5b506101078061001f6000396000f3fe608060405236605f577f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f885258743334604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1005b348015606a57600080fd5b507f9043988963722edecc2099c75b0af0ff76af14ffca42ed6bce059a20a2a9f98660003660405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a100fea26469706673582212201f994dcfbc53bf610b19176f9a361eafa77b447fd9c796fa2c615dfd0aaf3b8b64736f6c634300060c0033"},
[]string{`[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"Fallback","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Received","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"stateMutability":"payable","type":"receive"}]`},
`
"bytes"
Expand Down Expand Up @@ -1701,6 +1697,7 @@ var bindTests = []struct {
}
// Test fallback function
gotEvent = false
opts.Value = nil
calldata := []byte{0x01, 0x02, 0x03}
c.Fallback(opts, calldata)
Expand Down

0 comments on commit 0a3993c

Please sign in to comment.