@@ -56,7 +56,7 @@ function initializeContract(
56
56
contract = new Contract ( "0" ) ;
57
57
contract . arbitrator = governor . arbitrator ( ) ;
58
58
contract . arbitratorExtraData = governor . arbitratorExtraData ( ) ;
59
- contract . deployer = contract . deployer || deployer ;
59
+ contract . deployer = deployer ;
60
60
contract . reservedETH = governor . reservedETH ( ) ;
61
61
contract . submissionBaseDeposit = governor . submissionBaseDeposit ( ) ;
62
62
contract . submissionTimeout = governor . submissionTimeout ( ) ;
@@ -88,7 +88,7 @@ function newSession(contract: Contract, creationTime: BigInt): Session {
88
88
session . roundsLength = BigInt . fromI32 ( 0 ) ;
89
89
session . save ( ) ;
90
90
91
- contract . sessionsLength . plus ( BigInt . fromI32 ( 1 ) ) ;
91
+ contract . sessionsLength = contract . sessionsLength . plus ( BigInt . fromI32 ( 1 ) ) ;
92
92
contract . save ( ) ;
93
93
94
94
// Something is broken with The Graph's null type guards so we need these explicit casts in some places.
@@ -100,7 +100,7 @@ function newRound(session: Session, creationTime: BigInt): Round {
100
100
crypto
101
101
. keccak256 (
102
102
concatByteArrays (
103
- ByteArray . fromHexString ( session . id ) ,
103
+ ByteArray . fromUTF8 ( session . id ) ,
104
104
ByteArray . fromUTF8 ( session . roundsLength . toString ( ) )
105
105
)
106
106
)
@@ -137,7 +137,7 @@ function updateContribution(
137
137
138
138
let roundID = crypto . keccak256 (
139
139
concatByteArrays (
140
- ByteArray . fromUTF8 ( sessionID . toString ( ) ) ,
140
+ ByteArray . fromUTF8 ( sessionID . toHexString ( ) ) ,
141
141
ByteArray . fromUTF8 ( roundIndex . toString ( ) )
142
142
)
143
143
) ;
@@ -263,7 +263,7 @@ export function submitList(call: SubmitListCall): void {
263
263
for ( let i = 0 ; i < call . inputs . _target . length ; i ++ ) {
264
264
let transaction = new Transaction (
265
265
concatByteArrays (
266
- crypto . keccak256 ( ByteArray . fromHexString ( submission . id ) ) ,
266
+ crypto . keccak256 ( ByteArray . fromUTF8 ( submission . id ) ) ,
267
267
ByteArray . fromUTF8 ( i . toString ( ) )
268
268
) . toHexString ( )
269
269
) ;
@@ -405,7 +405,7 @@ export function withdrawFeesAndRewards(call: WithdrawFeesAndRewardsCall): void {
405
405
}
406
406
407
407
export function ruling ( event : Ruling ) : void {
408
- let governor = Governor . bind ( event . transaction . to as Address ) ;
408
+ let governor = Governor . bind ( event . address ) ;
409
409
let contract = initializeContract (
410
410
event . transaction . to as Address ,
411
411
event . transaction . from ,
@@ -446,7 +446,7 @@ export function executeTransactionList(call: ExecuteTransactionListCall): void {
446
446
for ( let i = 0 ; i < submission . transactionsLength . toI32 ( ) ; i ++ ) {
447
447
let transaction = Transaction . load (
448
448
concatByteArrays (
449
- crypto . keccak256 ( ByteArray . fromHexString ( submission . id ) ) ,
449
+ crypto . keccak256 ( ByteArray . fromUTF8 ( submission . id ) ) ,
450
450
ByteArray . fromUTF8 ( i . toString ( ) )
451
451
) . toHexString ( )
452
452
) ;
0 commit comments