Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions abi/CartesiApplication.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,19 @@
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getNumberOfExecutedOutputs",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getOutputsMerkleRootValidator",
Expand Down
2 changes: 1 addition & 1 deletion codegen.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const supportedTestnets = [
sepolia.id,
];

const packageRef = 'cartesi-rollups:2.0.0';
const packageRef = 'cartesi-rollups:2.1.0';
const abiFolder = join(process.cwd(), 'abi');
const outFolder = join(process.cwd(), 'src', 'deployments');
const codegenMetaFileName = '__meta.json';
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@cartesi/rollups": "1.4.0",
"@cartesi/rollups-v2": "npm:@cartesi/rollups@2.0.0",
"@cartesi/rollups-v2": "npm:@cartesi/rollups@2.1.1",
"@subsquid/evm-abi": "^0.3.1",
"@subsquid/evm-codec": "^0.3.0",
"@subsquid/evm-processor": "^1.4.0",
Expand Down
2 changes: 1 addition & 1 deletion src/decoders/evmAdvance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const evmAdvanceAbi = parseAbi([
const [evmAdvanceFn] = evmAdvanceAbi;

/**
* Decode input that is abi encoded using the {@link https://github.com/cartesi/rollups-contracts/blob/v2.0.0-rc.10/contracts/common/Inputs.sol#L19}
* Decode input that is abi encoded using the {@link https://github.com/cartesi/rollups-contracts/blob/v2.1.1/src/common/Inputs.sol#L21}
* Function signature
* @param input
* @returns
Expand Down
42 changes: 21 additions & 21 deletions tests/processor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('Processor creation', () => {
try {
const processor = createProcessor(999);
expect.unreachable('Should not pass createProcessor');
} catch (error) {
} catch (error: any) {
expect(error).toBeInstanceOf(Error);
expect(error.message).toEqual('Unsupported chainId: 999');
}
Expand Down Expand Up @@ -97,18 +97,18 @@ describe('Processor creation', () => {
});

expect(addLog.mock.calls[2][0]).toEqual({
address: ['0xc7006f70875bade89032001262a846d3ee160051'],
address: [RollupsAddressBook.v2.ApplicationFactory],
range: {
from: 30910822,
from: 37737524,
},
topic0: [
'0xd291ffe9436f2c57d5ce3e87ed33576f801053946651a2fb4fec5a406cf68cc5',
],
});

expect(addLog.mock.calls[3][0]).toEqual({
address: ['0xc70074bdd26d8cf983ca6a5b89b8db52d5850051'],
range: { from: 30910822 },
address: [RollupsAddressBook.v2.InputBox],
range: { from: 37737524 },
topic0: [
'0xc05d337121a6e8605c6ec0b72aa29c4210ffe6e5b9cefdd6a7058188a8f66f98',
],
Expand Down Expand Up @@ -166,16 +166,16 @@ describe('Processor creation', () => {
});

expect(addLog.mock.calls[2][0]).toEqual({
address: ['0xc7006f70875bade89032001262a846d3ee160051'],
range: { from: 26421182 },
address: [RollupsAddressBook.v2.ApplicationFactory],
range: { from: 33247802 },
topic0: [
'0xd291ffe9436f2c57d5ce3e87ed33576f801053946651a2fb4fec5a406cf68cc5',
],
});

expect(addLog.mock.calls[3][0]).toEqual({
address: ['0xc70074bdd26d8cf983ca6a5b89b8db52d5850051'],
range: { from: 26421182 },
address: [RollupsAddressBook.v2.InputBox],
range: { from: 33247802 },
topic0: [
'0xc05d337121a6e8605c6ec0b72aa29c4210ffe6e5b9cefdd6a7058188a8f66f98',
],
Expand Down Expand Up @@ -237,15 +237,15 @@ describe('Processor creation', () => {
topic0: [
'0xd291ffe9436f2c57d5ce3e87ed33576f801053946651a2fb4fec5a406cf68cc5',
],
range: { from: 8439338 },
range: { from: 9559121 },
});

expect(addLog.mock.calls[3][0]).toEqual({
address: [RollupsAddressBook.v2.InputBox],
topic0: [
'0xc05d337121a6e8605c6ec0b72aa29c4210ffe6e5b9cefdd6a7058188a8f66f98',
],
range: { from: 8439338 },
range: { from: 9559121 },
transaction: true,
});

Expand Down Expand Up @@ -442,7 +442,7 @@ describe('Processor creation', () => {
expect(addLog.mock.calls[2][0]).toEqual({
address: [RollupsAddressBook.v2.ApplicationFactory],
range: {
from: 136506143,
from: 9007199254740991,
},
topic0: [
'0xd291ffe9436f2c57d5ce3e87ed33576f801053946651a2fb4fec5a406cf68cc5',
Expand All @@ -451,7 +451,7 @@ describe('Processor creation', () => {

expect(addLog.mock.calls[3][0]).toEqual({
address: [RollupsAddressBook.v2.InputBox],
range: { from: 136506143 },
range: { from: 9007199254740991 },
topic0: [
'0xc05d337121a6e8605c6ec0b72aa29c4210ffe6e5b9cefdd6a7058188a8f66f98',
],
Expand Down Expand Up @@ -509,15 +509,15 @@ describe('Processor creation', () => {

expect(addLog.mock.calls[2][0]).toEqual({
address: [RollupsAddressBook.v2.ApplicationFactory],
range: { from: 28404083 },
range: { from: 9007199254740991 },
topic0: [
'0xd291ffe9436f2c57d5ce3e87ed33576f801053946651a2fb4fec5a406cf68cc5',
],
});

expect(addLog.mock.calls[3][0]).toEqual({
address: [RollupsAddressBook.v2.InputBox],
range: { from: 28404083 },
range: { from: 9007199254740991 },
topic0: [
'0xc05d337121a6e8605c6ec0b72aa29c4210ffe6e5b9cefdd6a7058188a8f66f98',
],
Expand Down Expand Up @@ -575,15 +575,15 @@ describe('Processor creation', () => {

expect(addLog.mock.calls[2][0]).toEqual({
address: [RollupsAddressBook.v2.ApplicationFactory],
range: { from: 342110860 },
range: { from: 396725994 },
topic0: [
'0xd291ffe9436f2c57d5ce3e87ed33576f801053946651a2fb4fec5a406cf68cc5',
],
});

expect(addLog.mock.calls[3][0]).toEqual({
address: [RollupsAddressBook.v2.InputBox],
range: { from: 342110860 },
range: { from: 396725994 },
topic0: [
'0xc05d337121a6e8605c6ec0b72aa29c4210ffe6e5b9cefdd6a7058188a8f66f98',
],
Expand Down Expand Up @@ -641,15 +641,15 @@ describe('Processor creation', () => {

expect(addLog.mock.calls[2][0]).toEqual({
address: [RollupsAddressBook.v2.ApplicationFactory],
range: { from: 158367139 },
range: { from: 211735634 },
topic0: [
'0xd291ffe9436f2c57d5ce3e87ed33576f801053946651a2fb4fec5a406cf68cc5',
],
});

expect(addLog.mock.calls[3][0]).toEqual({
address: [RollupsAddressBook.v2.InputBox],
range: { from: 158367139 },
range: { from: 211735634 },
topic0: [
'0xc05d337121a6e8605c6ec0b72aa29c4210ffe6e5b9cefdd6a7058188a8f66f98',
],
Expand Down Expand Up @@ -708,15 +708,15 @@ describe('Processor creation', () => {

expect(addLog.mock.calls[2][0]).toEqual({
address: [RollupsAddressBook.v2.ApplicationFactory],
range: { from: 22595774 },
range: { from: 23726340 },
topic0: [
'0xd291ffe9436f2c57d5ce3e87ed33576f801053946651a2fb4fec5a406cf68cc5',
],
});

expect(addLog.mock.calls[3][0]).toEqual({
address: [RollupsAddressBook.v2.InputBox],
range: { from: 22595774 },
range: { from: 23726340 },
topic0: [
'0xc05d337121a6e8605c6ec0b72aa29c4210ffe6e5b9cefdd6a7058188a8f66f98',
],
Expand Down