mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Change ABIEncoderV1 to not pad empty strings
This commit is contained in:
@@ -23,12 +23,12 @@ contract C {
|
||||
// ABIEncoderV1Only: true
|
||||
// compileViaYul: false
|
||||
// ----
|
||||
// f1() -> 0x20, 0x60, 0x20, 0, 0
|
||||
// f1() -> 0x20, 0x40, 0x20, 0
|
||||
// f2(string): 0x20, 0 -> 0x20, 0x40, 0x20, 0
|
||||
// f2(string): 0x20, 0, 0 -> 0x20, 0x40, 0x20, 0
|
||||
// g1() -> 32, 0
|
||||
// g2(string): 0x20, 0 -> 0x20, 0
|
||||
// g2(string): 0x20, 0, 0 -> 0x20, 0
|
||||
// h1() -> 0x20, 0x64, 26959946667150639794667015087019630673637144422540572481103610249216, 862718293348820473429344482784628181556388621521298319395315527974912, 0, 0
|
||||
// h1() -> 0x20, 0x44, 26959946667150639794667015087019630673637144422540572481103610249216, 862718293348820473429344482784628181556388621521298319395315527974912, 0
|
||||
// h2(string): 0x20, 0 -> 0x20, 0x44, 26959946667150639794667015087019630673637144422540572481103610249216, 862718293348820473429344482784628181556388621521298319395315527974912, 0
|
||||
// h2(string): 0x20, 0, 0 -> 0x20, 0x44, 26959946667150639794667015087019630673637144422540572481103610249216, 862718293348820473429344482784628181556388621521298319395315527974912, 0
|
||||
|
||||
@@ -6,6 +6,7 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ABIEncoderV1Only: true
|
||||
// ----
|
||||
// f() -> 0x40, 0xc0, 0x60, 0x20, 0x0, 0x0, 0x0
|
||||
// f() -> 0x40, 0xa0, 0x40, 0x20, 0x0, 0x0
|
||||
|
||||
@@ -13,6 +13,6 @@ contract C {
|
||||
// compileViaYul: false
|
||||
// revertStrings: debug
|
||||
// ----
|
||||
// f() -> FAILURE, hex"08c379a0", 0x20, 0, ""
|
||||
// f() -> FAILURE, hex"08c379a0", 0x20, 0
|
||||
// g(string): 0x20, 0, "" -> FAILURE, hex"08c379a0", 0x20, 0
|
||||
// g(string): 0x20, 0 -> FAILURE, hex"08c379a0", 0x20, 0
|
||||
|
||||
Reference in New Issue
Block a user