Skip to content

Commit

Permalink
Added GETFORWARDFEE opcode.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shvandre committed Jan 5, 2025
1 parent 7c41c80 commit 8dd73d0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.0.18] - 2025-01-05

### Added
- Support of `GETFORWARDFEE` opcode: PR [#22]()

## [0.0.17] - 2025-01-03

### Added
Expand Down
2 changes: 1 addition & 1 deletion reference/opcodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ opcodes:
# Opcodes to process config parameters
GETGASFEE:
GETSTORAGEFEE:
# GETFORWARDFEE:
GETFORWARDFEE:
GETPRECOMPILEDGAS:
GETORIGINALFWDFEE:
GETGASFEESIMPLE:
Expand Down
1 change: 1 addition & 0 deletions src/codepage/opcodes.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,7 @@ export type OpCodeNoArgs =
| { code: 'DUEPAYMENT' }
| { code: 'GETGASFEE' }
| { code: 'GETSTORAGEFEE' }
| { code: 'GETFORWARDFEE' }
| { code: 'GETPRECOMPILEDGAS' }
| { code: 'GETORIGINALFWDFEE' }
| { code: 'GETGASFEESIMPLE' }
Expand Down
6 changes: 4 additions & 2 deletions src/codepage/opcodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1147,17 +1147,19 @@ CP0Auto.insertHex('F83401', 24, { code: 'PREVKEYBLOCK' });
CP0Auto.insertHex('F835', 16, { code: 'GLOBALID' });
CP0Auto.insertHex('F836', 16, { code: 'GETGASFEE' });
CP0Auto.insertHex('F837', 16, { code: 'GETSTORAGEFEE' });
CP0Auto.insertHex('F838', 16, { code: 'GETFORWARDFEE' });
CP0Auto.insertHex('F839', 16, { code: 'GETPRECOMPILEDGAS' });
CP0Auto.insertHex('F83A', 16, { code: 'GETORIGINALFWDFEE' });
CP0Auto.insertHex('F83B', 16, { code: 'GETGASFEESIMPLE' });
CP0Auto.insertHex('F83C', 16, { code: 'GETFORWARDFEESIMPLE' });

CP0Auto.insertHex('f841', 11, (slice) => {
let i = slice.loadUint(5);
return { code: `GETGLOBVAR`, args: [i] };
return { code: `GETGLOB`, args: [i] };
});
CP0Auto.insertHex('f861', 11, (slice) => {
let i = slice.loadUint(5);
return { code: `SETGLOBVAR`, args: [i] };
return { code: `SETGLOB`, args: [i] };
});
CP0Auto.insertHex('f900', 16, { code: 'HASHCU' });
CP0Auto.insertHex('f901', 16, { code: 'HASHSU' });
Expand Down

0 comments on commit 8dd73d0

Please sign in to comment.