Skip to content

Commit

Permalink
feat: solidity to sir
Browse files Browse the repository at this point in the history
  • Loading branch information
He1pa committed Jan 30, 2024
1 parent cb07903 commit 0af1c31
Show file tree
Hide file tree
Showing 60 changed files with 121,639 additions and 92 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,8 @@ benches/*.xls
coverage.xml
lcov_cobertura.py
TEST-*.xml

## node
node_modules

tensor/src/test_data

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
module_name = "Address_497"
contract Address_497 {
state {
}
fn Address_497.Address_497.constructor_Address_497(%0: [u8], %1: [u8], %2: [u8], ) {
0:
ret()
}

pub fn Address_497.Address_497.init() {
1:
let %0: [u8]
let %1: [u8]
let %2: [u8]
br_if(call(@ir.builtin.call_gas_left() -> u256, ) , bb 2, bb 3, )
2:
call(@ir.builtin.revert(3001: i32, "yul revert": str, ) -> void, )
br(bb 3, )
3:
call(@Address_497.Address_497.codecopy(0: u256, call(@ir.str.to_bytes("Address_497_deployed": str, ) -> u256, ) , call(@ir.str.len("Address_497_deployed": str, ) -> u256, ) , ) -> u256, )
call(@Address_497.Address_497.setimmutable(0: u256, "library_deploy_address": str, call(@Address_497.Address_497.address() -> u256, ) , ) -> u256, )
ret(call(@ir.vector.slice(%0: [u8], 0: u256, add(0: u256, call(@ir.str.len("Address_497_deployed": str, ) -> u256, ) , ) , ) -> [u8], ) , )
ret()
}

}
module_name = "Address_497_deployed"
contract Address_497_deployed {
state {
}
fn Address_497_deployed.Address_497_deployed.shift_right_224_unsigned(%0: u256, %1: [u8], %2: [u8], %3: [u8], ) -> u256 {
4:
let %4: u256 = shr(224: u256, %0: u256, )
ret(%4: u256, )
}

pub fn Address_497_deployed.Address_497_deployed.init() {
5:
let %0: [u8]
let %1: [u8]
let %2: [u8]
let %3: u256 = eq(eq(call(@Address_497_deployed.Address_497_deployed.loadimmutable("library_deploy_address": str, ) -> u256, ) , call(@Address_497_deployed.Address_497_deployed.address() -> u256, ) , ) , 0: u256, )
br_if(eq(lt(div(call(@ir.vector.len(%1: [u8], ) -> u256, ) , 50: u256, ) , 4: u256, ) , 0: u256, ) , bb 6, bb 7, )
6:
let %4: u256 = bit_not(0: u256, )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 0: u256, ) , ) -> u8, ) , ) -> u256 , mul(0: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 1: u256, ) , ) -> u8, ) , ) -> u256 , mul(1: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 2: u256, ) , ) -> u8, ) , ) -> u256 , mul(2: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 3: u256, ) , ) -> u8, ) , ) -> u256 , mul(3: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 4: u256, ) , ) -> u8, ) , ) -> u256 , mul(4: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 5: u256, ) , ) -> u8, ) , ) -> u256 , mul(5: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 6: u256, ) , ) -> u8, ) , ) -> u256 , mul(6: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 7: u256, ) , ) -> u8, ) , ) -> u256 , mul(7: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 8: u256, ) , ) -> u8, ) , ) -> u256 , mul(8: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 9: u256, ) , ) -> u8, ) , ) -> u256 , mul(9: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 10: u256, ) , ) -> u8, ) , ) -> u256 , mul(10: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 11: u256, ) , ) -> u8, ) , ) -> u256 , mul(11: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 12: u256, ) , ) -> u8, ) , ) -> u256 , mul(12: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 13: u256, ) , ) -> u8, ) , ) -> u256 , mul(13: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 14: u256, ) , ) -> u8, ) , ) -> u256 , mul(14: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 15: u256, ) , ) -> u8, ) , ) -> u256 , mul(15: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 16: u256, ) , ) -> u8, ) , ) -> u256 , mul(16: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 17: u256, ) , ) -> u8, ) , ) -> u256 , mul(17: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 18: u256, ) , ) -> u8, ) , ) -> u256 , mul(18: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 19: u256, ) , ) -> u8, ) , ) -> u256 , mul(19: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 20: u256, ) , ) -> u8, ) , ) -> u256 , mul(20: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 21: u256, ) , ) -> u8, ) , ) -> u256 , mul(21: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 22: u256, ) , ) -> u8, ) , ) -> u256 , mul(22: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 23: u256, ) , ) -> u8, ) , ) -> u256 , mul(23: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 24: u256, ) , ) -> u8, ) , ) -> u256 , mul(24: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 25: u256, ) , ) -> u8, ) , ) -> u256 , mul(25: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 26: u256, ) , ) -> u8, ) , ) -> u256 , mul(26: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 27: u256, ) , ) -> u8, ) , ) -> u256 , mul(27: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 28: u256, ) , ) -> u8, ) , ) -> u256 , mul(28: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 29: u256, ) , ) -> u8, ) , ) -> u256 , mul(29: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 30: u256, ) , ) -> u8, ) , ) -> u256 , mul(30: u256, 8: u256, ) , ) , )
%4 = bit_and(%4: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 31: u256, ) , ) -> u8, ) , ) -> u256 , mul(31: u256, 8: u256, ) , ) , )
let %6: u256 = bit_not(0: u256, )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 0: u256, ) , ) -> u8, ) , ) -> u256 , mul(0: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 1: u256, ) , ) -> u8, ) , ) -> u256 , mul(1: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 2: u256, ) , ) -> u8, ) , ) -> u256 , mul(2: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 3: u256, ) , ) -> u8, ) , ) -> u256 , mul(3: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 4: u256, ) , ) -> u8, ) , ) -> u256 , mul(4: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 5: u256, ) , ) -> u8, ) , ) -> u256 , mul(5: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 6: u256, ) , ) -> u8, ) , ) -> u256 , mul(6: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 7: u256, ) , ) -> u8, ) , ) -> u256 , mul(7: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 8: u256, ) , ) -> u8, ) , ) -> u256 , mul(8: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 9: u256, ) , ) -> u8, ) , ) -> u256 , mul(9: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 10: u256, ) , ) -> u8, ) , ) -> u256 , mul(10: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 11: u256, ) , ) -> u8, ) , ) -> u256 , mul(11: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 12: u256, ) , ) -> u8, ) , ) -> u256 , mul(12: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 13: u256, ) , ) -> u8, ) , ) -> u256 , mul(13: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 14: u256, ) , ) -> u8, ) , ) -> u256 , mul(14: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 15: u256, ) , ) -> u8, ) , ) -> u256 , mul(15: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 16: u256, ) , ) -> u8, ) , ) -> u256 , mul(16: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 17: u256, ) , ) -> u8, ) , ) -> u256 , mul(17: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 18: u256, ) , ) -> u8, ) , ) -> u256 , mul(18: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 19: u256, ) , ) -> u8, ) , ) -> u256 , mul(19: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 20: u256, ) , ) -> u8, ) , ) -> u256 , mul(20: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 21: u256, ) , ) -> u8, ) , ) -> u256 , mul(21: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 22: u256, ) , ) -> u8, ) , ) -> u256 , mul(22: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 23: u256, ) , ) -> u8, ) , ) -> u256 , mul(23: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 24: u256, ) , ) -> u8, ) , ) -> u256 , mul(24: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 25: u256, ) , ) -> u8, ) , ) -> u256 , mul(25: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 26: u256, ) , ) -> u8, ) , ) -> u256 , mul(26: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 27: u256, ) , ) -> u8, ) , ) -> u256 , mul(27: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 28: u256, ) , ) -> u8, ) , ) -> u256 , mul(28: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 29: u256, ) , ) -> u8, ) , ) -> u256 , mul(29: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 30: u256, ) , ) -> u8, ) , ) -> u256 , mul(30: u256, 8: u256, ) , ) , )
%6 = bit_and(%6: u256, shl(int_cast(call(@ir.vector.get(%1: [u8], add(0: u256, 31: u256, ) , ) -> u8, ) , ) -> u256 , mul(31: u256, 8: u256, ) , ) , )
let %5: u256 = call(@Address_497_deployed.Address_497_deployed.shift_right_224_unsigned(%6: u256, ) -> u256, )
br_if(eq(div(call(@ir.vector.len(%1: [u8], ) -> u256, ) , 50: u256, ) , 0: u256, ) , bb 8, bb 9, )
7:
8:
br(bb 9, )
9:
call(@ir.builtin.revert(3001: i32, "yul revert": str, ) -> void, )
ret()
}

}


Loading

0 comments on commit 0af1c31

Please sign in to comment.